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;
154 static size_t size_of(
const value_type& _v)
157 return sizeof(
unsigned int);
159 value_type::const_iterator it = _v.begin();
160 unsigned int N =
static_cast<unsigned int>(_v.size());
163 for(;it!=_v.end(); ++it)
171 static size_t store(std::ostream& _os,
const value_type& _v,
bool _swap=
false)
173 value_type::const_iterator it = _v.begin();
174 unsigned int N =
static_cast<unsigned int>(_v.size());
177 bytes = IO::store( _os, N, _swap );
179 for(;it!=_v.end(); ++it)
181 bytes += IO::store( _os, it->first, _swap );
182 bytes += IO::store( _os, it->second, _swap );
185 return _os.good() ? bytes : 0;
188 static size_t restore( std::istream& _is, value_type& _v,
bool _swap=
false)
190 unsigned int N =
static_cast<unsigned int>(_v.size());
193 bytes = IO::restore( _is, N, _swap );
195 for(
unsigned int i=0; i < N; i++)
200 bytes += IO::restore( _is, first, _swap );
201 bytes += IO::restore( _is, second, _swap );
206 return _is.good() ? bytes : 0;
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.
BaseSkin(int _skeletonId)
Stores the joint weights per vertex.
int skeleton_
Holds the associated skeleton.
int skeletonId()
Holds the associated skeleton.
~BaseSkin()
Stores the joint weights per vertex.
std::map< unsigned int, double > SkinWeights
Stores the joint weights per vertex.
size_t size_of(const T &_v)
Holds the skins default pose.
OpenMesh::Vec3d normal
The points normal in the default pose.
OpenMesh::Vec3d point
The points position in the default pose.
static size_t restore(std::istream &, value_type &, bool=false, bool=true)
Restore a value of T and return the number of bytes read.
static const bool is_streamable
Can we store T? Set this to true in your specialization.
static size_t store(std::ostream &, const value_type &, bool=false, bool=true)
Store a value of T and return the number of bytes written.
static std::string type_identifier(void)
A string that identifies the type of T.
static size_t size_of(void)
What's the size of T? If it depends on the actual value (e.g. for vectors) return UnknownSize.