PhyHinge class. More...

Inheritance diagram for PhyHinge:

List of all members.

Public Member Functions

 PhyHinge (const wVector &axis, const wVector &centre, real startAngle, PhyObject *parent, PhyObject *child, bool cp=true)
 Constructor.
 PhyHinge (const wVector &axis, const wVector &centre, PhyObject *parent, PhyObject *child, bool cp=true)
 In this constructor startAngle is supposed to be zero.
 PhyHinge (const wVector &axis, PhyObject *parent, PhyObject *child, bool cp=true)
 In this constructor centre and realAngle are supposed to be zero.
 PhyHinge (const wVector &axis, const wVector &centre, const wVector &x_axis, PhyObject *parent, PhyObject *child, bool cp=true)
 In this constructor centre and realAngle are supposed to be zero.
 PhyHinge (const wVector &axis, real startAngle, PhyObject *parent, PhyObject *child, bool cp=true)
 In this constructor centre is supposed to be zero (center of parent PhyObject)
virtual wVector centre () const
 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

PhyHinge class.

\

Motivation
Hinge Joint.
Description
This joint add a revolute constraint around an axis :-)
Warnings
Warnings

Definition at line 43 of file phyhinge.h.


Constructor & Destructor Documentation

PhyHinge ( const wVector axis,
const wVector centre,
real  startAngle,
PhyObject parent,
PhyObject child,
bool  cp = true 
)

Constructor.

Parameters:
axisis the axis of rotation (respect to parent object frame)
centreis the center of rotation (respect to parent object frame)
startAngleis the initial angle of the joint at the moment of creation
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 axis in order to create the complete local coordinate frame of this joint

Definition at line 101 of file phyhinge.cpp.

PhyHinge ( const wVector axis,
const wVector centre,
PhyObject parent,
PhyObject child,
bool  cp = true 
)

In this constructor startAngle is supposed to be zero.

Definition at line 106 of file phyhinge.cpp.

PhyHinge ( const wVector axis,
real  startAngle,
PhyObject parent,
PhyObject child,
bool  cp = true 
)

In this constructor centre is supposed to be zero (center of parent PhyObject)

Definition at line 111 of file phyhinge.cpp.

PhyHinge ( const wVector axis,
PhyObject parent,
PhyObject child,
bool  cp = true 
)

In this constructor centre and realAngle are supposed to be zero.

Definition at line 116 of file phyhinge.cpp.

PhyHinge ( const wVector axis,
const wVector centre,
const wVector x_axis,
PhyObject parent,
PhyObject child,
bool  cp = true 
)

In this constructor centre and realAngle are supposed to be zero.

Parameters:
x_axisis the desired X local axis for joint frame (reference for zero angle)

Definition at line 121 of file phyhinge.cpp.

References PhyHinge::centre(), PhyHinge::createPrivateJoint(), PhyJoint::dofsv, PhyJoint::dofv, PhyHinge::globalMatrixParent, wMatrix::inverse(), PhyHinge::localMatrixChild, PhyHinge::localMatrixParent, WObject::matrix(), wMatrix::sanitifize(), and wMatrix::sanityCheck().


Member Function Documentation

wVector centre ( ) const [virtual]

Return the centre of this joint in world coordinate.

Implements PhyJoint.

Definition at line 164 of file phyhinge.cpp.

References PhyHinge::globalMatrixParent, PhyHinge::localMatrixParent, WObject::matrix(), and PhyJoint::parent().

Referenced by PhyHinge::PhyHinge().

void createPrivateJoint ( ) [protected]

Engine encapsulation.

Definition at line 172 of file phyhinge.cpp.

References PhyJoint::priv.

Referenced by PhyHinge::PhyHinge().


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 105 of file phyhinge.h.

Referenced by PhyHinge::updateJointInfo().

wMatrix globalMatrixParent [mutable, 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. Note: This is mutable because it can be changed in the centre() const function

Definition at line 99 of file phyhinge.h.

Referenced by PhyHinge::centre(), PhyHinge::PhyHinge(), and PhyHinge::updateJointInfo().

Local frame of the joint respect to the child matrix.

Definition at line 87 of file phyhinge.h.

Referenced by PhyHinge::PhyHinge(), and PhyHinge::updateJointInfo().

Local frame of the joint respect to the parent matrix.

This matrix is calculated from Axis and Centre passed to constructor Axis will became the Z-axis of local frame (axis of rotation), and the two others axes are calculated in order to get a local frame Centre is copied as it is into w_pos of localMatrixParent

Definition at line 85 of file phyhinge.h.

Referenced by PhyHinge::centre(), PhyHinge::PhyHinge(), and PhyHinge::updateJointInfo().


The documentation for this class was generated from the following files: