PhyJoint class. More...

Inheritance diagram for PhyJoint:

Public Member Functions

 PhyJoint (PhyObject *parent, PhyObject *child)
 Constructor.
 
virtual ~PhyJoint ()
 Destructor.
 
virtual wVector centre () const =0
 Return the centre of this joint in world coordinate.
 
virtual PhyObjectchild ()
 Return the child object attached to this joint (see Newton Documentation)
 
virtual const PhyObjectchild () 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
 
virtual wVector getForceOnJoint () const =0
 Returns the force applied to this 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 PhyObjectparent ()
 Return the parent object; (NULL means an object attached to static world; see Netwon Documentation)
 
virtual const PhyObjectparent () 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
 
virtual void updateJointInfo ()=0
 Update the Joint informations (each PhyDOF will be updated)
 
Worldworld ()
 Return the World.
 
const Worldworld () 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.
 
Ownableowner () const
 Returns the owner of this object.
 
void setOwner (Ownable *owner, bool destroy=true)
 Sets the owner of this object.
 

Protected Member Functions

virtual void updateJoint (real timestep)=0
 

Protected Attributes

PhyObjectPrivate * childpriv
 
PhyObjectchildv
 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
 
PhyObjectparentv
 parent object
 
PhyJointPrivate * priv
 Engine encapsulation.
 
WorldPrivate * worldpriv
 
Worldworldv
 world
 

Friends

class PhyJointPrivate
 

Additional Inherited Members

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

Detailed Description

PhyJoint class.

\

Motivation
Common interface among Joints.
Description
This joint doesn't add constraints... so, it's a zero-DOF joint :-)
Warnings
Warnings

Definition at line 346 of file phyjoint.h.

Constructor & Destructor Documentation

PhyJoint ( PhyObject parent,
PhyObject child 
)

Constructor.

Parameters
parentis the parent object. The local frame is translated toward centre for create the complete local coordinate frame of this joint
childis the child object

Definition at line 30 of file phyjoint.cpp.

References PhyJoint::child(), PhyJoint::childv, PhyJoint::enabled, PhyJoint::parent(), PhyJoint::parentv, PhyObject::priv, PhyJoint::priv, WObject::world(), and PhyJoint::worldv.

~PhyJoint ( )
virtual

Destructor.

Definition at line 52 of file phyjoint.cpp.

References PhyJoint::dofsv, PhyJoint::priv, and PhyJoint::worldv.

Member Function Documentation

virtual wVector centre ( ) const
pure virtual

Return the centre of this joint in world coordinate.

Implemented in PhyHinge, PhySuspension, PhyFixed, and PhyBallAndSocket.

virtual PhyObject* child ( )
inlinevirtual

Return the child object attached to this joint (see Newton Documentation)

Definition at line 358 of file phyjoint.h.

Referenced by PhyJoint::PhyJoint(), PhyBallAndSocket::updateJointInfo(), PhyFixed::updateJointInfo(), PhySuspension::updateJointInfo(), PhyUniversal::updateJointInfo(), and PhyHinge::updateJointInfo().

virtual const PhyObject* child ( ) const
inlinevirtual

Return the child object attached to this joint (see Newton Documentation) (const version)

Definition at line 362 of file phyjoint.h.

void enable ( bool  b)

enable/disable the joint

Definition at line 63 of file phyjoint.cpp.

References PhyJoint::enabled.

Referenced by PhyMarXbot::doKinematicSimulation().

virtual wVector getForceOnJoint ( ) const
pure virtual

Returns the force applied to this joint.

Implemented in PhyHinge, PhyUniversal, PhySuspension, PhyFixed, and PhyBallAndSocket.

Referenced by TractionSensorController::traction().

bool isEnabled ( ) const
inline

Return true if the joint is enabled.

Definition at line 384 of file phyjoint.h.

virtual unsigned int numDofs ( ) const
inlinevirtual

Return the number of DOF constrained by this joint.

Definition at line 374 of file phyjoint.h.

Referenced by PhyObjectsGroup::addJointDOF(), and PhyiCub::PhyiCub().

virtual PhyObject* parent ( )
inlinevirtual
virtual const PhyObject* parent ( ) const
inlinevirtual

Return the parent object; (NULL means an object attached to static world; see Netwon Documentation) (const version)

Definition at line 370 of file phyjoint.h.

virtual void postUpdate ( )
inlinevirtual

postUpdate the PhyJoint this method is called at each step of the world just after the physic update

Definition at line 419 of file phyjoint.h.

virtual void preUpdate ( )
inlinevirtual

preUpdate the PhyJoint this method is called at each step of the world just before the physic update

Definition at line 412 of file phyjoint.h.

World* world ( )
inline
const World* world ( ) const
inline

Return the World (const version)

Definition at line 404 of file phyjoint.h.

Member Data Documentation

PhyObject* childv
protected

child object

Definition at line 433 of file phyjoint.h.

Referenced by PhyJoint::PhyJoint().

bool enabled
protected

true if is enabled, false otherwise

Definition at line 429 of file phyjoint.h.

Referenced by PhyJoint::enable(), PhyJoint::PhyJoint(), PhySuspension::updateJointInfo(), and PhyHinge::updateJointInfo().

PhyObject* parentv
protected

parent object

Definition at line 431 of file phyjoint.h.

Referenced by PhyJoint::PhyJoint().

World* worldv
protected

world

Definition at line 435 of file phyjoint.h.

Referenced by PhyJoint::PhyJoint(), and PhyJoint::~PhyJoint().


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