50 #include <ObjectTypes/Skeleton/SkeletonT.hh> 51 #include <OpenMesh/Core/IO/MeshIO.hh> 53 #include "BlendingMethod.hh" 55 #define OBJECTDATA_SKIN "Skin Object-Data" 56 #define SKIN_WEIGHTS_PROP "skin-weights" 57 #define DEFAULTPOSE_PROP "Default pose" 112 virtual void attachSkin() = 0;
113 virtual void deformSkin() = 0;
114 virtual void deformSkin(
const AnimationHandle &_hAni, Blending::Method _method = Blending::M_LBS) = 0;
115 virtual void releaseSkin() = 0;
152 static size_t size_of(
const value_type& _v)
155 return sizeof(
unsigned int);
157 value_type::const_iterator it = _v.begin();
158 unsigned int N =
static_cast<unsigned int>(_v.size());
159 size_t bytes = IO::size_of(N);
161 for(;it!=_v.end(); ++it)
163 bytes += IO::size_of( it->first );
164 bytes += IO::size_of( it->second );
169 static size_t store(std::ostream& _os,
const value_type& _v,
bool _swap=
false)
171 value_type::const_iterator it = _v.begin();
172 unsigned int N =
static_cast<unsigned int>(_v.size());
175 bytes = IO::store( _os, N, _swap );
177 for(;it!=_v.end(); ++it)
179 bytes += IO::store( _os, it->first, _swap );
180 bytes += IO::store( _os, it->second, _swap );
183 return _os.good() ? bytes : 0;
186 static size_t restore( std::istream& _is, value_type& _v,
bool _swap=
false)
188 unsigned int N =
static_cast<unsigned int>(_v.size());
191 bytes = IO::restore( _is, N, _swap );
193 for(
unsigned int i=0; i < N; i++)
198 bytes += IO::restore( _is, first, _swap );
199 bytes += IO::restore( _is, second, _swap );
204 return _is.good() ? bytes : 0;
Holds the skins default pose.
Abstract base class for the skin template, wrapping all template versions of the skin.
OpenMesh::Vec3d normal
The points normal in the default pose.
size_t size_of(const T &_v)
OpenMesh::Vec3d point
The points position in the default pose.
std::map< unsigned int, double > SkinWeights
Stores the joint weights per vertex.
int skeleton_
Holds the associated skeleton.
A handle used to refer to an animation or to a specific frame in an animation.