|
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. | |
Public Member Functions | |
| SkinT (SkeletonT< PointT > *_skeleton, MeshT *_mesh, int _objectID) | |
| constructor | |
Public Member Functions inherited from BaseSkin | |
| BaseSkin (int _skeletonId) | |
| Stores the joint weights per vertex. | |
| ~BaseSkin () | |
| Stores the joint weights per vertex. | |
| int | skeletonId () |
| Holds the associated skeleton. | |
Public Member Functions inherited from PerObjectData | |
| PerObjectData () | |
| You have to provide your own constructor for your object. | |
| virtual PerObjectData * | copyPerObjectData () |
| Copy Function. | |
Skinning | |
These methods are related to using a mesh as skin with this skeleton. | |
| Skeleton * | skeleton_ |
| Attach the given mesh as skin to this skeleton. | |
| MeshT * | mesh_ |
| Attach the given mesh as skin to this skeleton. | |
| int | objectId_ |
| Attach the given mesh as skin to this skeleton. | |
| AnimationHandle | lastAnimationHandle_ |
| Attach the given mesh as skin to this skeleton. | |
| Blending::Method | lastmethod_ |
| Attach the given mesh as skin to this skeleton. | |
| bool | weightsComputed_ |
| Attach the given mesh as skin to this skeleton. | |
| void | attachSkin () |
| Attach the given mesh as skin to this skeleton. | |
| void | deformSkin () |
| Attach the given mesh as skin to this skeleton. | |
| void | deformSkin (const AnimationHandle &_hAni, Blending::Method _method=Blending::M_LBS) |
| Deforms the given skin to the pose defined by the skeleton. | |
| void | releaseSkin () |
| The given mesh will be reset to its default pose and all skin properties are removed. | |
| Skeleton * | skeleton () |
| Attach the given mesh as skin to this skeleton. | |
| void | weightsComputed (bool _flag) |
| Set whether weights are computed. | |
| bool | weightsComputed () const |
| Check whether weights were computed. | |
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.
| typedef ACG::DualQuaternionT<Scalar> SkinT< MeshT >::DualQuaternion |
| typedef ACG::Matrix4x4T<Scalar> SkinT< MeshT >::Matrix |
| typedef ACG::QuaternionT<Scalar> SkinT< MeshT >::Quaternion |
| typedef SkeletonT<PointT> SkinT< MeshT >::Skeleton |
| 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.
Definition at line 75 of file SkinT_impl.hh.
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.
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:
![\[ v_{pose} = M_{pose} \cdot M^{-1}_{default} \cdot v_{default} \]](form_36.png)
| _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.
The given mesh will be reset to its default pose and all skin properties are removed.
Implements BaseSkin.
Definition at line 269 of file SkinT_impl.hh.
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".
Definition at line 83 of file SkinT_impl.hh.
|
private |
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".
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".
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".
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".
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".
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".