RBD_Solver Class Reference

#include <RBD_Solver.h>

Inheritance diagram for RBD_Solver:

SIM_Solver SIM_OptionsUser SIM_Data

List of all members.

Public Types

enum  rbdContactGroupMethod { CONTACTGROUP_NONE = 0, CONTACTGROUP_CLOSESTPOINT, CONTACTGROUP_AVERAGE }

Public Member Functions

 GETSET_DATA_FUNCS_B (RBD_NAME_FLAGPENETRATION, FlagPenetration)
 GETSET_DATA_FUNCS_B (RBD_NAME_GLUEIGNORESRESTING, GlueIgnoresRestingObjects)
 GETSET_DATA_FUNCS_B (RBD_NAME_USEPOINTVELOCITY, UsePointVelocity)
 GETSET_DATA_FUNCS_B (RBD_NAME_USESDFVELOCITY, UseSDFVelocity)
 GETSET_DATA_FUNCS_I (RBD_NAME_CULLMODE, CullMode)
 GETSET_DATA_FUNCS_B (RBD_NAME_ADDIMPACTS, AddImpacts)
 GETSET_DATA_FUNCS_I (RBD_NAME_CONTACTGROUPMETHOD, ContactGroupMethod)
 GETSET_DATA_FUNCS_F (RBD_NAME_CONTACTGROUPTOL, ContactGroupTol)
 GET_DATA_FUNC_I (RBD_NAME_MINIMUMSUBSTEPS, MinimumSubSteps)
 GET_DATA_FUNC_I (RBD_NAME_MAXIMUMSUBSTEPS, MaximumSubSteps)
 GET_DATA_FUNC_F (RBD_NAME_CFLCOND, CFLCond)
bool doObjectsCollide (RBD_Object *obja, RBD_Object *objb, const SIM_Time &time, const SIM_Time &timestep) const
 This is public as we need it in our contact graph builder.
RBD_ObjectTreecreateObjectTree () const
RBD_ObjectconvertToRBDObject (const SIM_Object *obj) const

Protected Member Functions

 RBD_Solver (const SIM_DataFactory *factory)
virtual ~RBD_Solver ()
virtual SIM_Result solveObjectsSubclass (SIM_Engine &engine, SIM_ObjectArray &objects, SIM_ObjectArray &newobjects, SIM_ObjectArray &feedbacktoobjects, const SIM_Time &timestep)
virtual void getImpulseMassMatrixSubclass (const SIM_Object &object, const UT_Vector3 &impulseworldpos, UT_DMatrix3 &immatrix) const
virtual void getPointImpulseMassMatrixSubclass (const SIM_Object &object, int ptnum, UT_DMatrix3 &immatrix) const
virtual fpreal getPropertyAtPositionSubclass (const SIM_Object &object, const UT_Vector3 &worldspacepos, const SIM_Property &property) const
virtual fpreal getPropertyAtPointSubclass (const SIM_Object &object, int ptnum, const SIM_Property &property) const
virtual void getDefaultColliderLabelSubclass (const SIM_Object &object, UT_String &label) const
 Gets the default collider label for an object using this solver.
virtual void getDefaultColliderSubclass (const SIM_Object &object, const UT_String &colliderlabel, UT_String &collidertype, bool &colliderreverseobjectroles) const


Detailed Description

This is a RBD-RBD meta solver. It handles the cases where RBD objects have a Mutual affect relationship with each other.

Definition at line 50 of file RBD_Solver.h.


Member Enumeration Documentation

This should be kept in sync with the contact group method menu.

Enumerator:
CONTACTGROUP_NONE 
CONTACTGROUP_CLOSESTPOINT 
CONTACTGROUP_AVERAGE 

Definition at line 91 of file RBD_Solver.h.


Constructor & Destructor Documentation

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

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


Member Function Documentation

RBD_Object* RBD_Solver::convertToRBDObject ( const SIM_Object obj  )  const

Takes the solve info attached to the object, checks to see if it was created by us, if so, casts to RBD_Object and returns. Can return null if the object wasn't initialized or was done with another solver.

RBD_ObjectTree* RBD_Solver::createObjectTree (  )  const

This method creates an RBD_ObjectTree of the type requested by our cull mode.

bool RBD_Solver::doObjectsCollide ( RBD_Object obja,
RBD_Object objb,
const SIM_Time time,
const SIM_Time timestep 
) const

