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

Ragdoll joint. More...

#include <RagdollJoint.h>

List of all members.

Public Types

enum  EType { Hinge = 0, Universal = 1 }
 Simulated joints will be either hinge (1-DOF) or universal (2-DOF) More...

Public Member Functions

PLPHYSICS_API RagdollJoint (SNRagdoll *pParent)
 Constructor.
virtual PLPHYSICS_API ~RagdollJoint ()
 Destructor.
PLPHYSICS_API JointGetJoint () const
 Returns the PL physics joint.
PLPHYSICS_API bool SetName (const PLCore::String &sName)
 Sets the name of the joint.
PLPHYSICS_API void CreatePhysicsJoint ()
 Creates the physics joint.
PLPHYSICS_API void DestroyPhysicsJoint ()
 Destroys the physics joint.
PLPHYSICS_API void GetCurrentAnchor (PLMath::Vector3 &vPosition) const
 Returns the current joint anchor position.
PLPHYSICS_API void ApplyControlTorques (JointController *pController, float fMaxTorque)
 Computes and applies PD-controller torques to each body part assigned with this joint.

Public Attributes

SNRagdollm_pParentRagdoll
ElementHandlerm_pJointHandler
PLCore::uint32 nIndex
PLCore::String sName
PLCore::String sAttached
PLCore::String sParent
PLCore::String sThisJointName
PLCore::String sNextJointName
bool bAttachToWorld
EType nJointType
float fLowJointRange1
float fHighJointRange1
float fLowJointRange2
float fHighJointRange2
PLMath::Vector3 vJointAnchor
PLMath::Vector3 vRotAxis1
PLMath::Vector3 vRotAxis2

Protected Member Functions

PLPHYSICS_API void ClampTorque (float &fTorque, float fMaxTorque)
 Cap the torque generated by the controller to a reasonable value.

Detailed Description

Ragdoll joint.

Note:
  • If you changed some of the initial settings you have to recreate the physics object in order to see the changes.

Member Enumeration Documentation

Simulated joints will be either hinge (1-DOF) or universal (2-DOF)

Enumerator:
Hinge 
Universal 

Constructor & Destructor Documentation

PLPHYSICS_API PLPhysics::RagdollJoint::RagdollJoint ( SNRagdoll pParent)

Constructor.

Parameters:
[in]pParentParent ragdoll
virtual PLPHYSICS_API PLPhysics::RagdollJoint::~RagdollJoint ( ) [virtual]

Destructor.


Member Function Documentation

PLPHYSICS_API Joint* PLPhysics::RagdollJoint::GetJoint ( ) const

Returns the PL physics joint.

Returns:
The PL physics joint, a null pointer on error (if that's the case, something went totally wrong :)
PLPHYSICS_API bool PLPhysics::RagdollJoint::SetName ( const PLCore::String sName)

Sets the name of the joint.

Parameters:
[in]sNameNew joint name
Returns:
'true' if all went fine, else 'false' (maybe this name is already used within the ragdoll?)

Creates the physics joint.

Note:
  • After this function the physics joint is in it's initial pose

Destroys the physics joint.

PLPHYSICS_API void PLPhysics::RagdollJoint::GetCurrentAnchor ( PLMath::Vector3 vPosition) const

Returns the current joint anchor position.

Parameters:
[out]vPositionWill receive the current joint anchor position
PLPHYSICS_API void PLPhysics::RagdollJoint::ApplyControlTorques ( JointController pController,
float  fMaxTorque 
)

Computes and applies PD-controller torques to each body part assigned with this joint.

Parameters:
[in]pControllerJoint controller
[in]fMaxTorqueMaximum torque
PLPHYSICS_API void PLPhysics::RagdollJoint::ClampTorque ( float &  fTorque,
float  fMaxTorque 
) [protected]

Cap the torque generated by the controller to a reasonable value.

Parameters:
[in,out]fTorqueTorque to cap
[in]fMaxTorqueMaximum torque

Member Data Documentation

Holds the PL physics joint

Name of this ragdoll joint

Name of the attached ragdoll body

Name of the attached parent ragdoll body

Name of the original skeleton joint

Name of the next original skeleton joint which 'created' this joint


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:22
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported