Public Member Functions

ForceField Class Reference

Search for all occurrences

Detailed Description

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.

See also:
Class Point3, Class WSMObject.

#include <object.h>

Inheritance diagram for ForceField:
Inheritance graph
[legend]

List of all members.

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.

Member Function Documentation

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.

Parameters:
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.
Returns:
The force vector as a Point3. This vector is added to the velocity.
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.

{}

ForceField ForceField ForceField ForceField ForceField ForceField ForceField ForceField ForceField ForceField
ForceField ForceField ForceField ForceField ForceField ForceField ForceField ForceField ForceField ForceField