SIM_ForceDrag Class Reference

A simple drag force that opposes velocities in the normal direction. More...

#include <SIM_ForceDrag.h>

Inheritance diagram for SIM_ForceDrag:

SIM_Force SIM_OptionsUser SIM_Data

List of all members.

Public Member Functions

 GETSET_DATA_FUNCS_V3 (SIM_NAME_VELOCITY, Velocity)
 GETSET_DATA_FUNCS_V3 (SIM_NAME_ANGVELOCITY, AngularVelocityDegrees)
 GETSET_DATA_FUNCS_F (SIM_NAME_FORCESCALE, ForceScale)
 GETSET_DATA_FUNCS_F (SIM_NAME_TORQUESCALE, TorqueScale)
 GET_DATA_FUNC_B ("ignoremass", IgnoreMass)
 GETSET_DATA_FUNCS_I (SIM_NAME_SAMPLEMODE, SampleMode)
 Whether to sample by point, circle, or sphere.

Protected Member Functions

 SIM_ForceDrag (const SIM_DataFactory *factory)
virtual ~SIM_ForceDrag ()
virtual void getForceSubclass (const SIM_Object &object, const UT_Vector3 &position, const UT_Vector3 &velocity, const UT_Vector3 &angvel, const fpreal mass, UT_Vector3 &force, UT_Vector3 &torque) const
virtual void getForceOnCircleSubclass (const SIM_Object &object, const UT_Vector3 &position, const UT_Vector3 &normal, const fpreal radius, const UT_Vector3 &velocity, const UT_Vector3 &angvel, const fpreal mass, UT_Vector3 &force, UT_Vector3 &torque) const
virtual void getForceJacobianSubclass (const SIM_Object &object, const UT_Vector3 &position, const UT_Vector3 &velocity, const UT_Vector3 &angvel, const fpreal mass, UT_Matrix &dFdX, UT_Matrix &dFdV) const
virtual SIM_ForceResolvergetForceResolverSubclass (const SIM_Object &object) const
virtual SIM_ForceSample getOptimalForceSamplingSubclass () const


Detailed Description

A simple drag force that opposes velocities in the normal direction.

Definition at line 22 of file SIM_ForceDrag.h.


Constructor & Destructor Documentation

SIM_ForceDrag::SIM_ForceDrag ( const SIM_DataFactory factory  )  [explicit, protected]

virtual SIM_ForceDrag::~SIM_ForceDrag (  )  [protected, virtual]


Member Function Documentation

SIM_ForceDrag::GET_DATA_FUNC_B ( "ignoremass"  ,
IgnoreMass   
)

Controls whether we cancel out mass (making it a delta-v rather than delta-momentum)

virtual void SIM_ForceDrag::getForceJacobianSubclass ( const SIM_Object object,
const UT_Vector3 position,
const UT_Vector3 velocity,
const UT_Vector3 angvel,
const fpreal  mass,
UT_Matrix dFdX,
UT_Matrix dFdV 
) const [protected, virtual]

Returns the derivatives of force & torque with respect to position and velocity. The jacobians are 6x6 matrices indexed from 1 (ie, dFdX(1,1) is first element). The default behaviour is to return 0 matrices. Note that the matrices are already initialized to 0 when this is called.

Reimplemented from SIM_Force.

virtual void SIM_ForceDrag::getForceOnCircleSubclass ( const SIM_Object object,
const UT_Vector3 position,
const UT_Vector3 normal,
const fpreal  radius,
const UT_Vector3 velocity,
const UT_Vector3 angvel,
const fpreal  mass,
UT_Vector3 force,
UT_Vector3 torque 
) const [protected, virtual]

Returns the force and torque applied by this force to a circle. The outputs may be modified according to the information passed in about the object to which the force is being applied. The default implementation calls getForce() and assumes this is the force on a unit area. So the force and torque are then scaled by the area of the circle.

Reimplemented from SIM_Force.

virtual SIM_ForceResolver* SIM_ForceDrag::getForceResolverSubclass ( const SIM_Object object  )  const [protected, virtual]

Creates a force resolver to evaluate this force in a threadsafe manner.

Reimplemented from SIM_Force.

virtual void SIM_ForceDrag::getForceSubclass ( const SIM_Object object,
const UT_Vector3 position,
const UT_Vector3 velocity,
const UT_Vector3 angvel,
const fpreal  mass,
UT_Vector3 force,
UT_Vector3 torque 
) const [protected, virtual]

Override the surface force calculation. The drag force opposes velocities.

Reimplemented from SIM_Force.

virtual SIM_ForceSample SIM_ForceDrag::getOptimalForceSamplingSubclass (  )  const [protected, virtual]

Allows solvers to query what the optimal sampling type for this force would be. Solvers do not have to respect this. This should be user overrideable so users can trade efficiency for accuracy.

Reimplemented from SIM_Force.

SIM_ForceDrag::GETSET_DATA_FUNCS_F ( SIM_NAME_TORQUESCALE  ,
TorqueScale   
)

SIM_ForceDrag::GETSET_DATA_FUNCS_F ( SIM_NAME_FORCESCALE  ,
ForceScale   
)

SIM_ForceDrag::GETSET_DATA_FUNCS_I ( SIM_NAME_SAMPLEMODE  ,
SampleMode   
)

Whether to sample by point, circle, or sphere.

SIM_ForceDrag::GETSET_DATA_FUNCS_V3 ( SIM_NAME_ANGVELOCITY  ,
AngularVelocityDegrees   
)

SIM_ForceDrag::GETSET_DATA_FUNCS_V3 ( SIM_NAME_VELOCITY  ,
Velocity   
)


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

Generated on Fri May 25 00:10:40 2012 for HDK by  doxygen 1.5.9