|
Particle Universe
1.2
|
#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 Vector3 & | getForceFieldPositionBase (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 | |
| ForceFieldCalculationFactory * | getForceFieldCalculationFactory () const |
| void | setForceFieldCalculationFactory (ForceFieldCalculationFactory *forceFieldCalculationFactory) |
| ForceFieldCalculationFactory * | createForceFieldCalculationFactory (ForceFieldType type) |
Protected Attributes | |
| ushort | mOctaves |
| double | mFrequency |
| double | mAmplitude |
| double | mPersistence |
| Vector3 | mWorldSize |
| unsigned int | mForceFieldSize |
| ForceFieldCalculationFactory * | mForceFieldCalculationFactory |
| Vector3 | mForceFieldPositionBase |
| ForceFieldType | mForceFieldType |
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).
| ParticleUniverse::ForceField::ForceField | ( | void | ) |
| ParticleUniverse::ForceField::~ForceField | ( | void | ) |
|
protected |
| void ParticleUniverse::ForceField::determineForce | ( | const Vector3 & | position, |
| Vector3 & | force, | ||
| Real | delta | ||
| ) |
Calculate the force, based on a certain position
|
virtual |
|
protected |
Get/Set/Create ForceFieldCalculationFactory
| const Vector3& ParticleUniverse::ForceField::getForceFieldPositionBase | ( | void | ) | const |
Get/Set the base position of the force field
|
virtual |
| const ForceFieldType ParticleUniverse::ForceField::getForceFieldType | ( | void | ) | const |
Get/Set the Forcefield type
|
virtual |
|
virtual |
Getters/Setters
|
virtual |
|
virtual |
|
virtual |
Initialises a ForceField
|
virtual |
Initialises a ForceField
|
virtual |
|
protected |
| void ParticleUniverse::ForceField::setForceFieldPositionBase | ( | const Vector3 & | position | ) |
|
virtual |
| void ParticleUniverse::ForceField::setForceFieldType | ( | const ForceFieldType | forceFieldType | ) |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |