Developer Documentation
|
General skin class, used to bind skeleton and mesh and deform the mesh. More...
#include <Type-Skeleton/ObjectTypes/Skeleton/SkinT.hh>
Public Types | |
typedef MeshT::Point | PointT |
typedef PointT | Point |
typedef PointT::value_type | Scalar |
typedef SkeletonT< PointT > | Skeleton |
typedef JointT< PointT > | Joint |
typedef PoseT< PointT > | Pose |
typedef ACG::Matrix4x4T< Scalar > | Matrix |
typedef ACG::QuaternionT< Scalar > | Quaternion |
typedef ACG::DualQuaternionT< Scalar > | DualQuaternion |
Public Types inherited from BaseSkin | |
typedef std::map< unsigned int, double > | SkinWeights |
Stores the joint weights per vertex. More... | |
Public Member Functions | |
SkinT (SkeletonT< PointT > *_skeleton, MeshT *_mesh, int _objectID) | |
constructor More... | |
Skeleton * | skeleton () |
void | weightsComputed (bool _flag) |
Set whether weights are computed. | |
bool | weightsComputed () const |
Check whether weights were computed. | |
Skinning | |
These methods are related to using a mesh as skin with this skeleton. | |
void | attachSkin () |
Attach the given mesh as skin to this skeleton. More... | |
void | deformSkin () |
Attach the given mesh as skin to this skeleton. More... | |
void | deformSkin (const AnimationHandle &_hAni, Blending::Method _method=Blending::M_LBS) |
Deforms the given skin to the pose defined by the skeleton. More... | |
void | releaseSkin () |
The given mesh will be reset to its default pose and all skin properties are removed. | |
Public Member Functions inherited from BaseSkin | |
BaseSkin (int _skeletonId) | |
int | skeletonId () |
Public Member Functions inherited from PerObjectData | |
PerObjectData () | |
You have to provide your own constructor for your object. | |
virtual PerObjectData * | copyPerObjectData () |
Copy Function. More... | |
Private Attributes | |
Skeleton * | skeleton_ |
MeshT * | mesh_ |
int | objectId_ |
AnimationHandle | lastAnimationHandle_ |
Blending::Method | lastmethod_ |
bool | weightsComputed_ |
General skin class, used to bind skeleton and mesh and deform the mesh.
The mesh is given to the constructor. To prepare the mesh for deformation, call the SkinT::AttachSkin method.
SkinT< MeshT >::SkinT | ( | SkeletonT< PointT > * | _skeleton, |
MeshT * | _mesh, | ||
int | _objectID | ||
) |
constructor
_skeleton | Pointer to the skeleton which will be skinned |
_mesh | Pointer to the mesh that is the skin |
_objectID | ObjectId of the Skeleton |
Definition at line 61 of file SkinT_impl.hh.
|
virtual |
Attach the given mesh as skin to this skeleton.
The mesh will be equipped with two properties. One holding the original vertex coordinates, a second holding the per vertex weights for the joints. The bone weights are derived from the segment information stored with the bones and in a vertex based mesh property called "Face Segment".
Implements BaseSkin.
Definition at line 99 of file SkinT_impl.hh.
|
virtual |
Attach the given mesh as skin to this skeleton.
The mesh will be equipped with two properties. One holding the original vertex coordinates, a second holding the per vertex weights for the joints. The bone weights are derived from the segment information stored with the bones and in a vertex based mesh property called "Face Segment".
Implements BaseSkin.
Definition at line 120 of file SkinT_impl.hh.
|
virtual |
Deforms the given skin to the pose defined by the skeleton.
This method will only work properly if the mesh has been prepared to be a skin by a call of SkeletonT::PrepareSkin.
Two algorithms are implemented:
_hAni | The animation frame to be used as target |
_method | deformation method to be used |
Implements BaseSkin.
Definition at line 158 of file SkinT_impl.hh.