Cocos2d-x  v3.10
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
PUParticle3D Struct Reference

PUParticle3D inherit from Particle3D, includes all properties of PU particles. More...

Inherits Particle3D.

Public Types

enum  ParticleType
 The type of Particle.
 
enum  ReservedParticleEventFlags
 Enumeration which lists a number of reserved event flags. More...
 

Public Member Functions

void setEventFlags (unsigned int flags)
 Sets the event flags.
 
void addEventFlags (unsigned int flags)
 As setEventFlags, except the flags passed as parameters are appended to the existing flags on this object.
 
void removeEventFlags (unsigned int flags)
 The flags passed as parameters are removed from the existing flags.
 
unsigned int getEventFlags () const
 Return the event flags.
 
bool hasEventFlags (unsigned int flags) const
 Determines whether it has certain flags set.
 
var hasEventFlags ( var flags)
 Determines whether it has certain flags set.
 
local hasEventFlags ( local flags)
 Determines whether it has certain flags set.
 
bool isFreezed (void) const
 Returns true if the particle is freezed and doesn't move anymore. More...
 
void setFreezed (bool fzd)
 Freeze the particle, so it doesn't move anymore.
 

Public Attributes

ParticleType particleType
 Values that are assigned as soon as the particle is emitted (non-transformed) Vec3 positionInWorld;.
 
Vec3 latestPosition
 Direction (and speed)
 
float originalDirectionLength
 Length of the direction that has been set.
 
float originalScaledDirectionLength
 Length of the direction after multiplication with the velocity.
 
var originalScaledDirectionLength
 Length of the direction after multiplication with the velocity.
 
local originalScaledDirectionLength
 Length of the direction after multiplication with the velocity.
 
Vec3 rotationAxis
 The rotation axis is used in combination with orientation. More...
 
Vec4 originalColor
 Current and original colour.
 
float zRotationSpeed
 The zRotationSpeed is used in combination with zRotation and defines tha actual rotationspeed in 2D. More...
 
Quaternion originalOrientation
 The orientation of the particle. More...
 
float rotationSpeed
 The rotation is used in combination with orientation. More...
 
float radius
 Radius of the particle, to be used for inter-particle collision and such.
 
bool ownDimensions
 Does this particle have it's own dimensions?
 
unsigned int eventFlags
 event flags
 
bool freezed
 freezed More...
 
float timeToLive
 Total Time to live, number of seconds of particles natural life.
 
var timeToLive
 Total Time to live, number of seconds of particles natural life.
 
local timeToLive
 Total Time to live, number of seconds of particles natural life.
 
float totalTimeToLive
 The timeFraction is calculated every update. More...
 
local totalTimeToLive
 The timeFraction is calculated every update. More...
 
float mass
 Mass of a particle. More...
 
var mass
 Mass of a particle. More...
 
local mass
 Mass of a particle. More...
 
float textureAnimationTimeStep
 Animation attributes.
 
float depthInView
 depth in camera view
 
float zRotation
 zRotation is used to rotate the particle in 2D (around the Z-axis) (radian)
 
- Public Attributes inherited from Particle3D
Vec3 position
 position
 
Quaternion orientation
 Orientation of the particle.
 
var orientation
 Orientation of the particle.
 
local orientation
 Orientation of the particle.
 
Vec4 color
 particle color
 
Vec2 lb_uv
 left bottom uv
 
Vec2 rt_uv
 right top uv
 
float width
 Own width.
 
float height
 Own height.
 
float depth
 Own depth.
 
std::map< std::string, void * > userDefs
 user defined property
 
var userDefs
 user defined property
 
local userDefs
 user defined property
 

Static Public Attributes

static float DEFAULT_TTL
 Default time to alive.
 
local DEFAULT_TTL
 Default time to alive.
 
static float DEFAULT_MASS
 Default mass.
 

Detailed Description

PUParticle3D inherit from Particle3D, includes all properties of PU particles.

Member Function Documentation

bool isFreezed ( void  ) const
inline

Returns true if the particle is freezed and doesn't move anymore.

Remarks
Although it is freezed, repositioning the particle is still possible.
var isFreezed (   )
inline

Returns true if the particle is freezed and doesn't move anymore.

Remarks
Although it is freezed, repositioning the particle is still possible.
local isFreezed (   )
inline

Returns true if the particle is freezed and doesn't move anymore.

Remarks
Although it is freezed, repositioning the particle is still possible.

Member Data Documentation

Vec3 rotationAxis

The rotation axis is used in combination with orientation.

Because the rotation axis is part of the particle itself, it can be changed independently.

var rotationAxis

The rotation axis is used in combination with orientation.

Because the rotation axis is part of the particle itself, it can be changed independently.

local rotationAxis

The rotation axis is used in combination with orientation.

Because the rotation axis is part of the particle itself, it can be changed independently.

float zRotationSpeed

The zRotationSpeed is used in combination with zRotation and defines tha actual rotationspeed in 2D.

var zRotationSpeed

The zRotationSpeed is used in combination with zRotation and defines tha actual rotationspeed in 2D.

local zRotationSpeed

The zRotationSpeed is used in combination with zRotation and defines tha actual rotationspeed in 2D.

Quaternion originalOrientation

The orientation of the particle.

Remarks
The orientation of the particle is only visible if the Particle Renderer - such as the Box renderer - supports orientation.
var originalOrientation

The orientation of the particle.

Remarks
The orientation of the particle is only visible if the Particle Renderer - such as the Box renderer - supports orientation.
local originalOrientation

The orientation of the particle.

Remarks
The orientation of the particle is only visible if the Particle Renderer - such as the Box renderer - supports orientation.
float rotationSpeed

The rotation is used in combination with orientation.

Because the rotation speed is part of the particle itself, it can be changed independently.

var rotationSpeed

The rotation is used in combination with orientation.

Because the rotation speed is part of the particle itself, it can be changed independently.

local rotationSpeed

The rotation is used in combination with orientation.

Because the rotation speed is part of the particle itself, it can be changed independently.

bool freezed

freezed

Time to live, number of seconds left of particles natural life

var freezed

freezed

Time to live, number of seconds left of particles natural life

local freezed

freezed

Time to live, number of seconds left of particles natural life

float totalTimeToLive

The timeFraction is calculated every update.

It is used in other observers, affectors, etc. so it is better to calculate it once at the Particle level.

var totalTimeToLive

The timeFraction is calculated every update.

It is used in other observers, affectors, etc. so it is better to calculate it once at the Particle level.

local totalTimeToLive

The timeFraction is calculated every update.

It is used in other observers, affectors, etc. so it is better to calculate it once at the Particle level.

float mass

Mass of a particle.

Remarks
In case of simulations where mass of a particle is needed (i.e. exploding particles of different mass) this attribute can be used.
var mass

Mass of a particle.

Remarks
In case of simulations where mass of a particle is needed (i.e. exploding particles of different mass) this attribute can be used.
local mass

Mass of a particle.

Remarks
In case of simulations where mass of a particle is needed (i.e. exploding particles of different mass) this attribute can be used.

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