SIM_ForceMagnet Class Reference

#include <SIM_ForceMagnet.h>

Inheritance diagram for SIM_ForceMagnet:

SIM_Force SIM_OptionsUser SIM_Data

List of all members.

Public Member Functions

 GETSET_DATA_FUNCS_F (SIM_NAME_FORCESCALE, ForceScale)
 Scale the calculated force value.
 GETSET_DATA_FUNCS_I (SIM_NAME_SAMPLEMODE, SampleMode)
 Whether to sample by point, circle, or sphere.

Protected Member Functions

 SIM_ForceMagnet (const SIM_DataFactory *factory)
virtual ~SIM_ForceMagnet ()
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 SIM_ForceSample getOptimalForceSamplingSubclass () const
virtual SIM_GuidecreateGuideObjectSubclass () const
virtual void buildGuideGeometrySubclass (const SIM_RootData &root, const SIM_Options &options, const GU_DetailHandle &gdh, UT_DMatrix4 *xform, const SIM_Time &t) const


Detailed Description

This is an implementation of the SIM_Force interface. This implementation calculates the interpolated value from a point cloud with force and torque attributes attached to it.

Definition at line 24 of file SIM_ForceMagnet.h.


Constructor & Destructor Documentation

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

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


Member Function Documentation

virtual void SIM_ForceMagnet::buildGuideGeometrySubclass ( const SIM_RootData root,
const SIM_Options options,
const GU_DetailHandle gdh,
UT_DMatrix4 xform,
const SIM_Time t 
) const [protected, virtual]

Build guide geometry by copying the points from the source geometry, and adding lines to represent the force and torque vectors.

Reimplemented from SIM_Data.

virtual SIM_Guide* SIM_ForceMagnet::createGuideObjectSubclass (  )  const [protected, virtual]

Override this to return a SIM_GuideShared so we only have to draw our guide geometry once regardless of how many objects we are attached to.

Reimplemented from SIM_Data.

virtual void SIM_ForceMagnet::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]

Returns the force and torque on a point. The returned values are exact copies of the force and torque attributes. The getForceOnCircleSubclass() and getForceOnSphereSubclass() functions use the default implementations which scale the point force by the area or volume of the circle or sphere. This means that regardless of the size of samples used to quantize an object, the total force on the object should remain roughly constant.

Reimplemented from SIM_Force.

virtual SIM_ForceSample SIM_ForceMagnet::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_ForceMagnet::GETSET_DATA_FUNCS_F ( SIM_NAME_FORCESCALE  ,
ForceScale   
)

Scale the calculated force value.

SIM_ForceMagnet::GETSET_DATA_FUNCS_I ( SIM_NAME_SAMPLEMODE  ,
SampleMode   
)

Whether to sample by point, circle, or sphere.


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