16#ifndef OSGANIMATION_RIGTRANSFORM_SOFTWARE
17#define OSGANIMATION_RIGTRANSFORM_SOFTWARE 1
49 inline const float &
getWeight()
const {
return second; }
51 inline const unsigned int &
getBoneID()
const {
return first; }
54 if (second > b1.second)
return true;
55 if (second < b1.second)
return false;
56 return (first > b1.first);
77 _result.set(0, 0, 0, 0,
87 ptrresult[0] += ptr[0] * weight;
88 ptrresult[1] += ptr[1] * weight;
89 ptrresult[2] += ptr[2] * weight;
91 ptrresult[4] += ptr[4] * weight;
92 ptrresult[5] += ptr[5] * weight;
93 ptrresult[6] += ptr[6] * weight;
95 ptrresult[8] += ptr[8] * weight;
96 ptrresult[9] += ptr[9] * weight;
97 ptrresult[10] += ptr[10] * weight;
99 ptrresult[12] += ptr[12] * weight;
100 ptrresult[13] += ptr[13] * weight;
101 ptrresult[14] += ptr[14] * weight;
105 if (_boneweights.empty())
107 osg::notify(
osg::WARN) <<
this <<
" RigTransformSoftware::VertexGroup no bones found" << std::endl;
113 for(BonePtrWeightList::iterator bwit=_boneweights.begin(); bwit!=_boneweights.end(); ++bwit )
115 const Bone* bone = bwit->getBonePtr();
118 osg::notify(
osg::WARN) <<
this <<
" RigTransformSoftware::computeMatrixForVertexSet Warning a bone is null, skip it" << std::endl;
124 accummulateMatrix(invBindMatrix, matrix, w);
139 for(VertexGroupList::iterator itvg=_uniqVertexGroupList.begin(); itvg!=_uniqVertexGroupList.end(); ++itvg)
146 for(IndexList::const_iterator vertIDit=vertices.begin(); vertIDit!=vertices.end(); ++vertIDit)
148 dst[*vertIDit] = src[*vertIDit] * matrix;
157 for(VertexGroupList::iterator itvg=_uniqVertexGroupList.begin(); itvg!=_uniqVertexGroupList.end(); ++itvg)
164 for(IndexList::const_iterator vertIDit=vertices.begin(); vertIDit!=vertices.end(); ++vertIDit)
const osg::Matrix & getInvBindMatrixInSkeletonSpace() const
Definition Bone:46
const osg::Matrix & getMatrixInSkeletonSpace() const
Definition Bone:45
Definition RigGeometry:50
static Vec3f transform3x3(const Vec3f &v, const Matrixd &m)
Definition Matrixd:665
value_type * ptr()
Definition Matrixd:92
double value_type
Definition Matrixd:30
static Matrixd identity(void)
Definition Matrixd:444
Definition observer_ptr:39
std::vector< unsigned int > IndexList
Definition VertexInfluence:38
@ WARN
Definition Notify:33
std::ostream & notify(void)
Definition Notify:80
#define OSGANIMATION_EXPORT
Definition osgAnimation/Export:40