PixelLightAPI
.
|
Ragdoll joint. More...
#include <RagdollJoint.h>
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 Joint * | GetJoint () 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 | |
SNRagdoll * | m_pParentRagdoll |
ElementHandler * | m_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. |
Ragdoll joint.
PLPHYSICS_API PLPhysics::RagdollJoint::RagdollJoint | ( | SNRagdoll * | pParent | ) |
Constructor.
[in] | pParent | Parent ragdoll |
virtual PLPHYSICS_API PLPhysics::RagdollJoint::~RagdollJoint | ( | ) | [virtual] |
Destructor.
PLPHYSICS_API Joint* PLPhysics::RagdollJoint::GetJoint | ( | ) | const |
Returns the PL physics joint.
PLPHYSICS_API bool PLPhysics::RagdollJoint::SetName | ( | const PLCore::String & | sName | ) |
Sets the name of the joint.
[in] | sName | New joint name |
PLPHYSICS_API void PLPhysics::RagdollJoint::CreatePhysicsJoint | ( | ) |
Creates the physics joint.
PLPHYSICS_API void PLPhysics::RagdollJoint::DestroyPhysicsJoint | ( | ) |
Destroys the physics joint.
PLPHYSICS_API void PLPhysics::RagdollJoint::GetCurrentAnchor | ( | PLMath::Vector3 & | vPosition | ) | const |
Returns the current joint anchor position.
[out] | vPosition | Will 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.
[in] | pController | Joint controller |
[in] | fMaxTorque | Maximum torque |
PLPHYSICS_API void PLPhysics::RagdollJoint::ClampTorque | ( | float & | fTorque, |
float | fMaxTorque | ||
) | [protected] |
Cap the torque generated by the controller to a reasonable value.
[in,out] | fTorque | Torque to cap |
[in] | fMaxTorque | Maximum torque |
Holds the PL physics joint
PLCore::uint32 PLPhysics::RagdollJoint::nIndex |
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
|