This is public as we need it in our contact graph builder.

RBD_Solver::GET_DATA_FUNC_F ( RBD_NAME_CFLCOND  ,
CFLCond   
)

RBD_Solver::GET_DATA_FUNC_I ( RBD_NAME_MAXIMUMSUBSTEPS  ,
MaximumSubSteps   
)

RBD_Solver::GET_DATA_FUNC_I ( RBD_NAME_MINIMUMSUBSTEPS  ,
MinimumSubSteps   
)

virtual void RBD_Solver::getDefaultColliderLabelSubclass ( const SIM_Object object,
UT_String label 
) const [protected, virtual]

Gets the default collider label for an object using this solver.

Reimplemented from SIM_Solver.

virtual void RBD_Solver::getDefaultColliderSubclass ( const SIM_Object object,
const UT_String colliderlabel,
UT_String collidertype,
bool &  colliderreverseobjectroles 
) const [protected, virtual]

Gets the default collider type for use on an object with a particular collider label.

Reimplemented from SIM_Solver.

virtual void RBD_Solver::getImpulseMassMatrixSubclass ( const SIM_Object object,
const UT_Vector3 impulseworldpos,
UT_DMatrix3 immatrix 
) const [protected, virtual]

Gets the impulse mass matrix of an object for an impulse at the provided world space position. The default implementation gets the closest point in the geometry and calls getPointImpulseMassMatrix().

Reimplemented from SIM_Solver.

virtual void RBD_Solver::getPointImpulseMassMatrixSubclass ( const SIM_Object object,
int  ptnum,
UT_DMatrix3 immatrix 
) const [protected, virtual]

Gets the impulse mass matrix of an object for an impulse at the provided point on the geometry of the object. The default implementation finds the world space position of the point and calls getImpulseMassMatrix().

Reimplemented from SIM_Solver.

virtual fpreal RBD_Solver::getPropertyAtPointSubclass ( const SIM_Object object,
int  ptnum,
const SIM_Property property 
) const [protected, virtual]

Gets the value of some physical property for the supplied object at a given point on the object's geometry.

Reimplemented from SIM_Solver.

virtual fpreal RBD_Solver::getPropertyAtPositionSubclass ( const SIM_Object object,
const UT_Vector3 worldpos,
const SIM_Property property 
) const [protected, virtual]

Gets the value of some physical property for the supplied object at a given position in world space.

Reimplemented from SIM_Solver.

RBD_Solver::GETSET_DATA_FUNCS_B ( RBD_NAME_ADDIMPACTS  ,
AddImpacts   
)

RBD_Solver::GETSET_DATA_FUNCS_B ( RBD_NAME_USESDFVELOCITY  ,
UseSDFVelocity   
)

RBD_Solver::GETSET_DATA_FUNCS_B ( RBD_NAME_USEPOINTVELOCITY  ,
UsePointVelocity   
)

RBD_Solver::GETSET_DATA_FUNCS_B ( RBD_NAME_GLUEIGNORESRESTING  ,
GlueIgnoresRestingObjects   
)

RBD_Solver::GETSET_DATA_FUNCS_B ( RBD_NAME_FLAGPENETRATION  ,
FlagPenetration   
)

RBD_Solver::GETSET_DATA_FUNCS_F ( RBD_NAME_CONTACTGROUPTOL  ,
ContactGroupTol   
)

RBD_Solver::GETSET_DATA_FUNCS_I ( RBD_NAME_CONTACTGROUPMETHOD  ,
ContactGroupMethod   
)

RBD_Solver::GETSET_DATA_FUNCS_I ( RBD_NAME_CULLMODE  ,
CullMode   
)

virtual SIM_Result RBD_Solver::solveObjectsSubclass ( SIM_Engine engine,
SIM_ObjectArray objects,
SIM_ObjectArray newobjects,
SIM_ObjectArray feedbacktoobjects,
const SIM_Time timestep 
) [protected, virtual]

This method solves for some objects. It performs whatever processing is necessary to take objects from their state at one time to another. The default implementation does nothing. The objects parameter holds all the objects that should be solved for this timestep. The newobjects parameter is a set of objects that were just created in this timestep, and so should in most cases not be solved on this timestep so that they maintain correct initial conditions.

Implements SIM_Solver.


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

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