add prepareData for RigTransformHW

This commit is contained in:
Julien Valentin
2017-08-28 15:41:14 +02:00
parent 4b56a4d3be
commit 3efaccb298
2 changed files with 285 additions and 8 deletions

View File

@@ -43,7 +43,7 @@ namespace osgAnimation
typedef std::map<std::string, unsigned int> BoneNamePaletteIndex;
typedef std::vector<osg::Matrix> MatrixPalette;
struct IndexWeightEntry
/*struct IndexWeightEntry
{
IndexWeightEntry(unsigned int index=0, float weight=0.0f): _boneIndex(index), _boneWeight(weight){}
IndexWeightEntry(const IndexWeightEntry&o): _boneIndex(o._boneIndex), _boneWeight(o._boneWeight){}
@@ -52,7 +52,7 @@ namespace osgAnimation
const float &getWeight() const { return _boneWeight; }
unsigned int _boneIndex;
float _boneWeight;
};
};*/
osg::Vec4Array* getVertexAttrib(unsigned int index);
@@ -68,6 +68,8 @@ namespace osgAnimation
virtual void operator()(RigGeometry&);
virtual bool prepareData(RigGeometry& );
void setShader(osg::Shader*);
const BoneNamePaletteIndex& getBoneNameToPalette() {
@@ -89,6 +91,9 @@ namespace osgAnimation
osg::ref_ptr<osg::Shader> _shader;
bool _needInit;
bool buildPalette(BoneMap&boneMap ,RigGeometry&rig);
};
}