UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType > Class Template Reference
The complete Policy template for updating particles, used by the ParticleSystem class.
More...
#include <Graphics/ParticleSystem.h>
List of all members.
Detailed Description
template<class MotionPolicy, class PositionPolicy, class VelocityPolicy, class AnglePolicy, class SizePolicy, class ColorPolicy, class AgePolicy, class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
class UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >
The complete Policy template for updating particles, used by the ParticleSystem class.
- Template Parameters:
-
| MotionPolicy | the policy that moves particles, expected to have the same methods as the Policy template. |
| PositionPolicy | the policy for updating particle position, expected to have the same methods as the Policy template. |
| VelocityPolicy | the policy for updating particle velocity, expected to have the same methods as the Policy template. |
| AnglePolicy | the policy for updating particle angle and angular velocity, expected to have the same methods as the Policy template. |
| SizePolicy | the policy for updating particle size, expected to have the same methods as the Policy template. |
| ColorPolicy | the policy for updating particle color, expected to have the same methods as the Policy template. |
| AgePolicy | the policy for updating particle age, expected to have the same methods as the Policy template. |
| UserPolict | an extra policy that can do whatever the user wants. Defaults to the NullPolicy. |
| ParticleType | the type of particle to use in the particle system. The ParticleType is expected to inheret from the Particle class (or at least have duplicate members). |
Member Function Documentation
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
bool UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::ApplyUpdate |
( |
ParticleType & |
p, |
|
|
float |
dt | |
|
) |
| | [inline] |
Called once before each update.
- Parameters:
-
[in,out] | p | the particle to apply the Policy to. |
[in] | dt | the time in seconds since the last frame. |
- Returns:
- False if you want the particle to be destroyed, return true otherwise.
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
void UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::PreUpdate |
( |
float |
dt |
) |
[inline] |
Called once before each update.
- Parameters:
-
[in] | dt | the time in seconds since the last frame. |
Member Data Documentation
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
AgePolicy UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::agePolicy |
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
AnglePolicy UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::anglePolicy |
The angle and agular velocity policy
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
ColorPolicy UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::colorPolicy |
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
MotionPolicy UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::motionPolicy |
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
PositionPolicy UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::positionPolicy |
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
SizePolicy UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::sizePolicy |
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
UserPolicy UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::userPolicy |
template<class MotionPolicy , class PositionPolicy , class VelocityPolicy , class AnglePolicy , class SizePolicy , class ColorPolicy , class AgePolicy , class UserPolicy = NullUpdatePolicy<Particle>, class ParticleType = Particle>
VelocityPolicy UpdatePolicy< MotionPolicy, PositionPolicy, VelocityPolicy, AnglePolicy, SizePolicy, ColorPolicy, AgePolicy, UserPolicy, ParticleType >::velocityPolicy |
The documentation for this class was generated from the following file: