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

Internal class, This class defines a force field to affect the particle direction. More...

Public Member Functions

virtual void initialise (ForceFieldType type, const Vec3 &position, unsigned int forceFieldSize, unsigned short octaves, double frequency, double amplitude, double persistence, const Vec3 &worldSize)
 Initialises the ForceField. More...
 
var initialise ( var type, var position, var forceFieldSize, var octaves, var frequency, var amplitude, var persistence, var worldSize)
 Initialises the ForceField. More...
 
local initialise ( local type, local position, local forceFieldSize, local octaves, local frequency, local amplitude, local persistence, local worldSize)
 Initialises the ForceField. More...
 
virtual void initialise (ForceFieldType type, unsigned int forceFieldSize, unsigned short octaves, double frequency, double amplitude, double persistence, const Vec3 &worldSize)
 Initialises the ForceField. More...
 
local initialise ( local type, local forceFieldSize, local octaves, local frequency, local amplitude, local persistence, local worldSize)
 Initialises the ForceField. More...
 
const Vec3getForceFieldPositionBase (void) const
 Get/Set the base position of the force field.
 
void determineForce (const Vec3 &position, Vec3 &force, float delta)
 Calculate the force, based on a certain position.
 
virtual unsigned short getOctaves (void) const
 Getters/Setters.
 
local getOctaves ()
 Getters/Setters.
 
const ForceFieldType getForceFieldType (void) const
 Get/Set the Forcefield type.
 

Detailed Description

Internal class, This class defines a force field to affect the particle direction.

The force field is based on 3D noise. The force can be calculated in realtime or based on a precreated 3D force field matrix, which essentially involves one lookup. To speed things up, the 3d matrix can be precreated in a separate thread (optionally)

Member Function Documentation

virtual void initialise ( ForceFieldType  type,
const Vec3 position,
unsigned int  forceFieldSize,
unsigned short  octaves,
double  frequency,
double  amplitude,
double  persistence,
const Vec3 worldSize 
)
virtual

Initialises the ForceField.

The type of force field. The position of force field. The internal dimensions of the force field. The octaves. The frequency. The amplitude. The persistence. The dimensions in the real world.

var initialise ( var  type,
var  position,
var  forceFieldSize,
var  octaves,
var  frequency,
var  amplitude,
var  persistence,
var  worldSize 
)
virtual

Initialises the ForceField.

The type of force field. The position of force field. The internal dimensions of the force field. The octaves. The frequency. The amplitude. The persistence. The dimensions in the real world.

local initialise ( local  type,
local  position,
local  forceFieldSize,
local  octaves,
local  frequency,
local  amplitude,
local  persistence,
local  worldSize 
)
virtual

Initialises the ForceField.

The type of force field. The position of force field. The internal dimensions of the force field. The octaves. The frequency. The amplitude. The persistence. The dimensions in the real world.

virtual void initialise ( ForceFieldType  type,
unsigned int  forceFieldSize,
unsigned short  octaves,
double  frequency,
double  amplitude,
double  persistence,
const Vec3 worldSize 
)
virtual

Initialises the ForceField.

The type of force field. The internal dimensions of the force field. The octaves. The frequency. The amplitude. The persistence. The dimensions in the real world.

var initialise ( var  type,
var  forceFieldSize,
var  octaves,
var  frequency,
var  amplitude,
var  persistence,
var  worldSize 
)
virtual

Initialises the ForceField.

The type of force field. The internal dimensions of the force field. The octaves. The frequency. The amplitude. The persistence. The dimensions in the real world.

local initialise ( local  type,
local  forceFieldSize,
local  octaves,
local  frequency,
local  amplitude,
local  persistence,
local  worldSize 
)
virtual

Initialises the ForceField.

The type of force field. The internal dimensions of the force field. The octaves. The frequency. The amplitude. The persistence. The dimensions in the real world.


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