Changeset 13041 for OpenSceneGraph/trunk/include/osgAnimation/RigGeometry
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgAnimation/RigGeometry
r12139 r13041 1 /* -*-c++-*- 1 /* -*-c++-*- 2 2 * Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net> 3 3 * 4 * This library is open source and may be redistributed and/or modified under 5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 4 * This library is open source and may be redistributed and/or modified under 5 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 6 6 * (at your option) any later version. The full license is in LICENSE file 7 7 * included with this distribution, and on the openscenegraph.org website. 8 * 8 * 9 9 * This library is distributed in the hope that it will be useful, 10 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 12 * OpenSceneGraph Public License for more details. 13 13 */ … … 22 22 #include <osg/Geometry> 23 23 24 namespace osgAnimation 24 namespace osgAnimation 25 25 { 26 26 … … 38 38 const VertexInfluenceMap* getInfluenceMap() const { return _vertexInfluenceMap.get();} 39 39 VertexInfluenceMap* getInfluenceMap() { return _vertexInfluenceMap.get();} 40 40 41 41 const Skeleton* getSkeleton() const; 42 42 Skeleton* getSkeleton(); 43 43 // will be used by the update callback to init correctly the rig mesh 44 44 void setSkeleton(Skeleton*); 45 45 46 46 void setNeedToComputeMatrix(bool state) { _needToComputeMatrix = state;} 47 47 bool getNeedToComputeMatrix() const { return _needToComputeMatrix;} 48 48 49 49 50 50 // this build the internal database about vertex influence and bones … … 72 72 73 73 protected: 74 74 75 75 osg::ref_ptr<osg::Geometry> _geometry; 76 76 osg::ref_ptr<RigTransform> _rigTransformImplementation; … … 83 83 osg::observer_ptr<Skeleton> _root; 84 84 bool _needToComputeMatrix; 85 85 86 86 struct FindNearestParentSkeleton : public osg::NodeVisitor 87 87 { 88 88 osg::ref_ptr<Skeleton> _root; 89 89 FindNearestParentSkeleton() : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_PARENTS) {} 90 void apply(osg::Transform& node) 90 void apply(osg::Transform& node) 91 91 { 92 92 if (_root.valid())
