Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

nvsg::Bone Class Reference

Internal helper class for SkinnedTriangles. More...

#include <SkinnedTriangles.h>

Collaboration diagram for nvsg::Bone:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Bone (void)
 Constructor.
 Bone (const Bone &rhs)
 Copy constructor.
 ~Bone (void)
 Destructor.
nvmath::Vec4f operator() (size_t frame, const nvmath::Vec4f &v) const
 Calculate a vertex.
const Animation< nvmath::Trafo > * getAnimation (void) const
 Get the Animation.
const nvmath::Mat44fgetMatrix (size_t frame) const
 Get the transformation of the animation step.
float getWeight (void) const
 Get the weight.
NVSG_API void setAnimation (const Animation< nvmath::Trafo > *pAnimation)
 Set the Animation.
void setInverse (const nvmath::Mat44f &inverse)
 Set the base inverse.
void setMatrix (const nvmath::Mat44f &trafo)
 Set the trafo.
void setWeight (float weight)
 Set the weight.

Detailed Description

Internal helper class for SkinnedTriangles.

Instead of the vertices and normals from Triangles, SkinnedTriangles use a special construction that has a vector of "Bones" per vertex, from which the vertices and normals are calculated. This calculation depends on the animation step. A Bone essentially consists of an Animation, an offset, and a weight. Out of these values a vertex is calculated using a vector of Bones.


Constructor & Destructor Documentation

nvsg::Bone::Bone void   )  [inline]
 

Constructor.

nvsg::Bone::Bone const Bone rhs  )  [inline]
 

Copy constructor.

nvsg::Bone::~Bone void   )  [inline]
 

Destructor.


Member Function Documentation

nvmath::Vec4f nvsg::Bone::operator() size_t  frame,
const nvmath::Vec4f v
const [inline]
 

Calculate a vertex.

For animation step frame and reference point v, a modified vertex is calculated. All Bones of a Skin equally contribute to the animated vertex this way.

Returns:
An animated vertex relative to v

const Animation< nvmath::Trafo > * nvsg::Bone::getAnimation void   )  const [inline]
 

Get the Animation.

Returns:
A pointer to the Animation

const nvmath::Mat44f & nvsg::Bone::getMatrix size_t  frame  )  const [inline]
 

Get the transformation of the animation step.

Returns:
The animated transform on step frame
Parameters:
frame  animation step to get transformation at

float nvsg::Bone::getWeight void   )  const [inline]
 

Get the weight.

Returns:
The weight of this Bone

void nvsg::Bone::setAnimation const Animation< nvmath::Trafo > *  pAnimation  )  [inline]
 

Set the Animation.

Setting the Animation also sets the base inverse as the inverse of the first animation step.

Parameters:
pAnimation  new animation for this Bone

void nvsg::Bone::setInverse const nvmath::Mat44f inverse  )  [inline]
 

Set the base inverse.

All animation steps are done relative to this base inverse. Usually it is calculated out of the first animation step.

Parameters:
inverse  new base inverse to use

void nvsg::Bone::setMatrix const nvmath::Mat44f trafo  )  [inline]
 

Set the trafo.

Just sets the trafo to use and invalidates the animation step.

Parameters:
trafo  trafo to use

void nvsg::Bone::setWeight float  weight  )  [inline]
 

Set the weight.

The weight is used to weight this Bones contribution to the vertex calculation of a Skin.

Parameters:
weight  weight for this bone


The documentation for this class was generated from the following file:
Generated on Tue Mar 1 13:20:55 2005 for NVSGSDK by NVIDIA