#include <SkinnedTriangles.h>
Collaboration diagram for nvsg::Bone:
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::Mat44f & | getMatrix (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. |
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.
|
|
Copy constructor.
|
|
Destructor.
|
|
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.
|
|
Get the Animation.
|
|
Get the transformation of the animation step.
|
|
Get the weight.
|
|
Set the Animation. Setting the Animation also sets the base inverse as the inverse of the first animation step.
|
|
Set the base inverse. All animation steps are done relative to this base inverse. Usually it is calculated out of the first animation step.
|
|
Set the trafo. Just sets the trafo to use and invalidates the animation step.
|
|
Set the weight. The weight is used to weight this Bones contribution to the vertex calculation of a Skin.
|