Particle Universe  1.2
ParticleUniverse::ForceField Class Reference

#include <ParticleUniverseForceField.h>

Public Types

enum  ForceFieldType { FF_REALTIME_CALC, FF_MATRIX_CALC }
 

Public Member Functions

 ForceField (void)
 
 ~ForceField (void)
 
virtual void initialise (ForceFieldType type, const Vector3 &position, unsigned int forceFieldSize, ushort octaves, double frequency, double amplitude, double persistence, const Vector3 &worldSize)
 
virtual void initialise (ForceFieldType type, unsigned int forceFieldSize, ushort octaves, double frequency, double amplitude, double persistence, const Vector3 &worldSize)
 
const Vector3getForceFieldPositionBase (void) const
 
void setForceFieldPositionBase (const Vector3 &position)
 
void determineForce (const Vector3 &position, Vector3 &force, Real delta)
 
virtual ushort getOctaves (void) const
 
virtual void setOctaves (ushort octaves)
 
virtual double getFrequency (void) const
 
virtual void setFrequency (double frequency)
 
virtual double getAmplitude (void) const
 
virtual void setAmplitude (double amplitude)
 
virtual double getPersistence (void) const
 
virtual void setPersistence (double persistence)
 
virtual unsigned int getForceFieldSize (void) const
 
virtual void setForceFieldSize (unsigned int forceFieldSize)
 
virtual Vector3 getWorldSize (void) const
 
virtual void setWorldSize (const Vector3 &worldSize)
 
const ForceFieldType getForceFieldType (void) const
 
void setForceFieldType (const ForceFieldType forceFieldType)
 

Protected Member Functions

ForceFieldCalculationFactorygetForceFieldCalculationFactory () const
 
void setForceFieldCalculationFactory (ForceFieldCalculationFactory *forceFieldCalculationFactory)
 
ForceFieldCalculationFactorycreateForceFieldCalculationFactory (ForceFieldType type)
 

Protected Attributes

ushort mOctaves
 
double mFrequency
 
double mAmplitude
 
double mPersistence
 
Vector3 mWorldSize
 
unsigned int mForceFieldSize
 
ForceFieldCalculationFactorymForceFieldCalculationFactory
 
Vector3 mForceFieldPositionBase
 
ForceFieldType mForceFieldType
 

Detailed Description

Force Field Affector 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 Enumeration Documentation

Enumerator
FF_REALTIME_CALC 
FF_MATRIX_CALC 

Constructor & Destructor Documentation

ParticleUniverse::ForceField::ForceField ( void  )
ParticleUniverse::ForceField::~ForceField ( void  )

Member Function Documentation

ForceFieldCalculationFactory* ParticleUniverse::ForceField::createForceFieldCalculationFactory ( ForceFieldType  type)
protected
void ParticleUniverse::ForceField::determineForce ( const Vector3 position,
Vector3 force,
Real  delta 
)

Calculate the force, based on a certain position

virtual double ParticleUniverse::ForceField::getAmplitude ( void  ) const
virtual
ForceFieldCalculationFactory* ParticleUniverse::ForceField::getForceFieldCalculationFactory ( ) const
protected
const Vector3& ParticleUniverse::ForceField::getForceFieldPositionBase ( void  ) const

Get/Set the base position of the force field

virtual unsigned int ParticleUniverse::ForceField::getForceFieldSize ( void  ) const
virtual
const ForceFieldType ParticleUniverse::ForceField::getForceFieldType ( void  ) const

Get/Set the Forcefield type

virtual double ParticleUniverse::ForceField::getFrequency ( void  ) const
virtual
virtual ushort ParticleUniverse::ForceField::getOctaves ( void  ) const
virtual

Getters/Setters

virtual double ParticleUniverse::ForceField::getPersistence ( void  ) const
virtual
virtual Vector3 ParticleUniverse::ForceField::getWorldSize ( void  ) const
virtual
virtual void ParticleUniverse::ForceField::initialise ( ForceFieldType  type,
const Vector3 position,
unsigned int  forceFieldSize,
ushort  octaves,
double  frequency,
double  amplitude,
double  persistence,
const Vector3 worldSize 
)
virtual

Initialises a ForceField

virtual void ParticleUniverse::ForceField::initialise ( ForceFieldType  type,
unsigned int  forceFieldSize,
ushort  octaves,
double  frequency,
double  amplitude,
double  persistence,
const Vector3 worldSize 
)
virtual

Initialises a ForceField

virtual void ParticleUniverse::ForceField::setAmplitude ( double  amplitude)
virtual
void ParticleUniverse::ForceField::setForceFieldCalculationFactory ( ForceFieldCalculationFactory forceFieldCalculationFactory)
protected
void ParticleUniverse::ForceField::setForceFieldPositionBase ( const Vector3 position)
virtual void ParticleUniverse::ForceField::setForceFieldSize ( unsigned int  forceFieldSize)
virtual
void ParticleUniverse::ForceField::setForceFieldType ( const ForceFieldType  forceFieldType)
virtual void ParticleUniverse::ForceField::setFrequency ( double  frequency)
virtual
virtual void ParticleUniverse::ForceField::setOctaves ( ushort  octaves)
virtual
virtual void ParticleUniverse::ForceField::setPersistence ( double  persistence)
virtual
virtual void ParticleUniverse::ForceField::setWorldSize ( const Vector3 worldSize)
virtual

Member Data Documentation

double ParticleUniverse::ForceField::mAmplitude
protected
ForceFieldCalculationFactory* ParticleUniverse::ForceField::mForceFieldCalculationFactory
protected
Vector3 ParticleUniverse::ForceField::mForceFieldPositionBase
protected
unsigned int ParticleUniverse::ForceField::mForceFieldSize
protected
ForceFieldType ParticleUniverse::ForceField::mForceFieldType
protected
double ParticleUniverse::ForceField::mFrequency
protected
ushort ParticleUniverse::ForceField::mOctaves
protected
double ParticleUniverse::ForceField::mPersistence
protected
Vector3 ParticleUniverse::ForceField::mWorldSize
protected

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