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

#include <CCPUOnPositionObserver.h>

Inheritance diagram for PUOnPositionObserver:
PUObserver Ref

Public Member Functions

virtual bool observe (PUParticle3D *particle, float timeElapsed) override
 This function determines whether a condition (the event) is true or false. More...
 
var observe ( var particle, var timeElapsed)
 This function determines whether a condition (the event) is true or false. More...
 
local observe ( local particle, local timeElapsed)
 This function determines whether a condition (the event) is true or false. More...
 
void setPositionXThreshold (float threshold)
void setPositionYThreshold (float threshold)
void setPositionZThreshold (float threshold)
float getPositionXThreshold (void) const
float getPositionYThreshold (void) const
float getPositionZThreshold (void) const
bool isPositionXThresholdSet (void) const
bool isPositionYThresholdSet (void) const
bool isPositionZThresholdSet (void) const
void resetPositionXThreshold (void)
void resetPositionYThreshold (void)
void resetPositionZThreshold (void)
void setComparePositionX (PUComparisionOperator op)
void setComparePositionY (PUComparisionOperator op)
void setComparePositionZ (PUComparisionOperator op)
const PUComparisionOperator getComparePositionX (void) const
local getComparePositionX ()
const PUComparisionOperator getComparePositionY (void) const
var getComparePositionY ()
local getComparePositionY ()
const PUComparisionOperator getComparePositionZ (void) const
local getComparePositionZ ()
virtual void copyAttributesTo (PUObserver *observer) override
virtual ~PUOnPositionObserver (void)
- Public Member Functions inherited from PUObserver
const std::string & getObserverType (void) const
 Todo. More...
 
void setObserverType (const std::string &observerType)
virtual bool isEnabled (void) const
 Todo. More...
 
bool _getOriginalEnabled (void) const
 Returns the 'enabled' value that was set in setEnabled() and not altered during execution. More...
 
virtual void setEnabled (bool enabled)
 Todo. More...
 
void _resetEnabled (void)
 Reset internal values for 'enabled'. More...
 
const std::string & getName (void) const
 Todo. More...
 
void setName (const std::string &name)
const PUParticle3D::ParticleTypegetParticleTypeToObserve (void) const
 Todo. More...
 
local getParticleTypeToObserve ()
 Todo. More...
 
void setParticleTypeToObserve (const PUParticle3D::ParticleType particleTypeToObserve)
virtual void notifyStart (void)
virtual void notifyStop (void)
virtual void notifyRescaled (const Vec3 &scale)
local notifyRescaled ( local scale)
virtual void preUpdateObserver (float deltaTime)
var preUpdateObserver ( var deltaTime)
local preUpdateObserver ( local deltaTime)
virtual void updateObserver (PUParticle3D *particle, float deltaTime, bool firstParticle)
local updateObserver ( local particle, local deltaTime, local firstParticle)
virtual void postUpdateObserver (float deltaTime)
virtual void firstParticleUpdate (PUParticle3D *particle, float deltaTime)
var firstParticleUpdate ( var particle, var deltaTime)
local firstParticleUpdate ( local particle, local deltaTime)
PUEventHandlercreateEventHandler (const std::string &eventHandlerType)
 Todo. More...
 
var createEventHandler ( var eventHandlerType)
 Todo. More...
 
local createEventHandler ( local eventHandlerType)
 Todo. More...
 
void addEventHandler (PUEventHandler *eventHandler)
 Todo. More...
 
void removeEventHandler (PUEventHandler *eventHandler)
 Todo. More...
 
PUEventHandlergetEventHandler (size_t index) const
 Todo. More...
 
var getEventHandler ( var index)
 Todo. More...
 
local getEventHandler ( local index)
 Todo. More...
 
PUEventHandlergetEventHandler (const std::string &eventHandlerName) const
 Todo. More...
 
size_t getNumEventHandlers (void) const
 Todo. More...
 
void destroyEventHandler (PUEventHandler *eventHandler)
 Todo. More...
 
void destroyEventHandler (size_t index)
 Todo. More...
 
void destroyAllEventHandlers (void)
 Todo. More...
 
float getObserverInterval (void) const
 Return the interval value, which defines at what interval the observer is called. More...
 
void setObserverInterval (float observerInterval)
 Set the interval value, which defines at what interval the observer is called. More...
 
bool getObserveUntilEvent (void) const
 Return the value of mObserveUntilEvent. More...
 
void setObserveUntilEvent (bool observeUntilEvent)
 Sets the value of mObserveUntilEvent. More...
 
bool isParticleTypeToObserveSet (void) const
 Returns true if the particle type to observe specifically has been set. More...
 
virtual ~PUObserver (void)
- 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...
 

Static Public Member Functions

static PUOnPositionObservercreate ()
local create ()

Public Attributes

CC_CONSTRUCTOR_ACCESS __pad0__: PUOnPositionObserver(void)
- Public Attributes inherited from PUObserver
CC_CONSTRUCTOR_ACCESS __pad0__: PUObserver(void)

Static Public Attributes

static const Vec3 DEFAULT_POSITION_THRESHOLD
- Static Public Attributes inherited from PUObserver
static const bool DEFAULT_ENABLED
var DEFAULT_ENABLED
local DEFAULT_ENABLED
static const
PUParticle3D::ParticleType 
DEFAULT_PARTICLE_TYPE
static const float DEFAULT_INTERVAL
static const bool DEFAULT_UNTIL_EVENT
var DEFAULT_UNTIL_EVENT
local DEFAULT_UNTIL_EVENT

Protected Attributes

float _positionXThreshold
float _positionYThreshold
float _positionZThreshold
bool _positionXThresholdSet
bool _positionYThresholdSet
bool _positionZThresholdSet
PUComparisionOperator _comparePositionX
var _comparePositionX
local _comparePositionX
PUComparisionOperator _comparePositionY
PUComparisionOperator _comparePositionZ
- Protected Attributes inherited from PUObserver
PUParticleSystem3D_particleSystem
std::string _observerType
std::string _name
bool _enabled
 Determines whether an observer is activated. More...
 
bool _originalEnabled
bool _originalEnabledSet
bool _observe
 Determines whether the _observe() function must be executed. More...
 
bool _observeUntilEvent
 Observes until an event takes place. More...
 
bool _eventHandlersExecuted
 Flag that is set if the event handler(s) are called at least once. More...
 
Vec3 _observerScale
 Although the scale is on a Particle System level, the observer can also be scaled. More...
 
PUParticle3D::ParticleType _particleTypeToObserve
local _particleTypeToObserve
bool _particleTypeToObserveSet
 Determines whether mParticleTypeToObserve is set. More...
 
ParticleEventHandlerList _eventHandlers
float _observerInterval
 Values that determine that the observer is called after every interval. More...
 
float _observerIntervalRemainder
bool _observerIntervalSet
- Protected Attributes inherited from Ref
unsigned int _referenceCount
 count of references More...
 
local _referenceCount
 count of references More...
 

Additional Inherited Members

- Public Types inherited from PUObserver
typedef std::vector
< PUEventHandler * >::iterator 
ParticleEventHandlerIterator
typedef std::vector
< PUEventHandler * >
::const_iterator 
ParticleEventHandlerConstIterator
typedef std::vector
< PUEventHandler * > 
ParticleEventHandlerList
- Protected Member Functions inherited from PUObserver
virtual void handleObserve (PUParticle3D *particle, float timeElapsed)
 Handle the observer implementation. More...
 
local handleObserve ( local particle, local timeElapsed)
 Handle the observer implementation. More...
 
virtual void handleEvent (PUParticle3D *particle, float timeElapsed)
 Handle the event. More...
 
var handleEvent ( var particle, var timeElapsed)
 Handle the event. More...
 
local handleEvent ( local particle, local timeElapsed)
 Handle the event. More...
 
- Protected Member Functions inherited from Ref
 Ref ()
 Constructor. More...
 
 Ref ()
 Constructor. More...
 

Constructor & Destructor Documentation

virtual ~PUOnPositionObserver ( void  )
inlinevirtual
var ~PUOnPositionObserver (   )
inlinevirtual
local ~PUOnPositionObserver (   )
inlinevirtual

Member Function Documentation

virtual void copyAttributesTo ( PUObserver observer)
overridevirtual

Reimplemented from PUObserver.

var copyAttributesTo ( var  observer)
overridevirtual

Reimplemented from PUObserver.

local copyAttributesTo ( local  observer)
overridevirtual

Reimplemented from PUObserver.

static PUOnPositionObserver* create ( )
static
var create ( )
static
local create ( )
static
const PUComparisionOperator
getComparePositionX
( void  ) const
inline
var getComparePositionX (   )
inline
local getComparePositionX (   )
inline
const PUComparisionOperator
getComparePositionY
( void  ) const
inline
var getComparePositionY (   )
inline
local getComparePositionY (   )
inline
const PUComparisionOperator
getComparePositionZ
( void  ) const
inline
var getComparePositionZ (   )
inline
local getComparePositionZ (   )
inline
float getPositionXThreshold ( void  ) const
inline
var getPositionXThreshold (   )
inline
local getPositionXThreshold (   )
inline
float getPositionYThreshold ( void  ) const
inline
var getPositionYThreshold (   )
inline
local getPositionYThreshold (   )
inline
float getPositionZThreshold ( void  ) const
inline
var getPositionZThreshold (   )
inline
local getPositionZThreshold (   )
inline
bool isPositionXThresholdSet ( void  ) const
inline
var isPositionXThresholdSet (   )
inline
local isPositionXThresholdSet (   )
inline
bool isPositionYThresholdSet ( void  ) const
inline
var isPositionYThresholdSet (   )
inline
local isPositionYThresholdSet (   )
inline
bool isPositionZThresholdSet ( void  ) const
inline
var isPositionZThresholdSet (   )
inline
local isPositionZThresholdSet (   )
inline
virtual bool observe ( PUParticle3D particle,
float  timeElapsed 
)
overridevirtual

This function determines whether a condition (the event) is true or false.

Implements PUObserver.

var observe ( var  particle,
var  timeElapsed 
)
overridevirtual

This function determines whether a condition (the event) is true or false.

Implements PUObserver.

local observe ( local  particle,
local  timeElapsed 
)
overridevirtual

This function determines whether a condition (the event) is true or false.

Implements PUObserver.

void resetPositionXThreshold ( void  )
inline
var resetPositionXThreshold (   )
inline
local resetPositionXThreshold (   )
inline
void resetPositionYThreshold ( void  )
inline
var resetPositionYThreshold (   )
inline
local resetPositionYThreshold (   )
inline
void resetPositionZThreshold ( void  )
inline
var resetPositionZThreshold (   )
inline
local resetPositionZThreshold (   )
inline
void setComparePositionX ( PUComparisionOperator  op)
inline
var setComparePositionX ( var  op)
inline
local setComparePositionX ( local  op)
inline
void setComparePositionY ( PUComparisionOperator  op)
inline
var setComparePositionY ( var  op)
inline
local setComparePositionY ( local  op)
inline
void setComparePositionZ ( PUComparisionOperator  op)
inline
var setComparePositionZ ( var  op)
inline
local setComparePositionZ ( local  op)
inline
void setPositionXThreshold ( float  threshold)
inline
var setPositionXThreshold ( var  threshold)
inline
local setPositionXThreshold ( local  threshold)
inline
void setPositionYThreshold ( float  threshold)
inline
var setPositionYThreshold ( var  threshold)
inline
local setPositionYThreshold ( local  threshold)
inline
void setPositionZThreshold ( float  threshold)
inline
var setPositionZThreshold ( var  threshold)
inline
local setPositionZThreshold ( local  threshold)
inline

Member Data Documentation

var __pad0__
local __pad0__
PUComparisionOperator
_comparePositionX
protected
var _comparePositionX
protected
local _comparePositionX
protected
PUComparisionOperator
_comparePositionY
protected
var _comparePositionY
protected
local _comparePositionY
protected
PUComparisionOperator
_comparePositionZ
protected
var _comparePositionZ
protected
local _comparePositionZ
protected
float _positionXThreshold
protected
var _positionXThreshold
protected
local _positionXThreshold
protected
bool _positionXThresholdSet
protected
var _positionXThresholdSet
protected
local _positionXThresholdSet
protected
float _positionYThreshold
protected
var _positionYThreshold
protected
local _positionYThreshold
protected
bool _positionYThresholdSet
protected
var _positionYThresholdSet
protected
local _positionYThresholdSet
protected
float _positionZThreshold
protected
var _positionZThreshold
protected
local _positionZThreshold
protected
bool _positionZThresholdSet
protected
var _positionZThresholdSet
protected
local _positionZThresholdSet
protected
const Vec3
DEFAULT_POSITION_THRESHOLD
static
var DEFAULT_POSITION_THRESHOLD
static
local DEFAULT_POSITION_THRESHOLD
static

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