PixelLightAPI  .
Public Member Functions | Protected Member Functions
PLPhysics::Joint Class Reference

Abstract PL physics joint (also called 'constraint') base class. More...

#include <Joint.h>

Inheritance diagram for PLPhysics::Joint:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual PLPHYSICS_API ~Joint ()
 Destructor.
PLPHYSICS_API JointImpl & GetJointImpl () const
 Returns a reference to the physics API specific joint implementation.
PLPHYSICS_API BodyGetParentBody () const
 Returns a pointer to the parent rigid body.
PLPHYSICS_API BodyGetChildBody () const
 Returns a pointer to the attached rigid body.
virtual PLPHYSICS_API void GetCurrentPivotPoint (PLMath::Vector3 &vPosition) const
 Gets the current pivot point of the joint.
virtual PLPHYSICS_API bool IsBreakable () const
 Returns whether the joint is breakable or not.
virtual PLPHYSICS_API void SetBreakable (bool bBreakable)
 Sets whether the joint is breakable or not.
virtual PLPHYSICS_API void GetBreakForce (PLMath::Vector3 &vForce) const
 Returns the break force.
virtual PLPHYSICS_API void SetBreakForce (const PLMath::Vector3 &vForce)
 Sets the break force.
virtual PLPHYSICS_API void GetBreakTorque (PLMath::Vector3 &vTorque) const
 Returns the break torque.
virtual PLPHYSICS_API void SetBreakTorque (const PLMath::Vector3 &vTorque)
 Sets the break torque.
virtual PLPHYSICS_API bool IsBody () const override
 Returns whether or not this is a body.
virtual PLPHYSICS_API bool IsJoint () const override
 Returns whether or not this is a joint.
virtual PLPHYSICS_API bool IsSensor () const override
 Returns whether or not this is a sensor.

Protected Member Functions

PLPHYSICS_API Joint (World &cWorld, JointImpl &cJointImpl, Body *pParentBody, Body *pChildBody)
 Constructor.

Detailed Description

Abstract PL physics joint (also called 'constraint') base class.

Remarks:
A joint will constrain the motion of the two bodies it's attached to. A joint can be attached to two joints and one of this to bodies may be a null pointer which means that it's attached to 'the world'. (static)

Constructor & Destructor Documentation

virtual PLPHYSICS_API PLPhysics::Joint::~Joint ( ) [virtual]

Destructor.

PLPHYSICS_API PLPhysics::Joint::Joint ( World cWorld,
JointImpl &  cJointImpl,
Body pParentBody,
Body pChildBody 
) [protected]

Constructor.

Parameters:
[in]cWorldWorld this joint is in
[in]cJointImplReference to the physics API specific joint implementation
[in]pParentBodyPointer to the parent rigid body, can be a null pointer
[in]pChildBodyPointer to the attached rigid body, can be a null pointer

Member Function Documentation

PLPHYSICS_API JointImpl& PLPhysics::Joint::GetJointImpl ( ) const

Returns a reference to the physics API specific joint implementation.

Returns:
Reference to the physics API specific joint implementation
PLPHYSICS_API Body* PLPhysics::Joint::GetParentBody ( ) const

Returns a pointer to the parent rigid body.

Returns:
Pointer to the parent rigid body, can be a null pointer
PLPHYSICS_API Body* PLPhysics::Joint::GetChildBody ( ) const

Returns a pointer to the attached rigid body.

Returns:
Pointer to the attached rigid body, can be a null pointer
virtual PLPHYSICS_API void PLPhysics::Joint::GetCurrentPivotPoint ( PLMath::Vector3 vPosition) const [virtual]

Gets the current pivot point of the joint.

Parameters:
[out]vPositionWill receive the current pivot point of the joint
virtual PLPHYSICS_API bool PLPhysics::Joint::IsBreakable ( ) const [virtual]

Returns whether the joint is breakable or not.

Returns:
'true' if the joint is breakable, else 'false'
virtual PLPHYSICS_API void PLPhysics::Joint::SetBreakable ( bool  bBreakable) [virtual]

Sets whether the joint is breakable or not.

Parameters:
[in]bBreakable'true' if the joint is breakable, else 'false' (default setting)
See also:
virtual PLPHYSICS_API void PLPhysics::Joint::GetBreakForce ( PLMath::Vector3 vForce) const [virtual]

Returns the break force.

Parameters:
[out]vForceWill receive the break force
See also:
virtual PLPHYSICS_API void PLPhysics::Joint::SetBreakForce ( const PLMath::Vector3 vForce) [virtual]

Sets the break force.

Parameters:
[in]vForceThe break force
See also:
virtual PLPHYSICS_API void PLPhysics::Joint::GetBreakTorque ( PLMath::Vector3 vTorque) const [virtual]

Returns the break torque.

Parameters:
[out]vTorqueWill receive the break torque
See also:
virtual PLPHYSICS_API void PLPhysics::Joint::SetBreakTorque ( const PLMath::Vector3 vTorque) [virtual]

Sets the break torque.

Parameters:
[in]vTorqueThe break torque
See also:
virtual PLPHYSICS_API bool PLPhysics::Joint::IsBody ( ) const [override, virtual]

Returns whether or not this is a body.

Returns:
'true' if this is a body, else 'false'

Implements PLPhysics::Element.

virtual PLPHYSICS_API bool PLPhysics::Joint::IsJoint ( ) const [override, virtual]

Returns whether or not this is a joint.

Returns:
'true' if this is a joint, else 'false'

Implements PLPhysics::Element.

virtual PLPHYSICS_API bool PLPhysics::Joint::IsSensor ( ) const [override, virtual]

Returns whether or not this is a sensor.

Returns:
'true' if this is a sensor, else 'false'

Implements PLPhysics::Element.


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:21
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported