TBasicConstraint Class Reference
[Base Classes for plugins]

Inheritance diagram for TBasicConstraint:

I3DExConstraint TBasicDataExchanger IMCUnknown TBasicUnknown IMCUnknown List of all members.

Public Member Functions

virtual MCCOMErr MCCOMAPI QueryInterface (const MCIID &riid, void **ppvObj)
virtual uint32 MCCOMAPI AddRef ()
virtual int16 MCCOMAPI GetNbrFreedom () const
virtual MCCOMErr MCCOMAPI IncrementFreedomValue (int16 index, real &increment)
virtual MCCOMErr MCCOMAPI GetMotionLimit (int16 index, ELimitType &limit) const
virtual MCCOMErr MCCOMAPI GetFreedomRange (int16 index, real &min, real &max) const
virtual MCCOMErr MCCOMAPI GetTransform (TTransform3D &transform) const
virtual MCCOMErr MCCOMAPI GetTransformPartialDerivate (int16 index, TTransform3D &transform) const
virtual MCCOMErr MCCOMAPI GetTransformSecondPartialDerivative (int16 index1, int16 index2, TTransform3D &transform) const
virtual MCCOMErr MCCOMAPI SetTransform (TTransform3D &transform)
virtual boolean MCCOMAPI IsTransformResetRequired ()
virtual MCCOMErr MCCOMAPI ResetConstraint ()

Detailed Description

Basic constraint class. Derive from this for a default implementation of I3DExConstraint
See also:
I3DExConstraint


Member Function Documentation

virtual uint32 MCCOMAPI TBasicConstraint::AddRef (   )  [inline, virtual]
 

Increments the reference count of the object

Reimplemented from TBasicUnknown.

virtual MCCOMErr MCCOMAPI TBasicConstraint::GetFreedomRange (  int16  index,
real &  min,
real &  max
)  const [virtual]
 

Returns the maximum range of increment and decrement for a given degree of freedom.

Parameters:
index The index of the degree of freedom
min The minimum value
max The maximum value

Implements I3DExConstraint.

virtual MCCOMErr MCCOMAPI TBasicConstraint::GetMotionLimit (  int16  index,
ELimitType &  limit
)  const [virtual]
 

Returns the constraint for a given degree of freedom.

Implements I3DExConstraint.

virtual int16 MCCOMAPI TBasicConstraint::GetNbrFreedom (   )  const [virtual]
 

Returns the number of degrees of freedom. Because the freedom value can be limited, you have to give the range of values. This range is defined as a range of increment/decrement around the value.

Implements I3DExConstraint.

virtual MCCOMErr MCCOMAPI TBasicConstraint::GetTransform (  TTransform3D &  transform  )  const [virtual]
 

Returns the rotation matrix and translation vector due to the freedom values.

Note:
When the freedom values are initialized the function GetTransform must return the identity matrix for the rotation and a null vector for the translation.
Parameters:
transform A reference to a transform.

Implements I3DExConstraint.

virtual MCCOMErr MCCOMAPI TBasicConstraint::GetTransformPartialDerivate (  int16  index,
TTransform3D &  transform
)  const [virtual]
 

To allow the inverse kinematics mechanism to work with a constraint, implement the GetTransfromPartialDerivate() function. A partial derivative transformation is a transformation where each element is derived by a freedom degree.

Parameters:
index The degree of freedom used to derivate the transform.
transform The partial derivative of the transform.

Implements I3DExConstraint.

virtual MCCOMErr MCCOMAPI TBasicConstraint::GetTransformSecondPartialDerivative (  int16  index1,
int16  index2,
TTransform3D &  transform
)  const [virtual]
 

Returns the second order partial derivative of the transform. A partial derivative transformation is a transformation where each element is derived by a freedom degree.

Parameters:
index1 The first degree of freedom used to derivate the transform.
index2 The second degree of freedom used to derivate the transform.
transform The partial derivative of the transform.

Implements I3DExConstraint.

virtual MCCOMErr MCCOMAPI TBasicConstraint::IncrementFreedomValue (  int16  index,
real &  increment
)  [virtual]
 

Modify the value of a degree of freedom by adding an increment

Parameters:
index The degree of freedom
See also:
EFreedomDegree
Parameters:
increment The increment value

Implements I3DExConstraint.

virtual boolean MCCOMAPI TBasicConstraint::IsTransformResetRequired (   )  [virtual]
 

Call this after an event in the constraint chooser a reset is required when the constraint has changed in nature or in axis that is when the transform will no longer match the default is return true if you did not handle the change

Implements I3DExConstraint.

virtual MCCOMErr MCCOMAPI TBasicConstraint::QueryInterface (  const MCIID &  riid,
void **  ppvObj
)  [virtual]
 

Check if the object supports a given interface and returns a pointer to that interface if it does. Note that QueryInterface will increment the reference count of the object by one if the interface is found.

Parameters:
riid GUID of the interface
ppvObj A pointer to the pointer being returned.

Reimplemented from TBasicDataExchanger.

virtual MCCOMErr MCCOMAPI TBasicConstraint::ResetConstraint (   )  [virtual]
 

Reset the constraint. (called when IsTransformResetRequired() returns True).

Implements I3DExConstraint.

virtual MCCOMErr MCCOMAPI TBasicConstraint::SetTransform (  TTransform3D &  transform  )  [virtual]
 

Sets the transformation matrix.

Implements I3DExConstraint.


The documentation for this class was generated from the following file:
Generated on Mon Mar 14 12:29:06 2005 for Carrara SDK Doc by  doxygen 1.3.9.1