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

Pure virtual ForceFieldCalculationFactory. More...

#include <CCPUForceField.h>

Inheritance diagram for PUForceFieldCalculationFactory:
PURealTimeForceFieldCalculationFactory

Public Member Functions

 PUForceFieldCalculationFactory (void)
virtual ~PUForceFieldCalculationFactory (void)
local ~PUForceFieldCalculationFactory ()
virtual void generate (unsigned int forceFieldSize, unsigned short octaves, double frequency, double amplitude, double persistence, const Vec3 &worldSize)=0
 Generates the force field. More...
 
virtual void determineForce (const Vec3 &position, Vec3 &force, float delta)=0
 Determine force, based on the position of a particle. More...
 
local determineForce ( local position, local force, local delta)
 Determine force, based on the position of a particle. More...
 
virtual unsigned short getOctaves (void) const
 Default Getters/Setters. More...
 
local getOctaves ()
 Default Getters/Setters. More...
 
virtual void setOctaves (unsigned short octaves)
virtual double getFrequency (void) const
local getFrequency ()
virtual void setFrequency (double frequency)
virtual double getAmplitude (void) const
virtual void setAmplitude (double amplitude)
var setAmplitude ( var amplitude)
local setAmplitude ( local amplitude)
virtual double getPersistence (void) const
var getPersistence ()
local getPersistence ()
virtual void setPersistence (double persistence)
var setPersistence ( var persistence)
local setPersistence ( local persistence)
virtual unsigned int getForceFieldSize (void) const
virtual void setForceFieldSize (unsigned int forceFieldSize)
virtual Vec3 getWorldSize (void) const
var getWorldSize ()
local getWorldSize ()
virtual void setWorldSize (const Vec3 &worldSize)

Static Public Attributes

static const Vec3 DEFAULT_WORLDSIZE
var DEFAULT_WORLDSIZE
local DEFAULT_WORLDSIZE

Protected Attributes

PUNoise3D _noise3D
unsigned short _octaves
double _frequency
double _amplitude
double _persistence
Vec3 _mapScale
Vec3 _worldSize
Vec3 _mappedPosition

Detailed Description

Pure virtual ForceFieldCalculationFactory.

Constructor & Destructor Documentation

PUForceFieldCalculationFactory ( void  )
inline
var PUForceFieldCalculationFactory (   )
inline
local
PUForceFieldCalculationFactory
(   )
inline
virtual
~PUForceFieldCalculationFactory
( void  )
inlinevirtual
var ~PUForceFieldCalculationFactory (   )
inlinevirtual
local
~PUForceFieldCalculationFactory
(   )
inlinevirtual

Member Function Documentation

virtual void determineForce ( const Vec3 position,
Vec3 force,
float  delta 
)
pure virtual

Determine force, based on the position of a particle.

#remarks The position is the position of a particle. The argument 'delta' defines the radius around the position that contributes to the calculation of the force.

Implemented in PURealTimeForceFieldCalculationFactory.

var determineForce ( var  position,
var  force,
var  delta 
)
pure virtual

Determine force, based on the position of a particle.

#remarks The position is the position of a particle. The argument 'delta' defines the radius around the position that contributes to the calculation of the force.

Implemented in PURealTimeForceFieldCalculationFactory.

local determineForce ( local  position,
local  force,
local  delta 
)
pure virtual

Determine force, based on the position of a particle.

#remarks The position is the position of a particle. The argument 'delta' defines the radius around the position that contributes to the calculation of the force.

Implemented in PURealTimeForceFieldCalculationFactory.

virtual void generate ( unsigned int  forceFieldSize,
unsigned short  octaves,
double  frequency,
double  amplitude,
double  persistence,
const Vec3 worldSize 
)
pure virtual

Generates the force field.

Remarks
This function takes several arguments.
  • forceFieldSize defines the internal dimensions of the force field.
  • octaves, frequency, amplitude and persistence define the noise that is being generated.
  • worldSize defines the dimensions in the real world (scene).

Implemented in PURealTimeForceFieldCalculationFactory.

var generate ( var  forceFieldSize,
var  octaves,
var  frequency,
var  amplitude,
var  persistence,
var  worldSize 
)
pure virtual

Generates the force field.

Remarks
This function takes several arguments.
  • forceFieldSize defines the internal dimensions of the force field.
  • octaves, frequency, amplitude and persistence define the noise that is being generated.
  • worldSize defines the dimensions in the real world (scene).

Implemented in PURealTimeForceFieldCalculationFactory.

local generate ( local  forceFieldSize,
local  octaves,
local  frequency,
local  amplitude,
local  persistence,
local  worldSize 
)
pure virtual

Generates the force field.

Remarks
This function takes several arguments.
  • forceFieldSize defines the internal dimensions of the force field.
  • octaves, frequency, amplitude and persistence define the noise that is being generated.
  • worldSize defines the dimensions in the real world (scene).

Implemented in PURealTimeForceFieldCalculationFactory.

virtual double getAmplitude ( void  ) const
virtual
var getAmplitude (   )
virtual
local getAmplitude (   )
virtual
virtual unsigned int
getForceFieldSize
( void  ) const
virtual
var getForceFieldSize (   )
virtual
local getForceFieldSize (   )
virtual
virtual double getFrequency ( void  ) const
virtual
var getFrequency (   )
virtual
local getFrequency (   )
virtual
virtual unsigned short getOctaves ( void  ) const
virtual

Default Getters/Setters.

var getOctaves (   )
virtual

Default Getters/Setters.

local getOctaves (   )
virtual

Default Getters/Setters.

virtual double getPersistence ( void  ) const
virtual
var getPersistence (   )
virtual
local getPersistence (   )
virtual
virtual Vec3 getWorldSize ( void  ) const
virtual
var getWorldSize (   )
virtual
local getWorldSize (   )
virtual
virtual void setAmplitude ( double  amplitude)
virtual
var setAmplitude ( var  amplitude)
virtual
local setAmplitude ( local  amplitude)
virtual
virtual void setForceFieldSize ( unsigned int  forceFieldSize)
virtual
var setForceFieldSize ( var  forceFieldSize)
virtual
local setForceFieldSize ( local  forceFieldSize)
virtual
virtual void setFrequency ( double  frequency)
virtual
var setFrequency ( var  frequency)
virtual
local setFrequency ( local  frequency)
virtual
virtual void setOctaves ( unsigned short  octaves)
virtual
var setOctaves ( var  octaves)
virtual
local setOctaves ( local  octaves)
virtual
virtual void setPersistence ( double  persistence)
virtual
var setPersistence ( var  persistence)
virtual
local setPersistence ( local  persistence)
virtual
virtual void setWorldSize ( const Vec3 worldSize)
virtual
var setWorldSize ( var  worldSize)
virtual
local setWorldSize ( local  worldSize)
virtual

Member Data Documentation

double _amplitude
protected
var _amplitude
protected
local _amplitude
protected
double _frequency
protected
var _frequency
protected
local _frequency
protected
Vec3 _mappedPosition
protected
var _mappedPosition
protected
local _mappedPosition
protected
Vec3 _mapScale
protected
var _mapScale
protected
local _mapScale
protected
PUNoise3D _noise3D
protected
unsigned short _octaves
protected
var _octaves
protected
local _octaves
protected
double _persistence
protected
var _persistence
protected
local _persistence
protected
Vec3 _worldSize
protected
var _worldSize
protected
local _worldSize
protected
const Vec3 DEFAULT_WORLDSIZE
static
var DEFAULT_WORLDSIZE
static
local DEFAULT_WORLDSIZE
static

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