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.

Public Member Functions

void PreUpdate (float dt)
 Called once before each update.
bool ApplyUpdate (ParticleType &p, float dt)
 Called once before each update.

Public Attributes

MotionPolicy motionPolicy
PositionPolicy positionPolicy
VelocityPolicy velocityPolicy
AnglePolicy anglePolicy
SizePolicy sizePolicy
ColorPolicy colorPolicy
AgePolicy agePolicy
UserPolicy userPolicy

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

The age policy

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

The color policy

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

The motion policy

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

The position policy

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

The size policy

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

The user policy

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 velocity policy


The documentation for this class was generated from the following file:
Generated on Mon Apr 5 19:08:06 2010 for BrickOut |ReDuX| by  doxygen 1.6.3