AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzActorParticle Struct Reference

A particle. More...

#include <CzActorParticles.h>

List of all members.

Public Member Functions

 CzActorParticle ()
virtual ~CzActorParticle ()
void Update (float dt)
 Updates this particle.
void CopyToOld ()
 Makes a copy of particle transient data.
void CopyFromOld ()
 Restores particle transient data. Used to reset a particle.
CzActorParticleClone ()
 Clones the oarticle.
bool setProperty (unsigned int property_name, const CzXomlProperty &data, bool delta)
 Sets the named property of the particle.
bool setProperty (unsigned int property_name, const CzString &data, bool delta)
 Sets the named property of the particle.
bool getProperty (unsigned int property_name, CzXomlProperty &prop)
 Gets the named property of the property.

Static Public Member Functions

static void InitClass ()
 Initialises the class.
static void ReleaseClass ()
static bool _setPosition (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getPosition (IzXomlResource *target)
static bool _setSize (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getSize (IzXomlResource *target)
static bool _setVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getVelocity (IzXomlResource *target)
static bool _setVelocityDamping (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getVelocityDamping (IzXomlResource *target)
static bool _setGravity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getGravity (IzXomlResource *target)
static bool _setScale (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getScale (IzXomlResource *target)
static bool _setScaleVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getScaleVelocity (IzXomlResource *target)
static bool _setScaleVelocityDamping (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getScaleVelocityDamping (IzXomlResource *target)
static bool _setAngle (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getAngle (IzXomlResource *target)
static bool _setAngularVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getAngularVelocity (IzXomlResource *target)
static bool _setAngularVelocityDamping (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getAngularVelocityDamping (IzXomlResource *target)
static bool _setColour (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getColour (IzXomlResource *target)
static bool _setColourVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getColourVelocity (IzXomlResource *target)
static bool _setColourVelocityDamping (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getColourVelocityDamping (IzXomlResource *target)
static bool _setDepth (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getDepth (IzXomlResource *target)
static bool _setDepthVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getDepthVelocity (IzXomlResource *target)
static bool _setDepthVelocityDamping (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getDepthVelocityDamping (IzXomlResource *target)
static bool _setActive (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getActive (IzXomlResource *target)
static bool _setVisible (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getVisible (IzXomlResource *target)
static bool _setLifeSpan (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getLifeSpan (IzXomlResource *target)
static bool _setSpawnDelay (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getSpawnDelay (IzXomlResource *target)
static bool _setLifeTime (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getLifeTime (IzXomlResource *target)
static bool _setLives (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getLives (IzXomlResource *target)
static bool _setOPosition (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getOPosition (IzXomlResource *target)
static bool _setOVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getOVelocity (IzXomlResource *target)
static bool _setOScale (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getOScale (IzXomlResource *target)
static bool _setOScaleVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getOScaleVelocity (IzXomlResource *target)
static bool _setOAngle (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getOAngle (IzXomlResource *target)
static bool _setOAngularVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getOAngularVelocity (IzXomlResource *target)
static bool _setOColour (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getOColour (IzXomlResource *target)
static bool _setOColourVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getOColourVelocity (IzXomlResource *target)
static bool _setODepth (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getODepth (IzXomlResource *target)
static bool _setODepthVelocity (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getODepthVelocity (IzXomlResource *target)
static bool _setAttached (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getAttached (IzXomlResource *target)
static bool _setSrcRect (IzXomlResource *target, const CzXomlProperty &prop, bool add)
static CzXomlProperty _getSrcRect (IzXomlResource *target)

Public Attributes

CzActorParticlesParent
 Particles parent emitter.
CzBitmapSpriteVisual
 Visual element that represents the particle.
CzVec2 Position
 Position relative to particle system actor.
CzVec2 Velocity
 Velocity of particle.
CzVec2 VelocityDamping
 Velocity damping for particle.
CzVec2 Gravity
 Gravitational acceleration.
CzVec2 Scale
 Scale of particle.
CzVec2 ScaleVelocity
 Scale velocity of particle.
CzVec2 ScaleVelocityDamping
 Scale velocity of particle.
float Angle
 Rotation of particle.
float AngularVelocity
 Rotation of particle.
float AngularVelocityDamping
 Rotation of particle.
CzVec4 Colour
 Particle colour.
CzVec4 ColourVelocity
 Particle colour velocity.
CzVec4 ColourVelocityDamping
 Particle colour velocity damping.
float Depth
 Depth of particle.
float DepthVelocity
 Depth velocity of particle.
float DepthVelocityDamping
 Depth velocity damping of particle.
bool Active
 Active state.
bool Visible
 Visible state.
float LifeSpan
 Total duration of particle in seconds.
float SpawnDelay
 Amount of time to wait before spawning in seconds.
float LifeTime
 Current life time in seconds.
int Lives
 Number of lives for particle (how time it will be respawned)
CzVec2 OPosition
 Original Position relative to particle system actor.
CzVec2 OVelocity
 Original Velocity of particle.
CzVec2 OScale
 Original Scale of particle.
CzVec2 OScaleVelocity
 Original Scale velocity of particle.
float OAngle
 Original Rotation of particle.
float OAngularVelocity
 Original Rotation veloxity of particle.
CzVec4 OColour
 Original Particle colour.
CzVec4 OColourVelocity
 Original Particle colour velocity.
float ODepth
 Original Depth of particle.
float ODepthVelocity
 Original Depth velocity of particle.
bool Attached
 Attached particles will follow the particle actor.

Static Protected Attributes

static CzXomlClassDefActorParticleClassDef = NULL

Detailed Description

A particle.


Constructor & Destructor Documentation


Member Function Documentation

bool CzActorParticle::_setActive ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setAngle ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setAngularVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setAngularVelocityDamping ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setAttached ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setColour ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setColourVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setColourVelocityDamping ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setDepth ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setDepthVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setDepthVelocityDamping ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setGravity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setLifeSpan ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setLifeTime ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setLives ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setOAngle ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setOAngularVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setOColour ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setOColourVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setODepth ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setODepthVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setOPosition ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setOScale ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setOScaleVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setOVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setPosition ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setScale ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setScaleVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setScaleVelocityDamping ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setSize ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setSpawnDelay ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setSrcRect ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setVelocity ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setVelocityDamping ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]
bool CzActorParticle::_setVisible ( IzXomlResource target,
const CzXomlProperty prop,
bool  add 
) [static]

Clones the oarticle.

Returns:
null if it fails, else a copy of this particle.

Restores particle transient data. Used to reset a particle.

Makes a copy of particle transient data.

bool CzActorParticle::getProperty ( unsigned int  property_name,
CzXomlProperty prop 
)

Gets the named property of the property.

Returns the named property of the particle. The properties value is returned in a CzXomlProperty which is a structure that contains a union of all possible property types.

Parameters:
property_nameName of the property.
[out]propThe property data that.
Returns:
true if it succeeds, false if property does not exist.
void CzActorParticle::InitClass ( ) [static]

Initialises the class.

Sets up the classes avaiiable properties. Used by the XOML system to find, set amd get class properties.

void CzActorParticle::ReleaseClass ( ) [static]
bool CzActorParticle::setProperty ( unsigned int  property_name,
const CzXomlProperty data,
bool  delta 
)

Sets the named property of the particle.

Sets the named property of this particle. The properties value supplied will be converted. If delta is set to true then the existing value of the property will be added to instead of replaced.

Parameters:
property_nameName of the property as a string hash (faster searching).
[in]dataThe property data.
deltatrue if property should be added to instead of replaced.
Returns:
true if it succeeds, false if property does not exist.
bool CzActorParticle::setProperty ( unsigned int  property_name,
const CzString data,
bool  delta 
)

Sets the named property of the particle.

Sets the named property of this particle. The properties value (data) is supplied as a string and will be converted. If delta is set to true then the existing value of the property will be added to instead of replaced.

Parameters:
property_nameName of the property as a string hash (faster searching).
[in]dataThe property data.
deltatrue to property should be added to instead of replaced.
Returns:
true if it succeeds, false if property does not exist.
void CzActorParticle::Update ( float  dt)

Updates this particle.

Updates ths particle, nicluding:

  • applying physics and
  • Handling life span
  • Updating the visual
Parameters:
dtThe number of seconds since the app was last updated

Member Data Documentation

Active state.

Rotation of particle.

Rotation of particle.

Rotation of particle.

Attached particles will follow the particle actor.

Particle colour.

Particle colour velocity.

Particle colour velocity damping.

Depth of particle.

Depth velocity of particle.

Depth velocity damping of particle.

Gravitational acceleration.

Total duration of particle in seconds.

Current life time in seconds.

Number of lives for particle (how time it will be respawned)

Original Rotation of particle.

Original Rotation veloxity of particle.

Original Particle colour.

Original Particle colour velocity.

Original Depth of particle.

Original Depth velocity of particle.

Original Position relative to particle system actor.

Original Scale of particle.

Original Scale velocity of particle.

Original Velocity of particle.

Particles parent emitter.

Position relative to particle system actor.

Scale of particle.

Scale velocity of particle.

Scale velocity of particle.

Amount of time to wait before spawning in seconds.

Velocity of particle.

Velocity damping for particle.

Visible state.

Visual element that represents the particle.


The documentation for this struct was generated from the following files: