cocos2d-x  3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PUAffector Class Reference

#include <CCPUAffector.h>

Inheritance diagram for PUAffector:
Particle3DAffector Ref PUAlignAffector PUBaseCollider PUBaseForceAffector PUCollisionAvoidanceAffector PUColorAffector PUFlockCenteringAffector PUForceFieldAffector PUGeometryRotator PUGravityAffector PUJetAffector PULineAffector PUParticleFollower PUPathFollower PURandomiser PUScaleAffector PUScaleVelocityAffector PUTextureAnimator PUTextureRotator PUVelocityMatchingAffector PUVortexAffector

Public Types

enum  AffectSpecialisation { AFSP_DEFAULT, AFSP_TTL_INCREASE, AFSP_TTL_DECREASE }
 The AffectSpecialisation enumeration is used to specialise the affector even more. More...
 

Public Member Functions

virtual void notifyStart ()
virtual void notifyStop ()
virtual void notifyPause ()
virtual void notifyResume ()
virtual void notifyRescaled (const Vec3 &scale)
local notifyRescaled ( local scale)
virtual void prepare ()
virtual void unPrepare ()
virtual void preUpdateAffector (float deltaTime)
local preUpdateAffector ( local deltaTime)
virtual void updatePUAffector (PUParticle3D *particle, float delta)
local updatePUAffector ( local particle, local delta)
virtual void postUpdateAffector (float deltaTime)
virtual void firstParticleUpdate (PUParticle3D *particle, float deltaTime)
var firstParticleUpdate ( var particle, var deltaTime)
local firstParticleUpdate ( local particle, local deltaTime)
virtual void initParticleForEmission (PUParticle3D *particle)
var initParticleForEmission ( var particle)
local initParticleForEmission ( local particle)
void process (PUParticle3D *particle, float delta, bool firstParticle)
void setLocalPosition (const Vec3 &pos)
const Vec3 getLocalPosition () const
void setMass (float mass)
float getMass () const
const Vec3getDerivedPosition ()
 Calculate the derived position of the affector. More...
 
local getDerivedPosition ()
 Calculate the derived position of the affector. More...
 
const AffectSpecialisationgetAffectSpecialisation (void) const
 Todo. More...
 
local getAffectSpecialisation ()
 Todo. More...
 
void setAffectSpecialisation (const AffectSpecialisation &affectSpecialisation)
const std::string & getAffectorType (void) const
 Todo. More...
 
void setAffectorType (const std::string &affectorType)
void addEmitterToExclude (const std::string &emitterName)
 Add a ParticleEmitter name that excludes Particles emitted by this ParticleEmitter from being affected. More...
 
void removeEmitterToExclude (const std::string &emitterName)
 Remove a ParticleEmitter name that excludes Particles emitted by this ParticleEmitter. More...
 
const std::string & getName (void) const
 Todo. More...
 
void setName (const std::string &name)
virtual void copyAttributesTo (PUAffector *affector)
var copyAttributesTo ( var affector)
local copyAttributesTo ( local affector)
virtual ~PUAffector ()
- Public Member Functions inherited from Particle3DAffector
virtual void updateAffector (Particle3D *particle, float deltaTime)
void setEnabled (bool enabled)
 Enables or disables the emitter. More...
 
bool isEnabled (void) const
virtual ~Particle3DAffector ()
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor. More...
 

Public Attributes

CC_CONSTRUCTOR_ACCESS __pad0__: PUAffector()
- Public Attributes inherited from Particle3DAffector
CC_CONSTRUCTOR_ACCESS __pad0__: Particle3DAffector()

Protected Member Functions

float calculateAffectSpecialisationFactor (const PUParticle3D *particle)
var calculateAffectSpecialisationFactor ( var particle)
local calculateAffectSpecialisationFactor ( local particle)
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Protected Attributes

Vec3 _position
Vec3 _affectorScale
 Although the scale is on a Particle System level, the affector can also be scaled. More...
 
Vec3 _derivedPosition
 Because the public attribute ´position?is sometimes used for both localspace and worldspace position, the mDerivedPosition attribute is introduced. More...
 
AffectSpecialisation _affectSpecialisation
 The mAffectSpecialisation is used to specialise the affector. More...
 
std::string _affectorType
std::vector< std::string > _excludedEmitters
var _excludedEmitters
local _excludedEmitters
std::string _name
float _mass
- Protected Attributes inherited from Particle3DAffector
ParticleSystem3D_particleSystem
bool _isEnabled
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Friends

class PUParticleSystem3D

Member Enumeration Documentation

The AffectSpecialisation enumeration is used to specialise the affector even more.

This enumeration isn't used by all affectors; in some cases it isn't even applicable.

Enumerator
AFSP_DEFAULT 
AFSP_TTL_INCREASE 
AFSP_TTL_DECREASE 

The AffectSpecialisation enumeration is used to specialise the affector even more.

This enumeration isn't used by all affectors; in some cases it isn't even applicable.

Enumerator
AFSP_DEFAULT 
AFSP_TTL_INCREASE 
AFSP_TTL_DECREASE 

The AffectSpecialisation enumeration is used to specialise the affector even more.

This enumeration isn't used by all affectors; in some cases it isn't even applicable.

Enumerator
AFSP_DEFAULT 
AFSP_TTL_INCREASE 
AFSP_TTL_DECREASE 

Constructor & Destructor Documentation

virtual ~PUAffector ( )
virtual
var ~PUAffector ( )
virtual
local ~PUAffector ( )
virtual

Member Function Documentation

void addEmitterToExclude ( const std::string &  emitterName)

Add a ParticleEmitter name that excludes Particles emitted by this ParticleEmitter from being affected.

var addEmitterToExclude ( var  emitterName)

Add a ParticleEmitter name that excludes Particles emitted by this ParticleEmitter from being affected.

local addEmitterToExclude ( local  emitterName)

Add a ParticleEmitter name that excludes Particles emitted by this ParticleEmitter from being affected.

float
calculateAffectSpecialisationFactor
( const PUParticle3D particle)
protected
var
calculateAffectSpecialisationFactor
( var  particle)
protected
local
calculateAffectSpecialisationFactor
( local  particle)
protected
virtual void firstParticleUpdate ( PUParticle3D particle,
float  deltaTime 
)
virtual
var firstParticleUpdate ( var  particle,
var  deltaTime 
)
virtual
local firstParticleUpdate ( local  particle,
local  deltaTime 
)
virtual
const std::string& getAffectorType ( void  ) const
inline

Todo.

var getAffectorType (   )
inline

Todo.

local getAffectorType (   )
inline

Todo.

const AffectSpecialisation&
getAffectSpecialisation
( void  ) const
inline

Todo.

var getAffectSpecialisation (   )
inline

Todo.

local getAffectSpecialisation (   )
inline

Todo.

const Vec3& getDerivedPosition ( )

Calculate the derived position of the affector.

Remarks
Note, that in script, the position is set as localspace, while if the affector is emitted, its position is automatically transformed. This function always returns the derived position.
var getDerivedPosition ( )

Calculate the derived position of the affector.

Remarks
Note, that in script, the position is set as localspace, while if the affector is emitted, its position is automatically transformed. This function always returns the derived position.
local getDerivedPosition ( )

Calculate the derived position of the affector.

Remarks
Note, that in script, the position is set as localspace, while if the affector is emitted, its position is automatically transformed. This function always returns the derived position.
const Vec3 getLocalPosition ( ) const
inline
var getLocalPosition ( )
inline
local getLocalPosition ( )
inline
float getMass ( ) const
var getMass ( )
local getMass ( )
const std::string& getName ( void  ) const
inline

Todo.

var getName (   )
inline

Todo.

local getName (   )
inline

Todo.

virtual void
initParticleForEmission
( PUParticle3D particle)
virtual
var initParticleForEmission ( var  particle)
virtual
local initParticleForEmission ( local  particle)
virtual
virtual void notifyPause ( )
virtual
var notifyPause ( )
virtual
local notifyPause ( )
virtual
virtual void notifyRescaled ( const Vec3 scale)
virtual

Reimplemented in PULineAffector, and PUPlaneCollider.

var notifyRescaled ( var  scale)
virtual

Reimplemented in PULineAffector, and PUPlaneCollider.

local notifyRescaled ( local  scale)
virtual

Reimplemented in PULineAffector, and PUPlaneCollider.

virtual void notifyResume ( )
virtual
var notifyResume ( )
virtual
local notifyResume ( )
virtual
virtual void notifyStart ( )
virtual

Reimplemented in PUForceFieldAffector.

