Developer Documentation
Loading...
Searching...
No Matches
SkinT.hh
1#ifndef SKINT_HH
2#define SKINT_HH
3
4#include <ObjectTypes/Skeleton/BaseSkin.hh>
7
13template<typename MeshT>
14class SkinT : public BaseSkin
15{
16public:
17 typedef typename MeshT::Point PointT;
18 typedef PointT Point;
19 typedef typename PointT::value_type Scalar;
21 typedef JointT<PointT> Joint;
22 typedef PoseT<PointT> Pose;
23 typedef typename ACG::Matrix4x4T<Scalar> Matrix;
24 typedef typename ACG::QuaternionT<Scalar> Quaternion;
26
27public:
34 SkinT(SkeletonT<PointT> *_skeleton, MeshT *_mesh, int _objectID);
35 virtual ~SkinT();
36
37public:
43 void attachSkin();
44 void deformSkin();
45 void deformSkin(const AnimationHandle &_hAni, Blending::Method _method = Blending::M_LBS);
46 void releaseSkin();
48
50
52 void weightsComputed(bool _flag) { weightsComputed_ = _flag; }
53
55 bool weightsComputed() const { return weightsComputed_; }
56
57private:
61
63 Blending::Method lastmethod_;
64
65 // Flag that indicates whether skin weights have been computed
67};
68
69typedef SkinT< TriMesh > TriMeshSkin;
70typedef SkinT< PolyMesh > PolyMeshSkin;
71
72//=============================================================================
73//=============================================================================
74#if defined(INCLUDE_TEMPLATES) && !defined(SKINT_C)
75#define SKINT_TEMPLATES
76#include "SkinT_impl.hh"
77#endif
78//=============================================================================
79#endif
80//=============================================================================
81
82
DualQuaternion class for representing rigid motions in 3d.
A handle used to refer to an animation or to a specific frame in an animation.
Abstract base class for the skin template, wrapping all template versions of the skin.
Definition BaseSkin.hh:63
Represents a single joint in the skeleton.
Definition JointT.hh:61
A general pose, used to store the frames of the animation.
Definition PoseT.hh:59
General skin class, used to bind skeleton and mesh and deform the mesh.
Definition SkinT.hh:15
MeshT * mesh_
Attach the given mesh as skin to this skeleton.
Definition SkinT.hh:59
void deformSkin()
Attach the given mesh as skin to this skeleton.
void weightsComputed(bool _flag)
Set whether weights are computed.
Definition SkinT.hh:52
bool weightsComputed_
Attach the given mesh as skin to this skeleton.
Definition SkinT.hh:66
AnimationHandle lastAnimationHandle_
Attach the given mesh as skin to this skeleton.
Definition SkinT.hh:62
Skeleton * skeleton_
Attach the given mesh as skin to this skeleton.
Definition SkinT.hh:58
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.
Definition SkinT_impl.hh:83
Blending::Method lastmethod_
Attach the given mesh as skin to this skeleton.
Definition SkinT.hh:63
int objectId_
Attach the given mesh as skin to this skeleton.
Definition SkinT.hh:60
void attachSkin()
Attach the given mesh as skin to this skeleton.
Definition SkinT_impl.hh:99
bool weightsComputed() const
Check whether weights were computed.
Definition SkinT.hh:55