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

#include <CCPUDoPlacementParticleEventHandler.h>

Inheritance diagram for PUDoPlacementParticleEventHandler:
PUEventHandler PUListener Ref

Public Member Functions

bool isInheritPosition (void) const
 Getters/Setters. More...
 
var isInheritPosition ()
 Getters/Setters. More...
 
local isInheritPosition ()
 Getters/Setters. More...
 
bool isInheritDirection (void) const
var isInheritDirection ()
local isInheritDirection ()
bool isInheritOrientation (void) const
bool isInheritTimeToLive (void) const
var isInheritTimeToLive ()
local isInheritTimeToLive ()
bool isInheritMass (void) const
var isInheritMass ()
local isInheritMass ()
bool isInheritTextureCoordinate (void) const
bool isInheritColour (void) const
var isInheritColour ()
local isInheritColour ()
bool isInheritParticleWidth (void) const
bool isInheritParticleHeight (void) const
var isInheritParticleHeight ()
local isInheritParticleHeight ()
bool isInheritParticleDepth (void) const
var isInheritParticleDepth ()
local isInheritParticleDepth ()
void setInheritPosition (bool inheritPosition)
var setInheritPosition ( var inheritPosition)
local setInheritPosition ( local inheritPosition)
void setInheritDirection (bool inheritDirection)
void setInheritOrientation (bool inheritOrientation)
var setInheritOrientation ( var inheritOrientation)
local setInheritOrientation ( local inheritOrientation)
void setInheritTimeToLive (bool inheritTimeToLive)
var setInheritTimeToLive ( var inheritTimeToLive)
local setInheritTimeToLive ( local inheritTimeToLive)
void setInheritMass (bool inheritMass)
var setInheritMass ( var inheritMass)
local setInheritMass ( local inheritMass)
void setInheritTextureCoordinate (bool inheritTextureCoordinate)
void setInheritColour (bool inheritColour)
void setInheritParticleWidth (bool inheritParticleWidth)
void setInheritParticleHeight (bool inheritParticleHeight)
void setInheritParticleDepth (bool inheritParticleDepth)
var setInheritParticleDepth ( var inheritParticleDepth)
local setInheritParticleDepth ( local inheritParticleDepth)
const std::string & getForceEmitterName (void) const
 Get the name of the emitter that is used to emit its particles. More...
 
local getForceEmitterName ()
 Get the name of the emitter that is used to emit its particles. More...
 
void setForceEmitterName (const std::string &forceEmitterName)
 Set the name of the emitter that is used to emit its particles. More...
 
PUEmittergetForceEmitter (void) const
 Returns a pointer to the emitter that is used as a force emitter. More...
 
void removeAsListener (void)
 Remove this as a listener from the technique. More...
 
var removeAsListener ()
 Remove this as a listener from the technique. More...
 
local removeAsListener ()
 Remove this as a listener from the technique. More...
 
unsigned int getNumberOfParticles (void) const
 Get the number of particles to emit. More...
 
local getNumberOfParticles ()
 Get the number of particles to emit. More...
 
void setNumberOfParticles (unsigned int numberOfParticles)
 Set the number of particles to emit. More...
 
bool alwaysUsePosition (void) const
 Boolean that determines whether always the position of the particle that is handled must be used for emission of the new particle. More...
 
void setAlwaysUsePosition (bool alwaysUsePosition)
 Set the boolean to indicate whether the position of the particle that is handled must be used for emission of the new particle or whether the contact point of the physics actor must be used. More...
 
virtual void handle (PUParticleSystem3D *particleSystem, PUParticle3D *particle, float timeElapsed) override
 If the _handle() function of this class is invoked (by an Observer), it searches the ParticleEmitter defined by the mForceEmitterName. More...
 
local handle ( local particleSystem, local particle, local timeElapsed)
 If the _handle() function of this class is invoked (by an Observer), it searches the ParticleEmitter defined by the mForceEmitterName. More...
 
virtual void particleEmitted (PUParticleSystem3D *particleSystem, PUParticle3D *particle) override
 Initialise the emitted particle. More...
 
virtual void particleExpired (PUParticleSystem3D *particleSystem, PUParticle3D *particle) override
 No implementation. More...
 
virtual void copyAttributesTo (PUEventHandler *eventHandler) override
local copyAttributesTo ( local eventHandler)
virtual ~PUDoPlacementParticleEventHandler (void)
- Public Member Functions inherited from PUEventHandler
const std::string & getName (void) const
 Todo. More...
 
local getName ()
 Todo. More...
 
void setName (const std::string &name)
PUObservergetParentObserver (void) const
 Todo. More...
 
var getParentObserver ()
 Todo. More...
 
local getParentObserver ()
 Todo. More...
 
void setParentObserver (PUObserver *parentObserver)
const std::string & getEventHandlerType (void) const
 Todo. More...
 
local getEventHandlerType ()
 Todo. More...
 
void setEventHandlerType (const std::string &eventHandlerType)
virtual void notifyRescaled (const Vec3 &scale)
 Notify that the event handler is rescaled. More...
 
virtual ~PUEventHandler ()
- 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 Member Functions inherited from PUListener
 PUListener ()
virtual ~PUListener ()

Static Public Member Functions

static
PUDoPlacementParticleEventHandler
create ()
local create ()

Public Attributes

CC_CONSTRUCTOR_ACCESS __pad0__: PUDoPlacementParticleEventHandler(void)
- Public Attributes inherited from PUEventHandler
CC_CONSTRUCTOR_ACCESS __pad0__: PUEventHandler()
var __pad0__: PUEventHandler()
local __pad0__: PUEventHandler()

Static Public Attributes

static const unsigned int DEFAULT_NUMBER_OF_PARTICLES

Protected Attributes

std::string _forceEmitterName
unsigned int _numberOfParticles
var _numberOfParticles
local _numberOfParticles
PUParticleSystem3D_system
 Store the technique value to keep up to speed. More...
 
var _system
 Store the technique value to keep up to speed. More...
 
local _system
 Store the technique value to keep up to speed. More...
 
PUEmitter_emitter
 Store the emitter value to keep up to speed. More...
 
var _emitter
 Store the emitter value to keep up to speed. More...
 
local _emitter
 Store the emitter value to keep up to speed. More...
 
bool _found
 Used to determine whether the emitter used by the DoPlacementParticleEventHandler, is already found. More...
 
var _found
 Used to determine whether the emitter used by the DoPlacementParticleEventHandler, is already found. More...
 
local _found
 Used to determine whether the emitter used by the DoPlacementParticleEventHandler, is already found. More...
 
bool _alwaysUsePosition
 By default the place where to put a new particle is on the position of the particle in the _handle function. More...
 
PUParticle3D_baseParticle
 The base particle from which the attributes are inherited. More...
 
var _baseParticle
 The base particle from which the attributes are inherited. More...
 
local _baseParticle
 The base particle from which the attributes are inherited. More...
 
bool _inheritPosition
 These flags are used to determine which attributes must be inherited from the base particle. More...
 
bool _inheritDirection
var _inheritDirection
local _inheritDirection
bool _inheritOrientation
var _inheritOrientation
local _inheritOrientation
bool _inheritTimeToLive
var _inheritTimeToLive
local _inheritTimeToLive
bool _inheritMass
var _inheritMass
local _inheritMass
bool _inheritTextureCoordinate
bool _inheritColour
var _inheritColour
local _inheritColour
bool _inheritParticleWidth
var _inheritParticleWidth
local _inheritParticleWidth
bool _inheritParticleHeight
var _inheritParticleHeight
local _inheritParticleHeight
bool _inheritParticleDepth
var _inheritParticleDepth
local _inheritParticleDepth
- Protected Attributes inherited from PUEventHandler
PUObserver_parentObserver
std::string _eventHandlerType
std::string _name
Vec3 _eventHandlerScale
 Although the scale is on a Particle System level, the event handler can also be scaled. More...
 
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Additional Inherited Members

- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Constructor & Destructor Documentation

virtual
~PUDoPlacementParticleEventHandler
( void  )
virtual
var
~PUDoPlacementParticleEventHandler
(   )
virtual
local
~PUDoPlacementParticleEventHandler
(   )
virtual

Member Function Documentation

bool alwaysUsePosition ( void  ) const
inline

Boolean that determines whether always the position of the particle that is handled must be used for emission of the new particle.

var alwaysUsePosition (   )
inline

Boolean that determines whether always the position of the particle that is handled must be used for emission of the new particle.

local alwaysUsePosition (   )
inline

Boolean that determines whether always the position of the particle that is handled must be used for emission of the new particle.

virtual void copyAttributesTo ( PUEventHandler eventHandler)
overridevirtual

Reimplemented from PUEventHandler.

var copyAttributesTo ( var  eventHandler)
overridevirtual

Reimplemented from PUEventHandler.

local copyAttributesTo ( local  eventHandler)
overridevirtual

Reimplemented from PUEventHandler.

static
PUDoPlacementParticleEventHandler*
create
( )
static
var create ( )
static
local create ( )
static
PUEmitter* getForceEmitter ( void  ) const

Returns a pointer to the emitter that is used as a force emitter.

var getForceEmitter (   )

Returns a pointer to the emitter that is used as a force emitter.

local getForceEmitter (   )

Returns a pointer to the emitter that is used as a force emitter.

const std::string&
getForceEmitterName
( void  ) const
inline

Get the name of the emitter that is used to emit its particles.

var getForceEmitterName (   )
inline

Get the name of the emitter that is used to emit its particles.

local getForceEmitterName (   )
inline

Get the name of the emitter that is used to emit its particles.

unsigned int getNumberOfParticles ( void  ) const
inline

Get the number of particles to emit.

var getNumberOfParticles (   )
inline

Get the number of particles to emit.

local getNumberOfParticles (   )
inline

Get the number of particles to emit.

virtual void handle ( PUParticleSystem3D particleSystem,
PUParticle3D particle,
float  timeElapsed 
)
overridevirtual

If the _handle() function of this class is invoked (by an Observer), it searches the ParticleEmitter defined by the mForceEmitterName.

This ParticleEmitter is either part of the ParticleTechnique in which the DoPlacementParticleEventHandler is defined, and if the ParticleEmitter is not found, other ParticleTechniques are searched. The ParticleEmitter is 'forced' to emit the requested number of particles.

Implements PUEventHandler.

var handle ( var  particleSystem,
var  particle,
var  timeElapsed 
)
overridevirtual

If the _handle() function of this class is invoked (by an Observer), it searches the ParticleEmitter defined by the mForceEmitterName.

This ParticleEmitter is either part of the ParticleTechnique in which the DoPlacementParticleEventHandler is defined, and if the ParticleEmitter is not found, other ParticleTechniques are searched. The ParticleEmitter is 'forced' to emit the requested number of particles.

Implements PUEventHandler.

local handle ( local  particleSystem,
local  particle,
local  timeElapsed 
)
overridevirtual

If the _handle() function of this class is invoked (by an Observer), it searches the ParticleEmitter defined by the mForceEmitterName.

This ParticleEmitter is either part of the ParticleTechnique in which the DoPlacementParticleEventHandler is defined, and if the ParticleEmitter is not found, other ParticleTechniques are searched. The ParticleEmitter is 'forced' to emit the requested number of particles.

Implements PUEventHandler.

bool isInheritColour ( void  ) const
inline
var isInheritColour (   )
inline
local isInheritColour (   )
inline
bool isInheritDirection ( void  ) const
inline
var isInheritDirection (   )
inline
local isInheritDirection (   )
inline
bool isInheritMass ( void  ) const
inline
var isInheritMass (   )
inline
local isInheritMass (   )
inline
bool isInheritOrientation ( void  ) const
inline
var isInheritOrientation (   )
inline
local isInheritOrientation (   )
inline
bool isInheritParticleDepth ( void  ) const
inline
var isInheritParticleDepth (   )
inline
local isInheritParticleDepth (   )
inline
bool isInheritParticleHeight ( void  ) const
inline
var isInheritParticleHeight (   )
inline
local isInheritParticleHeight (   )
inline
bool isInheritParticleWidth ( void  ) const
inline
var isInheritParticleWidth (   )
inline
local isInheritParticleWidth (   )
inline
bool isInheritPosition ( void  ) const
inline

Getters/Setters.

var isInheritPosition (   )
inline

Getters/Setters.

local isInheritPosition (   )
inline

Getters/Setters.

bool isInheritTextureCoordinate ( void  ) const
inline
var isInheritTextureCoordinate (   )
inline
local isInheritTextureCoordinate (   )
inline
bool isInheritTimeToLive ( void  ) const
inline
var isInheritTimeToLive (   )
inline
local isInheritTimeToLive (   )
inline
virtual void particleEmitted ( PUParticleSystem3D particleSystem,
PUParticle3D particle 
)
overridevirtual

Initialise the emitted particle.

This means that its position is set.

Implements PUListener.

var particleEmitted ( var  particleSystem,
var  particle 
)
overridevirtual

Initialise the emitted particle.

This means that its position is set.

Implements PUListener.

local particleEmitted ( local  particleSystem,
local  particle 
)
overridevirtual

Initialise the emitted particle.

This means that its position is set.

Implements PUListener.

virtual void particleExpired ( PUParticleSystem3D particleSystem,
PUParticle3D particle 
)
inlineoverridevirtual

