PixelLightAPI  .
Public Member Functions | Public Attributes
PLPhysics::RagdollBody Class Reference

Ragdoll body. More...

#include <RagdollBody.h>

List of all members.

Public Member Functions

PLPHYSICS_API RagdollBody (SNRagdoll *pParent)
 Constructor.
virtual PLPHYSICS_API ~RagdollBody ()
 Destructor.
PLPHYSICS_API BodyGetBody () const
 Returns the PL physics body.
PLPHYSICS_API bool SetName (const PLCore::String &sName)
 Sets the name of the body.
PLPHYSICS_API void Draw (PLRenderer::Renderer &cRenderer, const PLGraphics::Color4 &cColor, const PLScene::VisNode &cVisNode) const
 Draws the physics body.
PLPHYSICS_API void CreatePhysicsBody ()
 Creates the physics body.
PLPHYSICS_API void DestroyPhysicsBody ()
 Destroys the physics body.
PLPHYSICS_API void GetRotation (PLMath::Quaternion &qQ) const
 Returns the current rotation of the physics body.
PLPHYSICS_API void GetTransformMatrix (PLMath::Matrix3x4 &mTrans) const
 Returns the current transform matrix of the physics body.
PLPHYSICS_API void AddForce (const PLMath::Vector3 &vForce)
 Adds a force to the body.

Public Attributes

PLCore::uint32 nIndex
PLCore::String sName
PLCore::String sJoint
bool bEnabled
PLMath::Vector3 vSize
PLMath::Vector3 vPos
PLMath::Quaternion qRot
float fMass
SNRagdollm_pParentRagdoll
ElementHandlerm_pBodyHandler

Detailed Description

Ragdoll body.

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

Constructor & Destructor Documentation

PLPHYSICS_API PLPhysics::RagdollBody::RagdollBody ( SNRagdoll pParent)

Constructor.

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

Destructor.


Member Function Documentation

PLPHYSICS_API Body* PLPhysics::RagdollBody::GetBody ( ) const

Returns the PL physics body.

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

Sets the name of the body.

Parameters:
[in]sNameNew body name
Returns:
'true' if all went fine, else 'false' (maybe this name is already used within the ragdoll?)
PLPHYSICS_API void PLPhysics::RagdollBody::Draw ( PLRenderer::Renderer cRenderer,
const PLGraphics::Color4 cColor,
const PLScene::VisNode cVisNode 
) const

Draws the physics body.

Parameters:
[in]cRendererRenderer to use
[in]cColorColor to use
[in]cVisNodeThe current visibility node of this scene node

Creates the physics body.

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

Destroys the physics body.

PLPHYSICS_API void PLPhysics::RagdollBody::GetRotation ( PLMath::Quaternion qQ) const

Returns the current rotation of the physics body.

Parameters:
[out]qQWill receive the current rotation of the physics body
PLPHYSICS_API void PLPhysics::RagdollBody::GetTransformMatrix ( PLMath::Matrix3x4 mTrans) const

Returns the current transform matrix of the physics body.

Parameters:
[out]mTransWill receive the current transform matrix of the physics body
PLPHYSICS_API void PLPhysics::RagdollBody::AddForce ( const PLMath::Vector3 vForce)

Adds a force to the body.

Parameters:
[in]vForceForce to add

Member Data Documentation

Joint this body is attached to

Holds the PL physics body


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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:37
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported