A group of many particles. More...
Public Member Functions | |
Group (Model *model=NULL, size_t capacity=Pool< Particle >::DEFAULT_CAPACITY) | |
Constructor for a Group. | |
Group (const Group &group) | |
Copy Constructor of Group. | |
~Group () | |
The destructor of Group. | |
void | setModel (Model *model) |
change the Model of this Group | |
void | setRenderer (Renderer *renderer) |
Sets the Renderer of this Group. | |
void | setFriction (float friction) |
Sets the friction of this Group. | |
void | setGravity (const Vector3D &gravity) |
Sets the gravity of this Group. | |
void | setCustomUpdate (bool(*fupdate)(Particle &, float)) |
Assigns a callback for the custom update. | |
void | setCustomBirth (void(*fbirth)(Particle &)) |
Assigns a callback for custom birth. | |
void | setCustomDeath (void(*fdeath)(Particle &)) |
Assigns a callback for custom death. | |
void | enableSorting (bool sort) |
Enables or disables the sorting of particles. | |
void | enableDistanceComputation (bool distanceComputation) |
Enables or disables the computation of the distance of a Particle from the camera. | |
void | enableAABBComputing (bool AABB) |
Enables or disables the computation of the axis aligned bouding box of the Group. | |
const Pool< Particle > & | getParticles () const |
Gets the Pool of particles of the Group. | |
Particle & | getParticle (size_t index) |
Gets a single Particle in the Group by its index. | |
const Particle & | getParticle (size_t index) const |
Gets a single Particle in the Group by its index. | |
size_t | getNbParticles () const |
Gets the number of particles in the Group. | |
const std::vector< Emitter * > & | getEmitters () const |
Gets the emitters of the Group. | |
Emitter * | getEmitter (size_t index) const |
Gets an Emitter of the Group by its index. | |
size_t | getNbEmitters () const |
Gets the number of emitters in this Group. | |
const std::vector< Modifier * > & | getModifiers () const |
Gets the modifiers of the Group. | |
Modifier * | getModifier (size_t index) const |
Gets an Modifier of the Group by its index. | |
size_t | getNbModifiers () const |
Gets the number of modifiers in this Group. | |
Model * | getModel () const |
Gets the Model of this Group. | |
Renderer * | getRenderer () const |
Gets the Renderer of this Group. | |
float | getFriction () const |
Gets the friction coefficient of this Group. | |
const Vector3D & | getGravity () const |
Gets the gravity Vector3D of this Group. | |
bool | isSortingEnabled () const |
Tells whether the sorting of particles from back to front is enabled. | |
bool | isDistanceComputationEnabled () const |
Tells whether the distance computation between particles and camera is enabled. | |
bool | isAABBComputingEnabled () const |
Tells whether the computation of the axis aligned bouding box is enabled. | |
const Vector3D & | getAABBMin () const |
Gets a Vector3D holding the minimum coordinates of the AABB of the Group. | |
const Vector3D & | getAABBMax () const |
Gets a Vector3D holding the maximum coordinates of the AABB of the Group. | |
const void * | getParamAddress (ModelParam param) const |
Gets the start address of the given param. | |
const void * | getPositionAddress () const |
Gets the start address of the position. | |
size_t | getParamStride () const |
Gets the stride for parameters. | |
size_t | getPositionStride () const |
Gets the stride for positions. | |
void | addParticles (unsigned int nb, const Vector3D &position, const Vector3D &velocity) |
Adds some Particles to this Group. | |
void | addParticles (unsigned int nb, const Zone *zone, Emitter *emitter, bool full=true) |
Adds some Particles to this Group. | |
void | addParticles (unsigned int nb, const Zone *zone, const Vector3D &velocity, bool full=true) |
Adds some Particles to this Group. | |
void | addParticles (unsigned int nb, const Vector3D &position, Emitter *emitter) |
Adds some Particles to this Group. | |
void | addParticles (unsigned int nb, Emitter *emitter) |
Adds some Particles to this Group. | |
void | addParticles (const Zone *zone, Emitter *emitter, float deltaTime, bool full=true) |
Adds some Particles to this Group. | |
void | addParticles (const Vector3D &position, Emitter *emitter, float deltaTime) |
Adds some Particles to this Group. | |
void | addParticles (Emitter *emitter, float deltaTime) |
Adds some Particles to this Group. | |
float | addParticles (const Vector3D &start, const Vector3D &end, Emitter *emitter, float step, float offset=0.0f) |
Adds some Particles to this Group. | |
float | addParticles (const Vector3D &start, const Vector3D &end, const Vector3D &velocity, float step, float offset=0.0f) |
Adds some Particles to this Group. | |
void | removeParticle (size_t index) |
Removes a Particle from this Group. | |
void | addEmitter (Emitter *emitter) |
Adds an Emitter in this Group. | |
void | removeEmitter (Emitter *emitter) |
Removes an Emitter from this Group. | |
void | addModifier (Modifier *modifier) |
Adds an Modifier in this Group. | |
void | removeModifier (Modifier *modifier) |
Removes an Modifier from this Group. | |
bool | update (float deltaTime) |
Updates this Group by a step time. | |
void | render () |
Renders this Group. | |
void | empty () |
Empties this Group. | |
void | flushAddedParticles () |
Adds all manually added particles to the Group. | |
void | sortParticles () |
Sorts the particles within this Group. | |
void | computeDistances () |
Computes the distance between each Particle within this Group and the camera. | |
void | computeAABB () |
Computes the bounding box of this Group. | |
void | reallocate (size_t capacity) |
Increases the maximum number of particles this Group can hold. | |
Buffer * | createBuffer (const std::string &ID, const BufferCreator &creator, unsigned int flag=0, bool swapData=true) const |
Creates a new additional buffer attached to the Group. | |
void | destroyBuffer (const std::string &ID) const |
Destroys the buffer with the given ID. | |
void | destroyAllBuffers () const |
Destroys all the buffers held by this Group. | |
Buffer * | getBuffer (const std::string &ID, unsigned int flag) const |
Gets the buffer with the given ID and checks its flag. | |
Buffer * | getBuffer (const std::string &ID) const |
Gets the buffer with the given ID. | |
virtual Registerable * | findByName (const std::string &name) |
Finds a registerable with its name recursively from this registerable. | |
Static Public Member Functions | |
static Group * | create (Model *model=NULL, size_t capacity=Pool< Particle >::DEFAULT_CAPACITY) |
Creates and registers a new Group. | |
static void | enableBuffersManagement (bool manage) |
Enables or not Renderer buffers management in a statix way. | |
static bool | isBuffersManagementEnabled () |
Tells whether renderers buffer management is enabled or not. | |
Protected Member Functions | |
virtual void | registerChildren (bool registerAll) |
Registers the children of this Registerable. | |
virtual void | destroyChildren (bool keepChildren) |
Destroys the children of this Registerable. | |
virtual void | propagateUpdateTransform () |
Propagates the update of the transform to transformable children of this transformable. |
A group of many particles.
A Group is the structure the user will interact with the most to build up a full Particle System.
More than only storing many particles, a Group also defines and entire environment for Particle generation and Evolution.
This class is the spine of the SPARK engine.
Definition at line 53 of file SPK_Group.h.
Constructor for a Group.
A Group is constructed with a Model (if NULL, the default Model will be used to generate particles). This Model will be used to handle Particle's generation and evolution within the Group.
A Group also needs a maximum capacity which is the maximum number of particles the Group can handle. This is necessary to reserve some memory space. Note that the capacity can be changed by calling reallocate(unsigned int). By default, the capacity is set to Pool::DEFAULT_CAPACITY.
void addEmitter | ( | Emitter * | emitter | ) |
void addModifier | ( | Modifier * | modifier | ) |
float addParticles | ( | const Vector3D & | start, | |
const Vector3D & | end, | |||
const Vector3D & | velocity, | |||
float | step, | |||
float | offset = 0.0f | |||
) |
Adds some Particles to this Group.
See addParticles(const Vector3D&,const Vector3D&,const Emitter*,float,float) for a complete description.
start | : the position of the start of the line | |
end | : the position of the end of the line | |
velocity | : the velocity of the Particles | |
step | : the distance between each generated Particle | |
offset | : the starting distance of the beginning of the line |
float addParticles | ( | const Vector3D & | start, | |
const Vector3D & | end, | |||
Emitter * | emitter, | |||
float | step, | |||
float | offset = 0.0f | |||
) |
Adds some Particles to this Group.
This method is slightly different to other addParticles methods as Particles are generated not at a point but on a line defined by start and end.
The step is the distance between each Particle on the line and the offset is the starting distance to compute the first Particle's position.
The offset is useful to generate equidistant particles on several lines. the returned offset has to be used as the passed offset for the next line.
This method is useful to generate equidistant particles on lines no matter the framerate.
See addParticles(unsigned int,const Vector3D&,const Vector3D&) for some complementary information.
start | : the position of the start of the line | |
end | : the position of the end of the line | |
emitter | : the Emitter that will be used to generate the velocity | |
step | : the distance between each generated Particle | |
offset | : the starting distance of the beginning of the line |
void addParticles | ( | Emitter * | emitter, | |
float | deltaTime | |||
) |
Adds some Particles to this Group.
See addParticles(unsigned int,const Vector3D&,const Vector3D&) for a complete description.
Adds some Particles to this Group.
See addParticles(unsigned int,const Vector3D&,const Vector3D&) for a complete description.
position | : the position where the Particles will be added | |
emitter | : the Emitter that will be used to generate the velocity | |
deltaTime | : the step time that will be used to determine how many particles to generate |
Adds some Particles to this Group.
See addParticles(unsigned int,const Vector3D&,const Vector3D&) for a complete description.
zone | : the Zone that will be used to generate the position | |
emitter | : the Emitter that will be used to generate the velocity | |
deltaTime | : the step time that will be used to determine how many particles to generate | |
full | : true to generate a position within the whole Zonz, false only at its borders |
void addParticles | ( | unsigned int | nb, | |
Emitter * | emitter | |||
) |
Adds some Particles to this Group.
See addParticles(unsigned int,const Vector3D&,const Vector3D&) for a complete description.
Adds some Particles to this Group.
See addParticles(unsigned int,const Vector3D&,const Vector3D&) for a complete description.
nb | : the number of Particles to add | |
position | : the position where the Particles will be added | |
emitter | : the Emitter that will be used to generate the velocity |
Definition at line 1040 of file SPK_Group.h.
void addParticles | ( | unsigned int | nb, | |
const Zone * | zone, | |||
const Vector3D & | velocity, | |||
bool | full = true | |||
) |
Adds some Particles to this Group.
See addParticles(unsigned int,const Vector3D&,const Vector3D&) for a complete description.
nb | : the number of Particles to add | |
zone | : the Zone that will be used to generate the position | |
velocity | : the velocity of the Particles | |
full | : true to generate a position within the whole Zonz, false only at its borders |
Definition at line 1035 of file SPK_Group.h.
Adds some Particles to this Group.
See addParticles(unsigned int,const Vector3D&,const Vector3D&) for a complete description.
nb | : the number of Particles to add | |
zone | : the Zone that will be used to generate the position | |
emitter | : the Emitter that will be used to generate the velocity | |
full | : true to generate a position within the whole Zonz, false only at its borders |
Definition at line 1030 of file SPK_Group.h.
Adds some Particles to this Group.
This method and all the methods of type addParticles will add a given number of Particles at the given position with the given velocity.
Note that even if a Zone and an Emitter is passed, the position and the velocity will be the same for all Particles.
In case a Zone is passed, Zone::generatePosition(Particle,bool) is used to generate the position.
In case an Emitter is passed, Emitter::generateVelocity(Particle) with a mass of 1 is used to generate the velocity. The velocity will then be updated with the Particle's mass when the Particle will be generated.
In case a delta time is passed instead of a fixed number, the number will be computed thanks to the flow of the Emitter passed.
Particles will be added to the Group at the next call to update(unsigned int) or flushAddedParticles().
This is why any Emitter and Zone used to generate particles must be valid at the next call of either update(unsigned int) or flushAddedParticles().
On some methods addParticles, the full variable is present. This variable defines where to generate positions in a Zone :
nb | : the number of Particles to add | |
position | : the position where the Particles will be added | |
velocity | : the velocity of the Particles |
Definition at line 1025 of file SPK_Group.h.
void computeAABB | ( | ) |
Computes the bounding box of this Group.
The bounding box is computed only if the computation of the bounding box of this Group is enabled. See enableAABBComputing(bool).
Note that update(unsigned int) also computes the bounding box.
This method is therefore only useful when the bounding boxe has to be recomputed between 2 updates.
void computeDistances | ( | ) |
Computes the distance between each Particle within this Group and the camera.
The distances are computed only if the computation of distances of this Group is enabled. See enableDistanceComputation(bool).
Note that update(unsigned int) also computes the distances between particles and camera.
This method is therefore only useful when the camera position changes several times between 2 updates.
Buffer* createBuffer | ( | const std::string & | ID, | |
const BufferCreator & | creator, | |||
unsigned int | flag = 0 , |
|||
bool | swapData = true | |||
) | const |
Creates a new additional buffer attached to the Group.
Additional buffers are used to attach data to a particles. They are mainly used by renderers to store data to transfer to the GPU but can be used by the user in any other way.
A buffer is defined by a ID which is a std::string.
A buffer also has a flag, which can give information about the way it is configured.
Note that ID starting with SPK_ are reserved by the engine. Note also that creating a buffer with an already existing ID will destroy the previous buffer.
A buffer needs a BufferCreator to allow the group to create it.
ID | : the ID of the additinal buffer | |
creator | : the buffer creator object | |
flag | : the flag of the buffer | |
swapData | : true to swap data when particle are swapped, false not to (faster but dont keep right order) |
void destroyAllBuffers | ( | ) | const |
Destroys all the buffers held by this Group.
void destroyBuffer | ( | const std::string & | ID | ) | const |
Destroys the buffer with the given ID.
If no buffer with this ID exists, nothing happens.
Note that destroying a buffer must never freeze the engine. Checks must be performed.
ID | : the ID of the buffer to destroyed |
virtual void destroyChildren | ( | bool | keepChildren | ) | [protected, virtual] |
Destroys the children of this Registerable.
This method has to be implemented in derived classes of Registerable which hold pointers or references of Registerable children.
The destroyChild(Registerable*,bool) has to be called within it for each child to destroy.
The keepChildren parameter of destroyChild is simply the keepChildren parameter of destroyChildren.
keepChildren | : true to keep the children (used when destroying all registered Registerable) |
Reimplemented from Registerable.
void empty | ( | ) |
void enableAABBComputing | ( | bool | AABB | ) |
Enables or disables the computation of the axis aligned bouding box of the Group.
if the computing of the AABB is enabled, after each call to update(unsigned int), 2 Vector3D are updated with the coordinates information of the AABB. Those Vector3D can be gotten with getAABBMin() and getAABBMax() which give respectively the minimum and maximum coordinates of the bounding box in each axis.
Knowing the AABB of a Group of particles can be useful in some case like frustum culling for instance.
Note that the bounding box does not use the size information of the particles which means when computing the bounding box, particles are considered to be points in the space.
AABB | : true to enable the computing of the AABB of the Group, false to disable it |
Definition at line 925 of file SPK_Group.h.
static void enableBuffersManagement | ( | bool | manage | ) | [static] |
Enables or not Renderer buffers management in a statix way.
If the buffer management is enabled, then a call to setRenderer(Renderer*) will destroy the existing buffers of the previous Renderer held by this Group, and create the needed buffer for the new Renderer.
By default, the renderer buffers management is enabled.
manage | : true to enable buffers management, false to disable it |
void enableDistanceComputation | ( | bool | distanceComputation | ) |
Enables or disables the computation of the distance of a Particle from the camera.
The distance computation happens at each call to update(unsigned int).
The distance of a Particle from the camera can be gotten with a call to Particle::getDistanceFromCamera() or Particle::getSqrDistanceFromCamera()
Note that the distance is defined by the difference vector between the Particle and the the camera set with System::setCameraPosition(Vector3D&).
If the distance computation is disabled, then the sorting of particles is disabled as well.
distanceComputation | : true to enable the computation of the camera distance, false not to |
Definition at line 919 of file SPK_Group.h.
void enableSorting | ( | bool | sort | ) |
Enables or disables the sorting of particles.
The sorting is performed from particles further to the camera to particles closer to the camera.
Sorting particles allows to well draw particles with alpha.
If the sorting is enabled/disabled, the distance computation is enabled/disabled as well.
Note that sorting a Group is a computationnaly expensive operation that should be avoided when possible.
sort | : true to enable the sorting of particles, false otherwise |
Definition at line 913 of file SPK_Group.h.
virtual Registerable* findByName | ( | const std::string & | name | ) | [virtual] |
Finds a registerable with its name recursively from this registerable.
If the name is not found, NULL is returned.
If the several objects with the same name exists, only the first one is returned.
Note that the name of the registerable itself is already tested.
name | : the name of the registerable to find |
Reimplemented from Registerable.
void flushAddedParticles | ( | ) |
Adds all manually added particles to the Group.
This method adds all particles added with the addParticles methods immediatly to the Group without waiting the next call to update(unsigned int). The Particles are added in FIFO order until there is no more or the capacity limit of the Group is reached.
const Vector3D & getAABBMax | ( | ) | const |
Gets a Vector3D holding the maximum coordinates of the AABB of the Group.
Note that this method is only useful when the AABB computation is enabled (see enableAABBComputing(bool)).
Definition at line 1020 of file SPK_Group.h.
const Vector3D & getAABBMin | ( | ) | const |
Gets a Vector3D holding the minimum coordinates of the AABB of the Group.
Note that this method is only useful when the AABB computation is enabled (see enableAABBComputing(bool)).
Definition at line 1015 of file SPK_Group.h.
Buffer* getBuffer | ( | const std::string & | ID | ) | const |
Gets the buffer with the given ID.
NULL is returned if the buffer does not exist
ID | : the ID of the buffer |
Buffer* getBuffer | ( | const std::string & | ID, | |
unsigned int | flag | |||
) | const |
Gets the buffer with the given ID and checks its flag.
The flag is used as a check. the passed flag must be the same as the stored flag.
If not or if no buffer with the given ID exists, NULL is returned.
The method returns a pointer on the buffer.
ID | : the ID of the buffer to get | |
flag | : the flag used for the flag check |
Emitter * getEmitter | ( | size_t | index | ) | const |
const std::vector< Emitter * > & getEmitters | ( | ) | const |
Gets the emitters of the Group.
Definition at line 950 of file SPK_Group.h.
float getFriction | ( | ) | const |
Gets the friction coefficient of this Group.
For a description of the friction see setFriction(float).
Definition at line 990 of file SPK_Group.h.
const Vector3D & getGravity | ( | ) | const |
Model * getModel | ( | ) | const |
Modifier * getModifier | ( | size_t | index | ) | const |
const std::vector< Modifier * > & getModifiers | ( | ) | const |
Gets the modifiers of the Group.
Definition at line 965 of file SPK_Group.h.
size_t getNbEmitters | ( | ) | const |
Gets the number of emitters in this Group.
Definition at line 960 of file SPK_Group.h.
size_t getNbModifiers | ( | ) | const |
Gets the number of modifiers in this Group.
Definition at line 975 of file SPK_Group.h.
size_t getNbParticles | ( | ) | const |
Gets the number of particles in the Group.
Definition at line 945 of file SPK_Group.h.
const void* getParamAddress | ( | ModelParam | param | ) | const |
Gets the start address of the given param.
This method is used by a Renderer to define the start position of an array to pass to the GPU.
You will not generally need it unless you re designing your own Renderer.
Note that if the parameter is not enabled, the return value will point to an enabled parameter starting address.
param | : the parameter whose start address is gotten |
size_t getParamStride | ( | ) | const |
const Particle & getParticle | ( | size_t | index | ) | const |
Gets a single Particle in the Group by its index.
This is the constant version of getParticle(size_t).
index | : the index of the Particle to get |
Definition at line 940 of file SPK_Group.h.
Particle & getParticle | ( | size_t | index | ) |
const void * getPositionAddress | ( | ) | const |
Gets the start address of the position.
This method is used by a Renderer to define the start position of an array to pass to the GPU.
You will not generally need it unless you re designing your own Renderer.
Definition at line 1050 of file SPK_Group.h.
size_t getPositionStride | ( | ) | const |
Gets the stride for positions.
This method is used by a Renderer to know the stride of an array to pass to the GPU.
You will not generally need it unless you re designing your own Renderer.
Definition at line 1055 of file SPK_Group.h.
Renderer * getRenderer | ( | ) | const |
bool isAABBComputingEnabled | ( | ) | const |
Tells whether the computation of the axis aligned bouding box is enabled.
For a description of the computation of the AABB, see enableAABBComputing(bool).
Definition at line 1010 of file SPK_Group.h.
static bool isBuffersManagementEnabled | ( | ) | [static] |
Tells whether renderers buffer management is enabled or not.
see enableBuffersManagement(bool) for more information.
bool isDistanceComputationEnabled | ( | ) | const |
Tells whether the distance computation between particles and camera is enabled.
Definition at line 1005 of file SPK_Group.h.
bool isSortingEnabled | ( | ) | const |
Tells whether the sorting of particles from back to front is enabled.
For a description of the sorting of particles, see enableSorting(bool).
Definition at line 1000 of file SPK_Group.h.
virtual void propagateUpdateTransform | ( | ) | [protected, virtual] |
Propagates the update of the transform to transformable children of this transformable.
This method can be overriden in derived classes of Transformable (By default it does nothing).
It is this method task to call the updateTransform method of transformable children of this transformable.
Reimplemented from Transformable.
void reallocate | ( | size_t | capacity | ) |
virtual void registerChildren | ( | bool | registerAll | ) | [protected, virtual] |
Registers the children of this Registerable.
This method has to be implemented in derived classes of Registerable which hold pointers or references of Registerable children.
The registerChild(Registerable*,bool) has to be called within it for each child to copy from object.
The registerAll parameter of registerChild is simply the registerAll parameter of registerChildren.
registerAll | : true to register unregistered children, false to only increment ref counts of already registered children |
Reimplemented from Registerable.
void removeEmitter | ( | Emitter * | emitter | ) |
void removeModifier | ( | Modifier * | modifier | ) |
void removeParticle | ( | size_t | index | ) |
void render | ( | ) |
void setCustomBirth | ( | void(*)(Particle &) | fbirth | ) |
Assigns a callback for custom birth.
This method allows to assign a callback function that will be called each time a Particle borns.
The signature of the function must be of the form :
void customUpdate(Particle&)
with Particle& being the Particle which is just born.
fbirth | : A pointer to the callback function that will perform custom birth for this Group |
Definition at line 903 of file SPK_Group.h.
void setCustomDeath | ( | void(*)(Particle &) | fdeath | ) |
Assigns a callback for custom death.
This method allows to assign a callback function that will be called each time a Particle dies.
The signature of the function must be of the form :
void customUpdate(Particle&)
with Particle& being the Particle which has just died.
fdeath | : A pointer to the callback function that will perform custom death for this Group |
Definition at line 908 of file SPK_Group.h.
void setCustomUpdate | ( | bool(*)(Particle &, float) | fupdate | ) |
Assigns a callback for the custom update.
The user has the possibility to assign a callback function for update that will be called for each Particle right after the standard update.
The signature of the function must be of the form :
bool customUpdate(Particle&,unsigned int)
with :
fupdate | : A pointer to the callback function that will perform custom update for this Group |
Definition at line 898 of file SPK_Group.h.
void setFriction | ( | float | friction | ) |
Sets the friction of this Group.
The friction defines the way particles are accelerated or decelerated in their environment.
The friction is applied on each Particle as followed :
velocity *= 1 - min(1,friction * deltaTime / weight)
Note that the lighter the Particle, the more effect has the friction on it.
friction | the friction of the Group |
Definition at line 888 of file SPK_Group.h.
void setGravity | ( | const Vector3D & | gravity | ) |
Sets the gravity of this Group.
The gravity is a vector which defines an attractive force that will be applied to each Particle in the Group during the update.
By default the gravity is the null vector (i.e. a Vector3D equal to (0,0,0)) which means no gravity is applied.
The gravity is applied on each Particle as followed :
velocity += gravity * deltaTime
Definition at line 893 of file SPK_Group.h.
void setModel | ( | Model * | model | ) |
void setRenderer | ( | Renderer * | renderer | ) |
Sets the Renderer of this Group.
If the Renderer is set to NULL, the particles of the Group will not be renderered with a call to render().
Note that if the bufferManagement is on (see enableBuffersManagement(bool)), setting the Renderer will first destroys the buffers needed for the previous Renderer held by this Group and create buffers needed for the new Renderer.
void sortParticles | ( | ) |
Sorts the particles within this Group.
The particles are sorted only if the sorting of this Group is enabled. See enableSorting(bool).
Note that update(unsigned int) also sorts the particles.
This method is therefore only useful when the camera position changes several times between 2 updates.
This method also makes a call to computeDistances().
bool update | ( | float | deltaTime | ) |
Updates this Group by a step time.
The update process performs those operations :
Those operations are optimized to limit the swaps and shifts of particles in the Pool to its minimum.
This method tells whether the Group still has some Particles, or if some Particles will still be generated by the Emitters at the next updates by returning a boolean.
deltaTime | : the time step used to update the Group |