PhyUniversal Class Reference
PhyUniversal class. More...

Public Member Functions | |
PhyUniversal (const wVector &firstAxis, const wVector &secondAxis, const wVector ¢re, PhyObject *parent, PhyObject *child, bool cp=true) | |
Constructor. | |
virtual wVector | centre () |
Return the centre of this joint in world coordinate. | |
virtual void | updateJointInfo () |
Update the Joint informations (each PhyDOF will be updated) | |
Protected Member Functions | |
void | createPrivateJoint () |
Engine encapsulation. | |
virtual void | updateJoint (real timestep) |
Protected Attributes | |
wMatrix | globalMatrixChild |
Global Matrix respect to Child. | |
wMatrix | globalMatrixParent |
Global Matrix respect to Parent. | |
wMatrix | localMatrixChild |
Local frame of the joint respect to the child matrix. | |
wMatrix | localMatrixParent |
Local frame of the joint respect to the parent matrix. |
Detailed Description
PhyUniversal class.
\
- Motivation
- Universal Joint.
- Description
- This joint add two degree of freedom around two axis :-)
- Warnings
- Warnings
Definition at line 43 of file phyuniversal.h.
Constructor & Destructor Documentation
PhyUniversal | ( | const wVector & | firstAxis, |
const wVector & | secondAxis, | ||
const wVector & | centre, | ||
PhyObject * | parent, | ||
PhyObject * | child, | ||
bool | cp = true |
||
) |
Constructor.
- Parameters:
-
firstAxis is the axis of rotation (respect to parent object frame) secondAxis is the second axis of rotation (must be ortogonal respect to firstAxis) centre is the center of rotation (respect to parent object frame) parent is the parent object. child is the child object cp is internal; ignore it The local frame is translated toward centre and the Z axis is aligned with the first axis and the Y axis is aligned to second Axis
Definition at line 27 of file phyuniversal.cpp.
References PhyUniversal::centre(), PhyUniversal::createPrivateJoint(), PhyJoint::dofsv, PhyJoint::dofv, PhyUniversal::globalMatrixChild, PhyUniversal::globalMatrixParent, wMatrix::inverse(), PhyUniversal::localMatrixChild, PhyUniversal::localMatrixParent, WObject::matrix(), wMatrix::sanitifize(), and wMatrix::sanityCheck().
Member Function Documentation
wVector centre | ( | ) | [virtual] |
Return the centre of this joint in world coordinate.
Definition at line 78 of file phyuniversal.cpp.
References PhyUniversal::globalMatrixParent, PhyUniversal::localMatrixParent, WObject::matrix(), and PhyJoint::parent().
Referenced by PhyUniversal::PhyUniversal().
void createPrivateJoint | ( | ) | [protected] |
Engine encapsulation.
Definition at line 86 of file phyuniversal.cpp.
References PhyJoint::priv.
Referenced by PhyUniversal::PhyUniversal().
void updateJointInfo | ( | ) | [virtual] |
Update the Joint informations (each PhyDOF will be updated)
Implements PhyJoint.
Definition at line 93 of file phyuniversal.cpp.
References PhyJoint::child(), PhyUniversal::globalMatrixChild, PhyUniversal::globalMatrixParent, wMatrix::identity(), PhyUniversal::localMatrixChild, PhyUniversal::localMatrixParent, WObject::matrix(), PhyJoint::parent(), wMatrix::sanitifize(), and wMatrix::sanityCheck().
Member Data Documentation
wMatrix globalMatrixChild [protected] |
Global Matrix respect to Child.
This represent the local frame of joint in global coordinate starting from localMatrixParent representation.
Definition at line 87 of file phyuniversal.h.
Referenced by PhyUniversal::PhyUniversal(), and PhyUniversal::updateJointInfo().
wMatrix globalMatrixParent [protected] |
Global Matrix respect to Parent.
This represent the local frame of joint in global coordinate starting from localMatrixParent representation.
Note: The differences between globalMatrixParent and globalMatrixChild are due to numerical error on joint solver of physic engine used.
Definition at line 81 of file phyuniversal.h.
Referenced by PhyUniversal::centre(), PhyUniversal::PhyUniversal(), and PhyUniversal::updateJointInfo().
wMatrix localMatrixChild [protected] |
Local frame of the joint respect to the child matrix.
Definition at line 71 of file phyuniversal.h.
Referenced by PhyUniversal::PhyUniversal(), and PhyUniversal::updateJointInfo().
wMatrix localMatrixParent [protected] |
Local frame of the joint respect to the parent matrix.
This matrix is calculated from firstAxis and secondAxis passed to constructor Centre is copied as it is into w_pos of localMatrixParent
Definition at line 69 of file phyuniversal.h.
Referenced by PhyUniversal::centre(), PhyUniversal::PhyUniversal(), and PhyUniversal::updateJointInfo().
The documentation for this class was generated from the following files:
- worldsim/include/phyuniversal.h
- worldsim/src/phyuniversal.cpp