Public Member Functions | |
PhyHinge (const wVector &axis, const wVector ¢re, real startAngle, PhyObject *parent, PhyObject *child, bool cp=true) | |
Constructor. | |
PhyHinge (const wVector &axis, const wVector ¢re, PhyObject *parent, PhyObject *child, bool cp=true) | |
In this constructor startAngle is 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) | |
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 ¢re, const wVector &x_axis, PhyObject *parent, PhyObject *child, bool cp=true) | |
In this constructor centre and realAngle are supposed to be zero. | |
virtual wVector | centre () const |
Return the centre of this joint in world coordinate. | |
virtual wVector | getForceOnJoint () const |
Returns the force applied to this joint. | |
virtual void | updateJointInfo () |
Update the Joint informations (each PhyDOF will be updated) | |
Public Member Functions inherited from PhyJoint | |
PhyJoint (PhyObject *parent, PhyObject *child) | |
Constructor. | |
virtual | ~PhyJoint () |
Destructor. | |
virtual PhyObject * | child () |
Return the child object attached to this joint (see Newton Documentation) | |
virtual const PhyObject * | child () const |
Return the child object attached to this joint (see Newton Documentation) (const version) | |
virtual QVector< PhyDOF * > | dofs () |
Return descriptions of DOF. | |
void | enable (bool b) |
enable/disable the joint | |
bool | isEnabled () const |
Return true if the joint is enabled. | |
virtual unsigned int | numDofs () const |
Return the number of DOF constrained by this joint. | |
virtual PhyObject * | parent () |
Return the parent object; (NULL means an object attached to static world; see Netwon Documentation) | |
virtual const PhyObject * | parent () const |
Return the parent object; (NULL means an object attached to static world; see Netwon Documentation) (const version) | |
virtual void | postUpdate () |
postUpdate the PhyJoint this method is called at each step of the world just after the physic update | |
virtual void | preUpdate () |
preUpdate the PhyJoint this method is called at each step of the world just before the physic update | |
World * | world () |
Return the World. | |
const World * | world () const |
Return the World (const version) | |
Public Member Functions inherited from Ownable | |
Ownable () | |
Constructor. | |
virtual | ~Ownable () |
Destructor. | |
const QList< Owned > & | owned () const |
Returns the list of objects owned by this one. | |
Ownable * | owner () const |
Returns the owner of this object. | |
void | setOwner (Ownable *owner, bool destroy=true) |
Sets the owner of this object. | |
Protected Member Functions | |
void | createPrivateJoint () |
Engine encapsulation. | |
virtual void | updateJoint (real timestep) |
Protected Attributes | |
wVector | forceOnJoint |
The force applied to this joint. | |
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. | |
Protected Attributes inherited from PhyJoint | |
PhyObjectPrivate * | childpriv |
PhyObject * | childv |
child object | |
QVector< PhyDOF * > | dofsv |
vector of DOF's joint | |
int | dofv |
number of DOF | |
bool | enabled |
true if is enabled, false otherwise | |
PhyObjectPrivate * | parentpriv |
PhyObject * | parentv |
parent object | |
PhyJointPrivate * | priv |
Engine encapsulation. | |
WorldPrivate * | worldpriv |
World * | worldv |
world | |
Additional Inherited Members | |
Public Types inherited from Ownable | |
typedef QList< Owned > | OwnedList |
The type for the list of owned objects. | |
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
-
axis is the axis of rotation (respect to parent object frame) centre is the center of rotation (respect to parent object frame) startAngle is the initial angle of the joint at the moment of creation 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 axis in order to create the complete local coordinate frame of this joint
Definition at line 105 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 110 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 115 of file phyhinge.cpp.
In this constructor centre and realAngle are supposed to be zero.
Definition at line 120 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_axis is the desired X local axis for joint frame (reference for zero angle)
Definition at line 125 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
|
virtual |
Return the centre of this joint in world coordinate.
Implements PhyJoint.
Definition at line 168 of file phyhinge.cpp.
References PhyHinge::globalMatrixParent, PhyHinge::localMatrixParent, WObject::matrix(), and PhyJoint::parent().
Referenced by PhyHinge::PhyHinge().
|
protected |
Engine encapsulation.
Definition at line 181 of file phyhinge.cpp.
References PhyJoint::priv.
Referenced by PhyHinge::PhyHinge().
|
virtual |
Returns the force applied to this joint.
Implements PhyJoint.
Definition at line 176 of file phyhinge.cpp.
References PhyHinge::forceOnJoint.
|
virtual |
Update the Joint informations (each PhyDOF will be updated)
Implements PhyJoint.
Definition at line 188 of file phyhinge.cpp.
References PhyJoint::child(), PhyJoint::dofsv, PhyJoint::enabled, PhyHinge::globalMatrixChild, PhyHinge::globalMatrixParent, PhyHinge::localMatrixChild, PhyHinge::localMatrixParent, WObject::matrix(), PhyJoint::parent(), PhyDOF::position(), PhyJoint::priv, wMatrix::sanityCheck(), World::timeStep(), and PhyJoint::world().
Referenced by PhyMarXbot::changedMatrix(), and PhyMarXbot::doKinematicSimulation().
Member Data Documentation
|
protected |
The force applied to this joint.
Definition at line 113 of file phyhinge.h.
Referenced by PhyHinge::getForceOnJoint().
|
protected |
Global Matrix respect to Child.
This represent the local frame of joint in global coordinate starting from localMatrixParent representation.
Definition at line 109 of file phyhinge.h.
Referenced by PhyHinge::updateJointInfo().
|
mutableprotected |
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 103 of file phyhinge.h.
Referenced by PhyHinge::centre(), PhyHinge::PhyHinge(), and PhyHinge::updateJointInfo().
|
protected |
Local frame of the joint respect to the child matrix.
Definition at line 91 of file phyhinge.h.
Referenced by PhyHinge::PhyHinge(), and PhyHinge::updateJointInfo().
|
protected |
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 89 of file phyhinge.h.
Referenced by PhyHinge::centre(), PhyHinge::PhyHinge(), and PhyHinge::updateJointInfo().
The documentation for this class was generated from the following files:
- worldsim/include/phyhinge.h
- worldsim/src/phyhinge.cpp