PixelLightAPI  .
Public Member Functions | Protected Member Functions | Protected Attributes
PLPhysics::JointUniversal Class Reference

Abstract PL physics universal joint. More...

#include <JointUniversal.h>

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

List of all members.

Public Member Functions

virtual PLPHYSICS_API ~JointUniversal ()
 Destructor.
PLPHYSICS_API const
PLMath::Vector3
GetPivotPoint () const
 Returns the origin of the universal in world space.
PLPHYSICS_API const
PLMath::Vector3
GetPinDir1 () const
 Returns the first axis of rotation fixed on THIS body and perpendicular to 'PinDir2' in world space.
PLPHYSICS_API const
PLMath::Vector3
GetPinDir2 () const
 Returns the second axis of rotation fixed on 'Parent' body and perpendicular to 'PinDir1' in world space.
PLPHYSICS_API float GetLowRange1 () const
 Returns the low range of the first axis.
PLPHYSICS_API void SetLowRange1 (float fLowRange=-180.0f)
 Sets the low range of the first axis.
PLPHYSICS_API float GetHighRange1 () const
 Returns the high range of the first axis.
PLPHYSICS_API void SetHighRange1 (float fHighRange=180.0f)
 Sets the high range of the first axis.
PLPHYSICS_API float GetLowRange2 () const
 Returns the low range of the second axis.
PLPHYSICS_API void SetLowRange2 (float fLowRange=-180.0f)
 Sets the low range of the second axis.
PLPHYSICS_API float GetHighRange2 () const
 Returns the high range of the second axis.
PLPHYSICS_API void SetHighRange2 (float fHighRange=180.0f)
 Sets the high range of the second axis.
virtual void AddOmega (float fOmega1, float fOmega2)=0
 Adds omega to the bodies assigned with this joint.

Protected Member Functions

PLPHYSICS_API JointUniversal (World &cWorld, JointImpl &cJointImpl, Body *pParentBody, Body *pChildBody, const PLMath::Vector3 &vPivotPoint, const PLMath::Vector3 &vPinDir1, const PLMath::Vector3 &vPinDir2)
 Constructor.

Protected Attributes

PLMath::Vector3 m_vPivotPoint
PLMath::Vector3 m_vPinDir1
PLMath::Vector3 m_vPinDir2

Detailed Description

Abstract PL physics universal joint.

Remarks:
A universal joint is a constraint that restricts two rigid bodies to be connected to a point fixed on both bodies, while and allowing one body to spin around a fix axis in is own frame, and the other body to spin around another axis fixes on it own frame. Both axis must be mutually perpendicular.

DOFs removed: 2 DOFs remaining: 4


Constructor & Destructor Documentation

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

Destructor.

PLPHYSICS_API PLPhysics::JointUniversal::JointUniversal ( World cWorld,
JointImpl &  cJointImpl,
Body pParentBody,
Body pChildBody,
const PLMath::Vector3 vPivotPoint,
const PLMath::Vector3 vPinDir1,
const PLMath::Vector3 vPinDir2 
) [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
[in]vPivotPointOrigin of the universal in world space
[in]vPinDir1First axis of rotation fixed on THIS body and perpendicular to 'PinDir2' in world space
[in]vPinDir2Second axis of rotation fixed on 'Parent' body and perpendicular to 'PinDir1' in world space

Member Function Documentation

Returns the origin of the universal in world space.

Returns:
The origin of the universal in world space

Returns the first axis of rotation fixed on THIS body and perpendicular to 'PinDir2' in world space.

Returns:
The first axis of rotation fixed on THIS body and perpendicular to 'PinDir2' in world space

Returns the second axis of rotation fixed on 'Parent' body and perpendicular to 'PinDir1' in world space.

Returns:
The second axis of rotation fixed on 'Parent' body and perpendicular to 'PinDir1' in world space
PLPHYSICS_API float PLPhysics::JointUniversal::GetLowRange1 ( ) const

Returns the low range of the first axis.

Returns:
The low range of the first axis in degree
PLPHYSICS_API void PLPhysics::JointUniversal::SetLowRange1 ( float  fLowRange = -180.0f)

Sets the low range of the first axis.

Parameters:
[in]fLowRangeNew low range of the first axis in degree
PLPHYSICS_API float PLPhysics::JointUniversal::GetHighRange1 ( ) const

Returns the high range of the first axis.

Returns:
The high range of the first axis in degree
PLPHYSICS_API void PLPhysics::JointUniversal::SetHighRange1 ( float  fHighRange = 180.0f)

Sets the high range of the first axis.

Parameters:
[in]fHighRangeNew high range of the first axis in degree
PLPHYSICS_API float PLPhysics::JointUniversal::GetLowRange2 ( ) const

Returns the low range of the second axis.

Returns:
The low range of the second axis in degree
PLPHYSICS_API void PLPhysics::JointUniversal::SetLowRange2 ( float  fLowRange = -180.0f)

Sets the low range of the second axis.

Parameters:
[in]fLowRangeNew low range of the second axis in degree
PLPHYSICS_API float PLPhysics::JointUniversal::GetHighRange2 ( ) const

Returns the high range of the second axis.

Returns:
The high range of the second axis in degree
PLPHYSICS_API void PLPhysics::JointUniversal::SetHighRange2 ( float  fHighRange = 180.0f)

Sets the high range of the second axis.

Parameters:
[in]fHighRangeNew high range of the second axis in degree
virtual void PLPhysics::JointUniversal::AddOmega ( float  fOmega1,
float  fOmega2 
) [pure virtual]

Adds omega to the bodies assigned with this joint.

Parameters:
[in]fOmega1Omega 1 to add
[in]fOmega2Omega 2 to add

Member Data Documentation

Origin of the universal in world space

First axis of rotation fixed on THIS body and perpendicular to 'PinDir2' in world space

Second axis of rotation fixed on 'Parent' body and perpendicular to 'PinDir1' in world space


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