UniversalJoint Class Reference
#include <Joints.h>
Inherits Joint.

Public Member Functions | |
| UniversalJoint () | |
| virtual | ~UniversalJoint () |
| void | setAnchor (float anchorX, float anchorY, float anchorZ) |
| void | setAxis1 (float axisX, float axisY, float axisZ) |
| void | setAxis2 (float axisX, float axisY, float axisZ) |
| virtual void | getMemberValue (std::string type, void *result) |
| virtual void | setMemberValue (std::string type, void *source) |
Protected Member Functions | |
| virtual void | attachJoint (dBodyID obj1, dBodyID obj2) |
| virtual void | detachJoint () |
Protected Attributes | |
| gmtl::Vec3f | anchor |
| gmtl::Vec3f | axis1 |
| gmtl::Vec3f | axis2 |
Detailed Description
This joint is built out of 2 hinge joints, which are perpendicular to each other. This joint can be defined by setting the Anchor point and the 2 Axes.Constructor & Destructor Documentation
| UniversalJoint::UniversalJoint | ( | ) |
| virtual UniversalJoint::~UniversalJoint | ( | ) | [inline, virtual] |
Member Function Documentation
| void UniversalJoint::attachJoint | ( | dBodyID | obj1, | |
| dBodyID | obj2 | |||
| ) | [protected, virtual] |
| void UniversalJoint::detachJoint | ( | ) | [protected, virtual] |
This method is called if the joint should be detached. It updates the new axis information since the axis can change their orientation in UniversalJoints
Implements Joint.
| void UniversalJoint::getMemberValue | ( | std::string | type, | |
| void * | result | |||
| ) | [virtual] |
This method copies the value of the field with the passed name to the result-pointer. It is a little helper to avoid type-casts when accessing joint-pointers.
- Parameters:
-
type name of the field result destination where the value should be stored
Implements Joint.
| void UniversalJoint::setAnchor | ( | float | anchorX, | |
| float | anchorY, | |||
| float | anchorZ | |||
| ) |
This method sets the Anchor of the Joint in OBJECT-COORDINATES!!! This means that the Anchor is relative to the position of the main EntityTransform. Take care that the Anchor-offset is also scaled by the scale-Value of the EntityTransform. The reason for using object coordinates is because modelers can easily read the offset out of the modelling application.
- Parameters:
-
anchorX X-position of the Anchor anchorY Y-position of the Anchor anchorZ Z-position of the Anchor
| void UniversalJoint::setAxis1 | ( | float | axisX, | |
| float | axisY, | |||
| float | axisZ | |||
| ) |
This method sets the first Axis of the Joint in OBJECT-COORDINATES!!! This means that the axis is rotated by the rotation-value of the main EntityTransform.
- Parameters:
-
axisX X-value of the Axis axisY Y-value of the Axis axisZ Z-value of the Axis
| void UniversalJoint::setAxis2 | ( | float | axisX, | |
| float | axisY, | |||
| float | axisZ | |||
| ) |
This method sets the second Axis of the Joint in OBJECT-COORDINATES!!! This means that the axis is rotated by the rotation-value of the main EntityTransform.
- Parameters:
-
axisX X-value of the Axis axisY Y-value of the Axis axisZ Z-value of the Axis
| void UniversalJoint::setMemberValue | ( | std::string | type, | |
| void * | source | |||
| ) | [virtual] |
Implements Joint.
Member Data Documentation
gmtl::Vec3f UniversalJoint::anchor [protected] |
gmtl::Vec3f UniversalJoint::axis1 [protected] |
gmtl::Vec3f UniversalJoint::axis2 [protected] |
The documentation for this class was generated from the following files:
- src/inVRs/Modules/JointInteraction/Joints.h
- src/inVRs/Modules/JointInteraction/Joints.cpp
Generated on Wed Oct 20 16:12:02 2010 for inVRs by
1.5.8