Classes | Public Member Functions

xl7::direct3d::models::ModelInstance Class Reference

#include <ModelInstance.h>

Inheritance diagram for xl7::direct3d::models::ModelInstance:
xl7::direct3d::Resource xl7::directx::Resource

List of all members.

Classes

struct  JointTransformData

Public Member Functions

const ModelGetModel () const
const meshes::MeshGetMesh () const
unsigned GetJointCount () const
unsigned GetJointIndex (const cl7::string_type &joint_identifier) const
const cl7::string_typeGetJointIdentifier (unsigned i) const
const ml7::Vector3GetJointRelPosition (const cl7::string_type &joint_identifier) const
const ml7::Vector3GetJointRelPosition (unsigned i) const
const ml7::Matrix3x3GetJointRelRotation (const cl7::string_type &joint_identifier) const
const ml7::Matrix3x3GetJointRelRotation (unsigned i) const
const ml7::Matrix4x4GetJointAccTransform (const cl7::string_type &joint_identifier) const
const ml7::Matrix4x4GetJointAccTransform (unsigned i) const
void SetJointRelPosition (const cl7::string_type &joint_identifier, const ml7::Vector3 &position)
void SetJointRelPosition (unsigned i, const ml7::Vector3 &position)
void SetJointRelRotation (const cl7::string_type &joint_identifier, const ml7::Matrix3x3 &rotation)
void SetJointRelRotation (unsigned i, const ml7::Matrix3x3 &rotation)
void SetJointRelPositionAndRotation (const cl7::string_type &joint_identifier, const ml7::Vector3 &position, const ml7::Matrix3x3 &rotation)
void SetJointRelPositionAndRotation (unsigned i, const ml7::Vector3 &position, const ml7::Matrix3x3 &rotation)
bool Update ()

Member Function Documentation

const ml7::Matrix4x4& xl7::direct3d::models::ModelInstance::GetJointAccTransform ( const cl7::string_type joint_identifier  )  const [inline]

Returns the accumulated transformation matrix translating and rotating the joint with the given identifier name.

const ml7::Matrix4x4 & xl7::direct3d::models::ModelInstance::GetJointAccTransform ( unsigned  i  )  const

Returns the accumulated transformation matrix translating and rotating the i-th joint.

unsigned xl7::direct3d::models::ModelInstance::GetJointCount (  )  const

Returns the number of joints.

const cl7::string_type & xl7::direct3d::models::ModelInstance::GetJointIdentifier ( unsigned  i  )  const

Returns the identifier name of the i-th joint.

unsigned xl7::direct3d::models::ModelInstance::GetJointIndex ( const cl7::string_type joint_identifier  )  const

Returns the index of the transformation matrix translating and rotating the joint with the given identifier name.

const ml7::Vector3& xl7::direct3d::models::ModelInstance::GetJointRelPosition ( const cl7::string_type joint_identifier  )  const [inline]

Returns the relative position (translation) of the joint with the given identifier name.

const ml7::Vector3 & xl7::direct3d::models::ModelInstance::GetJointRelPosition ( unsigned  i  )  const

Returns the relative position (translation) of the i-th joint.

const ml7::Matrix3x3& xl7::direct3d::models::ModelInstance::GetJointRelRotation ( const cl7::string_type joint_identifier  )  const [inline]

Returns the relative rotation of the joint with the given identifier name.

const ml7::Matrix3x3 & xl7::direct3d::models::ModelInstance::GetJointRelRotation ( unsigned  i  )  const

Returns the relative rotation of the i-th joint.

const meshes::Mesh* xl7::direct3d::models::ModelInstance::GetMesh (  )  const [inline]

Returns the mesh (vertex and index buffer) holding the geometry of the model.

const Model* xl7::direct3d::models::ModelInstance::GetModel (  )  const [inline]

Returns the model this object is an instance of.

void xl7::direct3d::models::ModelInstance::SetJointRelPosition ( const cl7::string_type joint_identifier,
const ml7::Vector3 position 
) [inline]

Sets the relative position (translation) of the joint with the given identifier name.

void xl7::direct3d::models::ModelInstance::SetJointRelPosition ( unsigned  i,
const ml7::Vector3 position 
)

Sets the relative position (translation) of the i-th joint.

Returns the relative position (translation) of the i-th joint.

void xl7::direct3d::models::ModelInstance::SetJointRelPositionAndRotation ( const cl7::string_type joint_identifier,
const ml7::Vector3 position,
const ml7::Matrix3x3 rotation 
) [inline]

Sets the relative position (translation) and relative rotation of the joint with the given identifier name.

void xl7::direct3d::models::ModelInstance::SetJointRelPositionAndRotation ( unsigned  i,
const ml7::Vector3 position,
const ml7::Matrix3x3 rotation 
)

Sets the relative position (translation) and relative rotation of the i-th joint.

void xl7::direct3d::models::ModelInstance::SetJointRelRotation ( unsigned  i,
const ml7::Matrix3x3 rotation 
)

Sets the relative rotation of the i-th joint.

Returns the relative rotation of the i-th joint.

void xl7::direct3d::models::ModelInstance::SetJointRelRotation ( const cl7::string_type joint_identifier,
const ml7::Matrix3x3 rotation 
) [inline]

Sets the relative rotation of the joint with the given identifier name.

bool xl7::direct3d::models::ModelInstance::Update (  ) 

Updates the vertices of this model instance by transforming them by the (accumulated) joint transformation matrices.

Reimplemented from xl7::directx::Resource.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines