PhyUniversal class. More...

Inheritance diagram for PhyUniversal:

Public Member Functions

 PhyUniversal (const wVector &firstAxis, const wVector &secondAxis, const wVector &centre, PhyObject *parent, PhyObject *child, bool cp=true)
 Constructor. More...
 
virtual wVector centre ()
 Return the centre of this joint in world coordinate. More...
 
virtual wVector getForceOnJoint () const
 Returns the force applied to this joint. More...
 
virtual void updateJointInfo ()
 Update the Joint informations (each PhyDOF will be updated) More...
 
- Public Member Functions inherited from PhyJoint
 PhyJoint (PhyObject *parent, PhyObject *child)
 Constructor. More...
 
virtual ~PhyJoint ()
 Destructor. More...
 
virtual wVector centre () const =0
 Return the centre of this joint in world coordinate. More...
 
virtual PhyObjectchild ()
 Return the child object attached to this joint (see Newton Documentation) More...
 
virtual const PhyObjectchild () const
 Return the child object attached to this joint (see Newton Documentation) (const version) More...
 
virtual QVector< PhyDOF * > dofs ()
 Return descriptions of DOF. More...
 
void enable (bool b)
 enable/disable the joint More...
 
bool isEnabled () const
 Return true if the joint is enabled. More...
 
virtual unsigned int numDofs () const
 Return the number of DOF constrained by this joint. More...
 
virtual PhyObjectparent ()
 Return the parent object; (NULL means an object attached to static world; see Netwon Documentation) More...
 
virtual const PhyObjectparent () const
 Return the parent object; (NULL means an object attached to static world; see Netwon Documentation) (const version) More...
 
virtual void postUpdate ()
 postUpdate the PhyJoint this method is called at each step of the world just after the physic update More...
 
virtual void preUpdate ()
 preUpdate the PhyJoint this method is called at each step of the world just before the physic update More...
 
Worldworld ()
 Return the World. More...
 
const Worldworld () const
 Return the World (const version) More...
 
- Public Member Functions inherited from Ownable
 Ownable ()
 Constructor. More...
 
virtual ~Ownable ()
 Destructor. More...
 
const QList< Owned > & owned () const
 Returns the list of objects owned by this one. More...
 
Ownableowner () const
 Returns the owner of this object. More...
 
void setOwner (Ownable *owner, bool destroy=true)
 Sets the owner of this object. More...
 

Protected Member Functions

void createPrivateJoint ()
 Engine encapsulation. More...
 
virtual void updateJoint (real timestep)
 

Protected Attributes

wVector forceOnJoint
 The force applied to this joint. More...
 
wMatrix globalMatrixChild
 Global Matrix respect to Child. More...
 
wMatrix globalMatrixParent
 Global Matrix respect to Parent. More...
 
wMatrix localMatrixChild
 Local frame of the joint respect to the child matrix. More...
 
wMatrix localMatrixParent
 Local frame of the joint respect to the parent matrix. More...
 
- Protected Attributes inherited from PhyJoint
PhyObjectPrivate * childpriv
 
PhyObjectchildv
 child object More...
 
QVector< PhyDOF * > dofsv
 vector of DOF's joint More...
 
int dofv
 number of DOF More...
 
bool enabled
 true if is enabled, false otherwise More...
 
PhyObjectPrivate * parentpriv
 
PhyObjectparentv
 parent object More...
 
PhyJointPrivate * priv
 Engine encapsulation. More...
 
WorldPrivate * worldpriv
 
Worldworldv
 world More...
 

Additional Inherited Members

- Public Types inherited from Ownable
typedef QList< OwnedOwnedList
 The type for the list of owned objects. More...
 

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::forceOnJoint, 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 79 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 92 of file phyuniversal.cpp.

References PhyJoint::priv.

Referenced by PhyUniversal::PhyUniversal().

wVector getForceOnJoint ( ) const
virtual

Returns the force applied to this joint.

Implements PhyJoint.

Definition at line 87 of file phyuniversal.cpp.

References PhyUniversal::forceOnJoint.

Member Data Documentation

wVector forceOnJoint
protected

The force applied to this joint.

Definition at line 95 of file phyuniversal.h.

Referenced by PhyUniversal::getForceOnJoint(), and PhyUniversal::PhyUniversal().

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 91 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 85 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 75 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 73 of file phyuniversal.h.

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


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