PhyUniversal class. More...

Inheritance diagram for PhyUniversal:

List of all members.

Public Member Functions

 PhyUniversal (const wVector &firstAxis, const wVector &secondAxis, const wVector &centre, 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:
firstAxisis the axis of rotation (respect to parent object frame)
secondAxisis the second axis of rotation (must be ortogonal respect to firstAxis)
centreis the center of rotation (respect to parent object frame)
parentis the parent object.
childis the child object
cpis 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().


Member Data Documentation

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().

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().

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().

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: