SIM_ConAnchor Class Reference

#include <SIM_ConAnchor.h>

Inheritance diagram for SIM_ConAnchor:

SIM_Data SIM_OptionsUser SIM_ConAnchorRotational SIM_ConAnchorSpatial SIM_ConAnchorAlignAxis SIM_ConAnchorObjRotational SIM_ConAnchorWorldSpaceRot SIM_ConAnchorObjSpatial SIM_ConAnchorWorldSpacePos SIM_ConAnchorObjPointRot SIM_ConAnchorObjSpaceRot SIM_ConAnchorObjPointPos SIM_ConAnchorObjPrimPos SIM_ConAnchorObjSpacePos SIM_ConAnchorObjPointIdRot SIM_ConAnchorObjPointNumRot SIM_ConAnchorObjPointIdPos SIM_ConAnchorObjPointNumPos

List of all members.

Public Member Functions

const SIM_ObjectgetReferencedObject (const SIM_Time &time) const
bool getNeedsInit () const
void initAnchor (const SIM_Object *object)
bool getObjectSpecification (UT_String &str) const
void initConstraint (const SIM_Relationship *rel)
void buildAnchorGuideGeometry (const SIM_Options &options, const GU_DetailHandle &gdh, const SIM_Relationship &rel, const SIM_Time &t) const

Protected Member Functions

 SIM_ConAnchor (const SIM_DataFactory *factory)
virtual ~SIM_ConAnchor ()
void setReferencedObject (const SIM_Object *object)
virtual bool getNeedsInitSubclass () const
virtual void initAnchorSubclass (const SIM_Object *object)
virtual bool getObjectSpecificationSubclass (UT_String &str) const
 Implements the real functionality of getObjectSpecification.
virtual void initConstraintSubclass (const SIM_Relationship *rel)
virtual void buildAnchorGuideGeometrySubclass (const SIM_Options &options, const GU_DetailHandle &gdh, const SIM_Relationship &rel, const SIM_Time &t) const
 Default implementation does nothing.


Detailed Description

Definition of the relationship between a constraint and an anchor (typically part of a SIM_Object).

It knows 1) which object the anchor is associated with (may be none) 2) which part of that object (e.g., point, primitive, etc.) 3) the position, orientation and linear/angular velocities of the anchor

Definition at line 32 of file SIM_ConAnchor.h.


Constructor & Destructor Documentation

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

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


Member Function Documentation

void SIM_ConAnchor::buildAnchorGuideGeometry ( const SIM_Options options,
const GU_DetailHandle gdh,
const SIM_Relationship rel,
const SIM_Time t 
) const

Slight variation on buildGuideGeometry. It's just like buildGuideGeometry, but it will be called by the constraint using the anchor, and will add some extra options about the status of that constraint.

virtual void SIM_ConAnchor::buildAnchorGuideGeometrySubclass ( const SIM_Options options,
const GU_DetailHandle gdh,
const SIM_Relationship rel,
const SIM_Time t 
) const [protected, virtual]

Default implementation does nothing.

Reimplemented in SIM_ConAnchorRotational, and SIM_ConAnchorSpatial.

bool SIM_ConAnchor::getNeedsInit (  )  const

Returns true if the anchor has to be initialized before it is used. Initialization involves calling initAnchor() on the anchor, passing in the object we are attached to, so the anchor can customize itself to a particular object. This function calls getNeedsInitSubclass().

virtual bool SIM_ConAnchor::getNeedsInitSubclass (  )  const [protected, virtual]

Returns true if the anchor needs to have initAnchor() called. The default implementation returns false.

Reimplemented in SIM_ConAnchorAlignAxis, SIM_ConAnchorObjRotational, and SIM_ConAnchorObjSpatial.

bool SIM_ConAnchor::getObjectSpecification ( UT_String str  )  const

This function will return true if this anchor class requires an object specification otherwise it returns false. The returned string value can be used in an object filter expression.

virtual bool SIM_ConAnchor::getObjectSpecificationSubclass ( UT_String str  )  const [protected, virtual]

Implements the real functionality of getObjectSpecification.

Reimplemented in SIM_ConAnchorObjRotational, and SIM_ConAnchorObjSpatial.

const SIM_Object* SIM_ConAnchor::getReferencedObject ( const SIM_Time time  )  const

Get the object pointer stored by setReferencedObject(). This is the object that defines this anchor, if there is one. The object is interpolated to the specified simulation time so that the returned anchor values are properly interpolated.

void SIM_ConAnchor::initAnchor ( const SIM_Object object  ) 

This function performs any initialization that may be required to make a constraint specific to a particular object. For example, in spatial constraints, this function may convert a world space position parameter to an object space position. This function calls initAnchorSubclass().

virtual void SIM_ConAnchor::initAnchorSubclass ( const SIM_Object object  )  [protected, virtual]

Initializes the anchor for use by a solver. The default implementation does nothing.

Reimplemented in SIM_ConAnchorObjRotational, and SIM_ConAnchorObjSpatial.

void SIM_ConAnchor::initConstraint ( const SIM_Relationship rel  ) 

This function is responsible for calling the initAnchor function which initialize this anchor based on the owner relationship.

virtual void SIM_ConAnchor::initConstraintSubclass ( const SIM_Relationship rel  )  [protected, virtual]

Implements the real functionality of initConstraint. The default implementation calls initAnchor on the object from the relationship that we are interested in.

Reimplemented in SIM_ConAnchorAlignAxis.

void SIM_ConAnchor::setReferencedObject ( const SIM_Object object  )  [protected]

Sets the object that this anchor is defined by. Calling this function is the responsibility of the subclasses that are defined by objects. This function is generally called from initAnchorSubclass().


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

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