Added initializers

This commit is contained in:
Robert Osfield 2016-06-27 14:53:32 +01:00
parent c8a7ce4e52
commit 27595e9f02
3 changed files with 24 additions and 3 deletions

View File

@ -26,9 +26,15 @@ namespace osgAnimation
{
public:
RigTransform() {}
virtual ~RigTransform() {}
RigTransform(const RigTransform&, const osg::CopyOp&) {}
META_Object(osgAnimation,RigTransform)
virtual void operator()(RigGeometry&) {}
protected:
virtual ~RigTransform() {}
};
}

View File

@ -32,7 +32,8 @@ namespace osgAnimation
public:
RigTransformHardware();
RigTransformHardware(const RigTransformHardware&,const osg::CopyOp&){};
RigTransformHardware(const RigTransformHardware& rth, const osg::CopyOp& copyop);
META_Object(osgAnimation,RigTransformHardware)

View File

@ -27,6 +27,20 @@ RigTransformHardware::RigTransformHardware()
_nbVertexes = 0;
}
RigTransformHardware::RigTransformHardware(const RigTransformHardware& rth, const osg::CopyOp& copyop):
RigTransform(rth, copyop),
_bonesPerVertex(rth._bonesPerVertex),
_nbVertexes(rth._nbVertexes),
_vertexIndexMatrixWeightList(rth._vertexIndexMatrixWeightList),
_bonePalette(rth._bonePalette),
_boneNameToPalette(rth._boneNameToPalette),
_boneWeightAttribArrays(rth._boneWeightAttribArrays),
_uniformMatrixPalette(rth._uniformMatrixPalette),
_shader(rth._shader),
_needInit(false)
{
}
osg::Vec4Array* RigTransformHardware::getVertexAttrib(int index)
{
if (index >= (int)_boneWeightAttribArrays.size())