var notifyStart ( )
virtual

Reimplemented in PUForceFieldAffector.

local notifyStart ( )
virtual

Reimplemented in PUForceFieldAffector.

virtual void notifyStop ( )
virtual
var notifyStop ( )
virtual
local notifyStop ( )
virtual
virtual void postUpdateAffector ( float  deltaTime)
virtual

Reimplemented in PULineAffector, and PURandomiser.

var postUpdateAffector ( var  deltaTime)
virtual

Reimplemented in PULineAffector, and PURandomiser.

local postUpdateAffector ( local  deltaTime)
virtual

Reimplemented in PULineAffector, and PURandomiser.

virtual void prepare ( )
virtual
var prepare ( )
virtual
local prepare ( )
virtual
void process ( PUParticle3D particle,
float  delta,
bool  firstParticle 
)
var process ( var  particle,
var  delta,
var  firstParticle 
)
local process ( local  particle,
local  delta,
local  firstParticle 
)
void removeEmitterToExclude ( const std::string &  emitterName)

Remove a ParticleEmitter name that excludes Particles emitted by this ParticleEmitter.

var removeEmitterToExclude ( var  emitterName)

Remove a ParticleEmitter name that excludes Particles emitted by this ParticleEmitter.

local removeEmitterToExclude ( local  emitterName)

Remove a ParticleEmitter name that excludes Particles emitted by this ParticleEmitter.

void setAffectorType ( const std::string &  affectorType)
inline
var setAffectorType ( var  affectorType)
inline
local setAffectorType ( local  affectorType)
inline
void setAffectSpecialisation ( const AffectSpecialisation affectSpecialisation)
inline
var setAffectSpecialisation ( var  affectSpecialisation)
inline
local setAffectSpecialisation ( local  affectSpecialisation)
inline
void setLocalPosition ( const Vec3 pos)
inline
var setLocalPosition ( var  pos)
inline
local setLocalPosition ( local  pos)
inline
void setMass ( float  mass)
var setMass ( var  mass)
local setMass ( local  mass)
void setName ( const std::string &  name)
inline
var setName ( var  name)
inline
local setName ( local  name)
inline
virtual void unPrepare ( )
virtual
var unPrepare ( )
virtual
local unPrepare ( )
virtual

Friends And Related Function Documentation

friend class PUParticleSystem3D
friend
var PUParticleSystem3D
friend
local PUParticleSystem3D
friend

Member Data Documentation

var __pad0__
local __pad0__
Vec3 _affectorScale
protected

Although the scale is on a Particle System level, the affector can also be scaled.

var _affectorScale
protected

Although the scale is on a Particle System level, the affector can also be scaled.

local _affectorScale
protected

Although the scale is on a Particle System level, the affector can also be scaled.

std::string _affectorType
protected
var _affectorType
protected
local _affectorType
protected
AffectSpecialisation
_affectSpecialisation
protected

The mAffectSpecialisation is used to specialise the affector.

This attribute is comparable with the mAutoDirection of the ParticleEmitter, it is an optional attribute and used in some of the Particle Affectors.

var _affectSpecialisation
protected

The mAffectSpecialisation is used to specialise the affector.

This attribute is comparable with the mAutoDirection of the ParticleEmitter, it is an optional attribute and used in some of the Particle Affectors.

local _affectSpecialisation
protected

The mAffectSpecialisation is used to specialise the affector.

This attribute is comparable with the mAutoDirection of the ParticleEmitter, it is an optional attribute and used in some of the Particle Affectors.

Vec3 _derivedPosition
protected

Because the public attribute ´position?is sometimes used for both localspace and worldspace position, the mDerivedPosition attribute is introduced.

var _derivedPosition
protected

Because the public attribute ´position?is sometimes used for both localspace and worldspace position, the mDerivedPosition attribute is introduced.

local _derivedPosition
protected

Because the public attribute ´position?is sometimes used for both localspace and worldspace position, the mDerivedPosition attribute is introduced.

std::vector<std::string>
_excludedEmitters
protected
var _excludedEmitters
protected
local _excludedEmitters
protected
float _mass
protected
var _mass
protected
local _mass
protected
std::string _name
protected
var _name
protected
local _name
protected
Vec3 _position
protected
var _position
protected
local _position
protected

The documentation for this class was generated from the following file: