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

#include <CCPUForceFieldAffector.h>

Inheritance diagram for PUForceFieldAffector:
PUAffector Particle3DAffector Ref

Public Member Functions

virtual void notifyStart () override
virtual void preUpdateAffector (float deltaTime) override
local preUpdateAffector ( local deltaTime)
virtual void updatePUAffector (PUParticle3D *particle, float deltaTime) override
local updatePUAffector ( local particle, local deltaTime)
virtual void prepare () override
var prepare ()
local prepare ()
const PUForceField::ForceFieldType getForceFieldType (void) const
 Get/Set Forcefield type. More...
 
local getForceFieldType ()
 Get/Set Forcefield type. More...
 
void setForceFieldType (const PUForceField::ForceFieldType forceFieldType)
float getDelta (void) const
 Get/Set Delta. More...
 
void setDelta (float delta)
float getScaleForce (void) const
 Get/Set scale Force. More...
 
void setScaleForce (float scaleForce)
unsigned short getOctaves (void) const
 Get/Set scale Octaves. More...
 
void setOctaves (unsigned short octaves)
double getFrequency (void) const
 Get/Set scale Frequency. More...
 
void setFrequency (double frequency)
double getAmplitude (void) const
 Get/Set scale Amplitude. More...
 
void setAmplitude (double amplitude)
double getPersistence (void) const
 Get/Set scale Persistence. More...
 
void setPersistence (double persistence)
unsigned int getForceFieldSize (void) const
 Get/Set scale ForceFieldSize. More...
 
void setForceFieldSize (unsigned int forceFieldSize)
Vec3 getWorldSize (void) const
 Get/Set scale worldSize. More...
 
void setWorldSize (const Vec3 &worldSize)
bool getIgnoreNegativeX (void) const
 Get/Set scale flip attributes. More...
 
void setIgnoreNegativeX (bool ignoreNegativeX)
bool getIgnoreNegativeY (void) const
var getIgnoreNegativeY ()
local getIgnoreNegativeY ()
void setIgnoreNegativeY (bool ignoreNegativeY)
local setIgnoreNegativeY ( local ignoreNegativeY)
bool getIgnoreNegativeZ (void) const
var getIgnoreNegativeZ ()
local getIgnoreNegativeZ ()
void setIgnoreNegativeZ (bool ignoreNegativeZ)
const Vec3getMovement (void) const
 Get/Set Movement. More...
 
void setMovement (const Vec3 &movement)
float getMovementFrequency (void) const
 Get/Set Movement frequency. More...
 
void setMovementFrequency (float movementFrequency)
void suppressGeneration (bool suppress)
 Suppress (re)generation of the forcefield everytime an attribute is changed. More...
 
virtual void copyAttributesTo (PUAffector *affector) override
 ~PUForceFieldAffector ()
- Public Member Functions inherited from PUAffector
virtual void notifyStop ()
virtual void notifyPause ()
virtual void notifyResume ()
virtual void notifyRescaled (const Vec3 &scale)
local notifyRescaled ( local scale)
virtual void unPrepare ()
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 ~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...
 

Static Public Member Functions

static PUForceFieldAffectorcreate ()
local create ()

Public Attributes

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

Static Public Attributes

static const
PUForceField::ForceFieldType 
DEFAULT_FORCEFIELD_TYPE
static const float DEFAULT_DELTA
static const float DEFAULT_FORCE
var DEFAULT_FORCE
local DEFAULT_FORCE
static const unsigned short DEFAULT_OCTAVES
static const double DEFAULT_FREQUENCY
var DEFAULT_FREQUENCY
local DEFAULT_FREQUENCY
static const double DEFAULT_AMPLITUDE
static const double DEFAULT_PERSISTENCE
static const unsigned int DEFAULT_FORCEFIELDSIZE
static const Vec3 DEFAULT_WORLDSIZE
var DEFAULT_WORLDSIZE
local DEFAULT_WORLDSIZE
static const Vec3 DEFAULT_MOVEMENT
static const float DEFAULT_MOVEMENT_FREQUENCY

Protected Attributes

PUForceField _forceField
PUForceField::ForceFieldType _forceFieldType
var _forceFieldType
local _forceFieldType
float _delta
Vec3 _force
float _scaleForce
unsigned short _octaves
double _frequency
double _amplitude
double _persistence
unsigned int _forceFieldSize
Vec3 _worldSize
bool _prepared
bool _ignoreNegativeX
bool _ignoreNegativeY
bool _ignoreNegativeZ
Vec3 _movement
bool _movementSet
float _movementFrequency
float _movementFrequencyCount
Vec3 _displacement
Vec3 _basePosition
bool _suppressGeneration
- Protected Attributes inherited from PUAffector
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...
 

Additional Inherited Members

- Public Types inherited from PUAffector
enum  AffectSpecialisation { AFSP_DEFAULT, AFSP_TTL_INCREASE, AFSP_TTL_DECREASE }
 The AffectSpecialisation enumeration is used to specialise the affector even more. More...
 
- Protected Member Functions inherited from PUAffector
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...
 

Constructor & Destructor Documentation

Member Function Documentation

virtual void copyAttributesTo ( PUAffector affector)
overridevirtual

Reimplemented from PUAffector.

var copyAttributesTo ( var  affector)
overridevirtual

Reimplemented from PUAffector.

local copyAttributesTo ( local  affector)
overridevirtual

Reimplemented from PUAffector.

static PUForceFieldAffector* create ( )
static
var create ( )
static
local create ( )
static
double getAmplitude ( void  ) const

Get/Set scale Amplitude.

var getAmplitude (   )

Get/Set scale Amplitude.

local getAmplitude (   )

Get/Set scale Amplitude.

float getDelta ( void  ) const

Get/Set Delta.

var getDelta (   )

Get/Set Delta.

local getDelta (   )

Get/Set Delta.

unsigned int getForceFieldSize ( void  ) const

Get/Set scale ForceFieldSize.

var getForceFieldSize (   )

Get/Set scale ForceFieldSize.

local getForceFieldSize (   )

Get/Set scale ForceFieldSize.

const
PUForceField::ForceFieldType
getForceFieldType
( void  ) const

Get/Set Forcefield type.

var getForceFieldType (   )

Get/Set Forcefield type.

local getForceFieldType (   )

Get/Set Forcefield type.

double getFrequency ( void  ) const

Get/Set scale Frequency.

var getFrequency (   )

Get/Set scale Frequency.

local getFrequency (   )

Get/Set scale Frequency.

bool getIgnoreNegativeX ( void  ) const

Get/Set scale flip attributes.

var getIgnoreNegativeX (   )

Get/Set scale flip attributes.

local getIgnoreNegativeX (   )

Get/Set scale flip attributes.

bool getIgnoreNegativeY ( void  ) const
var getIgnoreNegativeY (   )
local getIgnoreNegativeY (   )
bool getIgnoreNegativeZ ( void  ) const
var getIgnoreNegativeZ (   )
local getIgnoreNegativeZ (   )
const Vec3& getMovement ( void  ) const

Get/Set Movement.

Remarks
The movement vector determines the position of the movement. This movement is a displacement of the particle position mapped to the forcefield.
var getMovement (   )

Get/Set Movement.

Remarks
The movement vector determines the position of the movement. This movement is a displacement of the particle position mapped to the forcefield.
local getMovement (   )

Get/Set Movement.

Remarks
The movement vector determines the position of the movement. This movement is a displacement of the particle position mapped to the forcefield.
float getMovementFrequency ( void  ) const

Get/Set Movement frequency.

var getMovementFrequency (   )

Get/Set Movement frequency.

local getMovementFrequency (   )

Get/Set Movement frequency.

unsigned short getOctaves ( void  ) const

Get/Set scale Octaves.

var getOctaves (   )

Get/Set scale Octaves.

local getOctaves (   )

Get/Set scale Octaves.

double getPersistence ( void  ) const

Get/Set scale Persistence.

var getPersistence (   )

Get/Set scale Persistence.

local getPersistence (   )

Get/Set scale Persistence.

float getScaleForce ( void  ) const

Get/Set scale Force.

var getScaleForce (   )

Get/Set scale Force.

local getScaleForce (   )

Get/Set scale Force.

Vec3 getWorldSize ( void  ) const

Get/Set scale worldSize.

var getWorldSize (   )

Get/Set scale worldSize.

local getWorldSize (   )

Get/Set scale worldSize.

virtual void notifyStart ( )
overridevirtual

Reimplemented from PUAffector.

var notifyStart ( )
overridevirtual

Reimplemented from PUAffector.

local notifyStart ( )
overridevirtual

Reimplemented from PUAffector.

virtual void prepare ( )
overridevirtual

Reimplemented from PUAffector.

var prepare ( )
overridevirtual

Reimplemented from PUAffector.

local prepare ( )
overridevirtual

Reimplemented from PUAffector.

virtual void preUpdateAffector ( float  deltaTime)
overridevirtual

Reimplemented from PUAffector.

var preUpdateAffector ( var  deltaTime)
overridevirtual

Reimplemented from PUAffector.

local preUpdateAffector ( local  deltaTime)
overridevirtual

Reimplemented from PUAffector.

void setAmplitude ( double  amplitude)
var setAmplitude ( var  amplitude)
local setAmplitude ( local  amplitude)
void setDelta ( float  delta)
var setDelta ( var  delta)
local setDelta ( local  delta)
void setForceFieldSize ( unsigned int  forceFieldSize)
var setForceFieldSize ( var  forceFieldSize)
local setForceFieldSize ( local  forceFieldSize)
void setForceFieldType ( const PUForceField::ForceFieldType  forceFieldType)
var setForceFieldType ( var  forceFieldType)
local setForceFieldType ( local  forceFieldType)
void setFrequency ( double  frequency)
var setFrequency ( var  frequency)
local setFrequency ( local  frequency)
void setIgnoreNegativeX ( bool  ignoreNegativeX)
var setIgnoreNegativeX ( var  ignoreNegativeX)
local setIgnoreNegativeX ( local  ignoreNegativeX)
void setIgnoreNegativeY ( bool  ignoreNegativeY)
var setIgnoreNegativeY ( var  ignoreNegativeY)
local setIgnoreNegativeY ( local  ignoreNegativeY)
void setIgnoreNegativeZ ( bool  ignoreNegativeZ)
var setIgnoreNegativeZ ( var  ignoreNegativeZ)
local setIgnoreNegativeZ ( local  ignoreNegativeZ)
void setMovement ( const Vec3 movement)
var setMovement ( var  movement)
local setMovement ( local  movement)
void setMovementFrequency ( float  movementFrequency)
var setMovementFrequency ( var  movementFrequency)
local setMovementFrequency ( local  movementFrequency)
void setOctaves ( unsigned short  octaves)
var setOctaves ( var  octaves)
local setOctaves ( local  octaves)
void setPersistence ( double  persistence)
var setPersistence ( var  persistence)
local setPersistence ( local  persistence)
void setScaleForce ( float  scaleForce)
var setScaleForce ( var  scaleForce)
local setScaleForce ( local  scaleForce)
void setWorldSize ( const Vec3 worldSize)
var setWorldSize ( var  worldSize)
local setWorldSize ( local  worldSize)
void suppressGeneration ( bool  suppress)

Suppress (re)generation of the forcefield everytime an attribute is changed.

var suppressGeneration ( var  suppress)

Suppress (re)generation of the forcefield everytime an attribute is changed.

local suppressGeneration ( local  suppress)

Suppress (re)generation of the forcefield everytime an attribute is changed.

virtual void updatePUAffector ( PUParticle3D particle,
float  deltaTime 
)
overridevirtual

Reimplemented from PUAffector.