No implementation.

Implements PUListener.

var particleExpired ( var  particleSystem,
var  particle 
)
inlineoverridevirtual

No implementation.

Implements PUListener.

local particleExpired ( local  particleSystem,
local  particle 
)
inlineoverridevirtual

No implementation.

Implements PUListener.

void removeAsListener ( void  )

Remove this as a listener from the technique.

Remarks
If a new force-emitter name has been set, the removeAsListener must be called, to remove the DoPlacementParticleEventHandler from the old technique (to which the force-emitter belongs. Only then the new force-emitter is used. The reason why it is not called automatically in the setForceEmitterName() funtion is to offer some flexibility on the moment the removeAsListener() is called.
var removeAsListener (   )

Remove this as a listener from the technique.

Remarks
If a new force-emitter name has been set, the removeAsListener must be called, to remove the DoPlacementParticleEventHandler from the old technique (to which the force-emitter belongs. Only then the new force-emitter is used. The reason why it is not called automatically in the setForceEmitterName() funtion is to offer some flexibility on the moment the removeAsListener() is called.
local removeAsListener (   )

Remove this as a listener from the technique.

Remarks
If a new force-emitter name has been set, the removeAsListener must be called, to remove the DoPlacementParticleEventHandler from the old technique (to which the force-emitter belongs. Only then the new force-emitter is used. The reason why it is not called automatically in the setForceEmitterName() funtion is to offer some flexibility on the moment the removeAsListener() is called.
void setAlwaysUsePosition ( bool  alwaysUsePosition)
inline

Set the boolean to indicate whether the position of the particle that is handled must be used for emission of the new particle or whether the contact point of the physics actor must be used.

This only applies if a physics angine is used, otherwise the default is used.

var setAlwaysUsePosition ( var  alwaysUsePosition)
inline

Set the boolean to indicate whether the position of the particle that is handled must be used for emission of the new particle or whether the contact point of the physics actor must be used.

This only applies if a physics angine is used, otherwise the default is used.

local setAlwaysUsePosition ( local  alwaysUsePosition)
inline

Set the boolean to indicate whether the position of the particle that is handled must be used for emission of the new particle or whether the contact point of the physics actor must be used.

This only applies if a physics angine is used, otherwise the default is used.

void setForceEmitterName ( const std::string &  forceEmitterName)

Set the name of the emitter that is used to emit its particles.

var setForceEmitterName ( var  forceEmitterName)

Set the name of the emitter that is used to emit its particles.

local setForceEmitterName ( local  forceEmitterName)

Set the name of the emitter that is used to emit its particles.

void setInheritColour ( bool  inheritColour)
inline
var setInheritColour ( var  inheritColour)
inline
local setInheritColour ( local  inheritColour)
inline
void setInheritDirection ( bool  inheritDirection)
inline
var setInheritDirection ( var  inheritDirection)
inline
local setInheritDirection ( local  inheritDirection)
inline
void setInheritMass ( bool  inheritMass)
inline
var setInheritMass ( var  inheritMass)
inline
local setInheritMass ( local  inheritMass)
inline
void setInheritOrientation ( bool  inheritOrientation)
inline
var setInheritOrientation ( var  inheritOrientation)
inline
local setInheritOrientation ( local  inheritOrientation)
inline
void setInheritParticleDepth ( bool  inheritParticleDepth)
inline
var setInheritParticleDepth ( var  inheritParticleDepth)
inline
local setInheritParticleDepth ( local  inheritParticleDepth)
inline
void setInheritParticleHeight ( bool  inheritParticleHeight)
inline
var setInheritParticleHeight ( var  inheritParticleHeight)
inline
local setInheritParticleHeight ( local  inheritParticleHeight)
inline
void setInheritParticleWidth ( bool  inheritParticleWidth)
inline
var setInheritParticleWidth ( var  inheritParticleWidth)
inline
local setInheritParticleWidth ( local  inheritParticleWidth)
inline
void setInheritPosition ( bool  inheritPosition)
inline
var setInheritPosition ( var  inheritPosition)
inline
local setInheritPosition ( local  inheritPosition)
inline
void setInheritTextureCoordinate ( bool  inheritTextureCoordinate)
inline
var setInheritTextureCoordinate ( var  inheritTextureCoordinate)
inline
local setInheritTextureCoordinate ( local  inheritTextureCoordinate)
inline
void setInheritTimeToLive ( bool  inheritTimeToLive)
inline
var setInheritTimeToLive ( var  inheritTimeToLive)
inline
local setInheritTimeToLive ( local  inheritTimeToLive)
inline
void setNumberOfParticles ( unsigned int  numberOfParticles)
inline

Set the number of particles to emit.

var setNumberOfParticles ( var  numberOfParticles)
inline

Set the number of particles to emit.

local setNumberOfParticles ( local  numberOfParticles)
inline

Set the number of particles to emit.

Member Data Documentation

bool _alwaysUsePosition
protected

By default the place where to put a new particle is on the position of the particle in the _handle function.

If mAlwaysUsePosition is set to false, it tries the contact point of the physics actor that is associated with the particle.

var _alwaysUsePosition
protected

By default the place where to put a new particle is on the position of the particle in the _handle function.

If mAlwaysUsePosition is set to false, it tries the contact point of the physics actor that is associated with the particle.

local _alwaysUsePosition
protected

By default the place where to put a new particle is on the position of the particle in the _handle function.

If mAlwaysUsePosition is set to false, it tries the contact point of the physics actor that is associated with the particle.

PUParticle3D* _baseParticle
protected

The base particle from which the attributes are inherited.

var _baseParticle
protected

The base particle from which the attributes are inherited.

local _baseParticle
protected

The base particle from which the attributes are inherited.

PUEmitter* _emitter
protected

Store the emitter value to keep up to speed.

Remarks
If the ParticleEmitter has been destroyed, the DoPlacementParticleEventHandler isnīt automatically notified. Using the pointer causes an exception.
var _emitter
protected

Store the emitter value to keep up to speed.

Remarks
If the ParticleEmitter has been destroyed, the DoPlacementParticleEventHandler isnīt automatically notified. Using the pointer causes an exception.
local _emitter
protected

Store the emitter value to keep up to speed.

Remarks
If the ParticleEmitter has been destroyed, the DoPlacementParticleEventHandler isnīt automatically notified. Using the pointer causes an exception.
std::string _forceEmitterName
protected
var _forceEmitterName
protected
local _forceEmitterName
protected
bool _found
protected

Used to determine whether the emitter used by the DoPlacementParticleEventHandler, is already found.

var _found
protected

Used to determine whether the emitter used by the DoPlacementParticleEventHandler, is already found.

local _found
protected

Used to determine whether the emitter used by the DoPlacementParticleEventHandler, is already found.

bool _inheritColour
protected
var _inheritColour
protected
local _inheritColour
protected
bool _inheritDirection
protected
var _inheritDirection
protected
local _inheritDirection
protected
bool _inheritMass
protected
var _inheritMass
protected
local _inheritMass
protected
bool _inheritOrientation
protected
var _inheritOrientation
protected
local _inheritOrientation
protected
bool _inheritParticleDepth
protected
var _inheritParticleDepth
protected
local _inheritParticleDepth
protected
bool _inheritParticleHeight
protected
var _inheritParticleHeight
protected
local _inheritParticleHeight
protected
bool _inheritParticleWidth
protected
var _inheritParticleWidth
protected
local _inheritParticleWidth
protected
bool _inheritPosition
protected

These flags are used to determine which attributes must be inherited from the base particle.

var _inheritPosition
protected

These flags are used to determine which attributes must be inherited from the base particle.

local _inheritPosition
protected

These flags are used to determine which attributes must be inherited from the base particle.

bool _inheritTextureCoordinate
protected
var _inheritTextureCoordinate
protected
local _inheritTextureCoordinate
protected
bool _inheritTimeToLive
protected
var _inheritTimeToLive
protected
local _inheritTimeToLive
protected
unsigned int _numberOfParticles
protected
var _numberOfParticles
protected
local _numberOfParticles
protected
PUParticleSystem3D* _system
protected

Store the technique value to keep up to speed.

Remarks
If the ParticleTechnique has been destroyed, the DoPlacementParticleEventHandler isnīt automatically notified. Using the pointer causes an exception.
var _system
protected

Store the technique value to keep up to speed.

Remarks
If the ParticleTechnique has been destroyed, the DoPlacementParticleEventHandler isnīt automatically notified. Using the pointer causes an exception.
local _system
protected

Store the technique value to keep up to speed.

Remarks
If the ParticleTechnique has been destroyed, the DoPlacementParticleEventHandler isnīt automatically notified. Using the pointer causes an exception.
const unsigned int
DEFAULT_NUMBER_OF_PARTICLES
static
var DEFAULT_NUMBER_OF_PARTICLES
static
local DEFAULT_NUMBER_OF_PARTICLES
static

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