This is the plan of the evaluator functionality.

The evaluator functionality is the function to generate data about the data model that can be used to help display the data. The generated data contains information about concrete particles and emitters that would exist in the final animation. This is like generating all concrete particles and emitters in the animation and store these objects that contain data about themselves. Actually not all such objects are generated, only a subset of them. A generated object contains functionality to get its data, for example position or color of a particle at a specified point in time, or start and end time of a particle, or which (concrete) emitter created the particle, and what emitters do the particle itself "generate". A view can use this data to display the animation in any specific point of time and the data can be used to editing functions too.

For shooters shooter instance objects are created. For emitters emitter instance's are created. For particles particle instance objects are created. A shooter instance creates the particle (or emitter) instances. An emitter instance creates particle instances for the particles (possibly not as much as the real number of particles). A particle instance creates emitter instances. All such instances contain the object that created them and the objects that they create. So a tree structure exists of instance objects, with shooter instances as root. If a particle is changed only the particle instances for it are re-created (the subtree belonging to the particle instance is deleted and re-created). The shooter instances would exist always for all shooter objects in the Root object. A shooter instance may be in a state when its subtree of instance objects do not exist (only the shooter itself). The shooter instance would contain the start time and time when the last object in its subtree disappears (this data is always kept accurate if possible?). So it is possible to determine at a point in time which shooters are "active".

A shooter instance requires only a Shooter object as parameter. An emitter instance requires an EmitterInstance and the "initial parameters" for the emitter (position, angle, angular velocity, and others). A particle instance requires a ParticleTemplate and its initial parameters. These initial parameters are fixed during the lifetime of the instance objects. But if the attached data model object (Shooter, EmiterTemplate, ParticleTemplate) changes the instance object can recalculate its data (this results in re-creating all objects in its subtree).

Last edited Sep 18, 2010 at 7:52 PM by fruitfruit, version 2


No comments yet.