A Space Warp modifier usually uses an instance of this class and implements the Force() method.
The force field is then applied to the particle system when the particle system is bound to the Space Warp. This class is similar in some respects to the Deformer class as used by a modifier. The difference is that a deformer modifies the points of the object. A force field is really an acceleration - it modifies velocity rather than position. The force field provides a function of position in space, velocity and time that gives a force. The force is then used to compute an acceleration on a particle which modifies its velocity. Typically, particles are assumed to have a normalized uniform mass equal to 1 so the acceleration is F/M = F.
#include <object.h>
Public Member Functions |
|
virtual Point3 | Force (TimeValue t, const Point3 &pos, const Point3 &vel, int index)=0 |
This method is called to compute a force on
the particle based on its position, velocity and the current time.
|
|
virtual void | SetRandSeed (int seed) |
virtual void | DeleteThis () |
This method is callled to delete this
instance of the
ForceField. |
virtual Point3 Force | ( | TimeValue | t, |
const Point3 & | pos, | ||
const Point3 & | vel, | ||
int | index | ||
) | [pure virtual] |
This method is called to compute a force on the particle based on its position, velocity and the current time.
t | The time to compute the force. |
pos | The current position of the particle. |
vel | The current velocity of the particle. |
index | The index of the particle being forced. |
virtual void SetRandSeed | ( | int | seed | ) | [inline, virtual] |
virtual void DeleteThis | ( | ) | [inline, virtual] |
This method is callled to delete this instance of the ForceField.
This should be called, for example, by developers who use the WSMObject::GetForceField() method.
{}