From 27595e9f02cb1fcdd21046f0a7390f1a07418773 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 27 Jun 2016 14:53:32 +0100 Subject: [PATCH] Added initializers --- include/osgAnimation/RigTransform | 10 ++++++++-- include/osgAnimation/RigTransformHardware | 3 ++- src/osgAnimation/RigTransformHardware.cpp | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/include/osgAnimation/RigTransform b/include/osgAnimation/RigTransform index 546957b97..750adad00 100644 --- a/include/osgAnimation/RigTransform +++ b/include/osgAnimation/RigTransform @@ -1,4 +1,4 @@ -/* -*-c++-*- + /* -*-c++-*- * Copyright (C) 2009 Cedric Pinson * * This library is open source and may be redistributed and/or modified under @@ -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() {} + }; } diff --git a/include/osgAnimation/RigTransformHardware b/include/osgAnimation/RigTransformHardware index af983df23..04533d74b 100644 --- a/include/osgAnimation/RigTransformHardware +++ b/include/osgAnimation/RigTransformHardware @@ -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) diff --git a/src/osgAnimation/RigTransformHardware.cpp b/src/osgAnimation/RigTransformHardware.cpp index 03c292fed..86f08ed35 100644 --- a/src/osgAnimation/RigTransformHardware.cpp +++ b/src/osgAnimation/RigTransformHardware.cpp @@ -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())