#include <SIM_ConAnchorRotational.h>

Public Types | |
| enum | SIM_DOFType { DOF_FREE = 0, DOF_PLANEJOINT = 1, DOF_HINGE = 2, DOF_ORIENT = 3 } |
| We need better names for these. More... | |
Public Member Functions | |
| GETSET_DATA_FUNCS_V3 (SIM_NAME_ROTATION, RotationInput) | |
| GETSET_DATA_FUNCS_E (SIM_NAME_CONDOF, DOFTypeInput, SIM_DOFType) | |
| GETSET_DATA_FUNCS_V3 (SIM_NAME_CONDIR, DOFVectorInput) | |
| const UT_Vector3 | getRotation () const |
| Overridable get/set for Rotation and DOF of constraint. | |
| void | setRotation (const UT_Vector3 &rotation) |
| SIM_DOFType | getDOFType () const |
| void | setDOFType (const SIM_DOFType type) |
| const UT_Vector3 | getDOFVector () const |
| void | setDOFVector (const UT_Vector3 &vector) |
| UT_Vector3 | getGuidePosition (const SIM_Time &t) const |
| Retrieve the world-space position for the guide geometry. | |
| UT_Quaternion | getOrientation (const SIM_Time &time) const |
| Retrieve the world-space orientation to constrain to. | |
| UT_Vector3 | getAngularVelocity (const SIM_Time &time) const |
| int | getNumConDOFs () const |
| Retrieve number of constrained degrees of freedom. | |
| void | getConDOFFilter (UT_Matrix3 &result, const SIM_Time &time) const |
| void | getUnconDOFFilter (UT_Matrix3 &result, const SIM_Time &time) const |
Protected Member Functions | |
| SIM_ConAnchorRotational (const SIM_DataFactory *f) | |
| virtual | ~SIM_ConAnchorRotational () |
| virtual void | buildAnchorGuideGeometrySubclass (const SIM_Options &options, const GU_DetailHandle &gdh, const SIM_Relationship &rel, const SIM_Time &t) const |
| Default implementation does nothing. | |
| virtual UT_Vector3 | getGuidePositionSubclass (const SIM_Time &time) const |
| virtual UT_Quaternion | getOrientationSubclass (const SIM_Time &time) const =0 |
| virtual UT_Vector3 | getAngularVelocitySubclass (const SIM_Time &time) const =0 |
| virtual const UT_Vector3 | getRotationSubclass () const |
| virtual SIM_DOFType | getDOFTypeSubclass () const |
| virtual const UT_Vector3 | getDOFVectorSubclass () const |
Definition at line 28 of file SIM_ConAnchorRotational.h.
We need better names for these.
Definition at line 34 of file SIM_ConAnchorRotational.h.
| SIM_ConAnchorRotational::SIM_ConAnchorRotational | ( | const SIM_DataFactory * | f | ) | [explicit, protected] |
| virtual SIM_ConAnchorRotational::~SIM_ConAnchorRotational | ( | ) | [protected, virtual] |
| virtual void SIM_ConAnchorRotational::buildAnchorGuideGeometrySubclass | ( | const SIM_Options & | options, | |
| const GU_DetailHandle & | gdh, | |||
| const SIM_Relationship & | rel, | |||
| const SIM_Time & | t | |||
| ) | const [protected, virtual] |
| UT_Vector3 SIM_ConAnchorRotational::getAngularVelocity | ( | const SIM_Time & | time | ) | const |
| virtual UT_Vector3 SIM_ConAnchorRotational::getAngularVelocitySubclass | ( | const SIM_Time & | time | ) | const [protected, pure virtual] |
Implemented in SIM_ConAnchorAlignAxis, SIM_ConAnchorObjPointRot, SIM_ConAnchorObjRotational, and SIM_ConAnchorWorldSpaceRot.
| void SIM_ConAnchorRotational::getConDOFFilter | ( | UT_Matrix3 & | result, | |
| const SIM_Time & | time | |||
| ) | const |
Returns a matrix that, when multiplied by a angular velocity, gives only the components of the angular velocity that are constrained.
| SIM_DOFType SIM_ConAnchorRotational::getDOFType | ( | ) | const |
| virtual SIM_DOFType SIM_ConAnchorRotational::getDOFTypeSubclass | ( | ) | const [protected, virtual] |
| const UT_Vector3 SIM_ConAnchorRotational::getDOFVector | ( | ) | const |
| virtual const UT_Vector3 SIM_ConAnchorRotational::getDOFVectorSubclass | ( | ) | const [protected, virtual] |
| UT_Vector3 SIM_ConAnchorRotational::getGuidePosition | ( | const SIM_Time & | t | ) | const |
Retrieve the world-space position for the guide geometry.
| virtual UT_Vector3 SIM_ConAnchorRotational::getGuidePositionSubclass | ( | const SIM_Time & | time | ) | const [protected, virtual] |
Reimplemented in SIM_ConAnchorObjPointRot, SIM_ConAnchorObjSpaceRot, and SIM_ConAnchorWorldSpaceRot.
| int SIM_ConAnchorRotational::getNumConDOFs | ( | ) | const |
Retrieve number of constrained degrees of freedom.
| UT_Quaternion SIM_ConAnchorRotational::getOrientation | ( | const SIM_Time & | time | ) | const |
Retrieve the world-space orientation to constrain to.
| virtual UT_Quaternion SIM_ConAnchorRotational::getOrientationSubclass | ( | const SIM_Time & | time | ) | const [protected, pure virtual] |
| const UT_Vector3 SIM_ConAnchorRotational::getRotation | ( | ) | const |
Overridable get/set for Rotation and DOF of constraint.
| virtual const UT_Vector3 SIM_ConAnchorRotational::getRotationSubclass | ( | ) | const [protected, virtual] |
| SIM_ConAnchorRotational::GETSET_DATA_FUNCS_E | ( | SIM_NAME_CONDOF | , | |
| DOFTypeInput | , | |||
| SIM_DOFType | ||||
| ) |
| SIM_ConAnchorRotational::GETSET_DATA_FUNCS_V3 | ( | SIM_NAME_CONDIR | , | |
| DOFVectorInput | ||||
| ) |
All constraints are represented by a vector which is interpreted differently depending on how many DOF will be constrained.
If O is the orientation to constrain, and Q the rest orientation, and V the vector: Free constraint: O = O No constraint occurs.
Plane constraint: (O / Q) . V = 0 The rotation which maps from Q to O should not have any component of V in it. This allows all orientations which can be reached from Q by rotating around a vector perpendicular to V.
Hinge constraint: (O / Q) = s V, for some s There is one degree of freedom. The set of valid orientations are those that can be reached from Q by rotating around V.
Orient constraint: O = Q The quaternion is fully constrained.
Through further abuse of notation, we can define the UnconDOFFilter which when applied to an angular velocity will cause it to fulfill those conditions. We can then clamp a quaternion O into the desired value Q according to the filter uF with: O' = ((uF) * (O / Q)) * Q
(Note that uF is symmetric and O/Q a vector, so we don't have to worry which side we multiply it on.)
This vector is defined in *object* space. (Ie, a value of (1, 0, 0) means that the X axis of the object should point in the fashion that the X axis of O does)
| SIM_ConAnchorRotational::GETSET_DATA_FUNCS_V3 | ( | SIM_NAME_ROTATION | , | |
| RotationInput | ||||
| ) |
| void SIM_ConAnchorRotational::getUnconDOFFilter | ( | UT_Matrix3 & | result, | |
| const SIM_Time & | time | |||
| ) | const |
Opposite of getConDOFFilter(). getUnconDOFFilter() = identity - getConDOFFilter()
| void SIM_ConAnchorRotational::setDOFType | ( | const SIM_DOFType | type | ) |
| void SIM_ConAnchorRotational::setDOFVector | ( | const UT_Vector3 & | vector | ) |
| void SIM_ConAnchorRotational::setRotation | ( | const UT_Vector3 & | rotation | ) |
1.5.9