var updatePUAffector ( var  particle,
var  deltaTime 
)
overridevirtual

Reimplemented from PUAffector.

local updatePUAffector ( local  particle,
local  deltaTime 
)
overridevirtual

Reimplemented from PUAffector.

Member Data Documentation

var __pad0__
local __pad0__
double _amplitude
protected
var _amplitude
protected
local _amplitude
protected
Vec3 _basePosition
protected
var _basePosition
protected
local _basePosition
protected
float _delta
protected
var _delta
protected
local _delta
protected
Vec3 _displacement
protected
var _displacement
protected
local _displacement
protected
Vec3 _force
protected
var _force
protected
local _force
protected
PUForceField _forceField
protected
var _forceField
protected
local _forceField
protected
unsigned int _forceFieldSize
protected
var _forceFieldSize
protected
local _forceFieldSize
protected
PUForceField::ForceFieldType
_forceFieldType
protected
var _forceFieldType
protected
local _forceFieldType
protected
double _frequency
protected
var _frequency
protected
local _frequency
protected
bool _ignoreNegativeX
protected
var _ignoreNegativeX
protected
local _ignoreNegativeX
protected
bool _ignoreNegativeY
protected
var _ignoreNegativeY
protected
local _ignoreNegativeY
protected
bool _ignoreNegativeZ
protected
var _ignoreNegativeZ
protected
local _ignoreNegativeZ
protected
Vec3 _movement
protected
var _movement
protected
local _movement
protected
float _movementFrequency
protected
var _movementFrequency
protected
local _movementFrequency
protected
float _movementFrequencyCount
protected
var _movementFrequencyCount
protected
local _movementFrequencyCount
protected
bool _movementSet
protected
var _movementSet
protected
local _movementSet
protected
unsigned short _octaves
protected
var _octaves
protected
local _octaves
protected
double _persistence
protected
var _persistence
protected
local _persistence
protected
bool _prepared
protected
var _prepared
protected
local _prepared
protected
float _scaleForce
protected
var _scaleForce
protected
local _scaleForce
protected
bool _suppressGeneration
protected
var _suppressGeneration
protected
local _suppressGeneration
protected
Vec3 _worldSize
protected
var _worldSize
protected
local _worldSize
protected
const double DEFAULT_AMPLITUDE
static
var DEFAULT_AMPLITUDE
static
local DEFAULT_AMPLITUDE
static
const float DEFAULT_DELTA
static
var DEFAULT_DELTA
static
local DEFAULT_DELTA
static
const float DEFAULT_FORCE
static
var DEFAULT_FORCE
static
local DEFAULT_FORCE
static
const
PUForceField::ForceFieldType
DEFAULT_FORCEFIELD_TYPE
static
var DEFAULT_FORCEFIELD_TYPE
static
local DEFAULT_FORCEFIELD_TYPE
static
const unsigned int
DEFAULT_FORCEFIELDSIZE
static
var DEFAULT_FORCEFIELDSIZE
static
local DEFAULT_FORCEFIELDSIZE
static
const double DEFAULT_FREQUENCY
static
var DEFAULT_FREQUENCY
static
local DEFAULT_FREQUENCY
static
const Vec3 DEFAULT_MOVEMENT
static
var DEFAULT_MOVEMENT
static
local DEFAULT_MOVEMENT
static
const float
DEFAULT_MOVEMENT_FREQUENCY
static
var DEFAULT_MOVEMENT_FREQUENCY
static
local DEFAULT_MOVEMENT_FREQUENCY
static
const unsigned short
DEFAULT_OCTAVES
static
var DEFAULT_OCTAVES
static
local DEFAULT_OCTAVES
static
const double DEFAULT_PERSISTENCE
static
var DEFAULT_PERSISTENCE
static
local DEFAULT_PERSISTENCE
static
const Vec3 DEFAULT_WORLDSIZE
static
var DEFAULT_WORLDSIZE
static
local DEFAULT_WORLDSIZE
static

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