15 #ifndef OSGANIMATION_RIGGEOMETRY_H
16 #define OSGANIMATION_RIGGEOMETRY_H
18 #include <osgAnimation/Export>
19 #include <osgAnimation/Skeleton>
20 #include <osgAnimation/RigTransform>
21 #include <osgAnimation/VertexInfluence>
22 #include <osg/Geometry>
34 osg::Drawable::ComputeBoundingBoxCallback(rhs, copyop),
36 _factor(rhs._factor) {}
41 void reset() { _computed =
false; }
74 void buildVertexInfluenceSet();
77 void computeMatrixFromRootSkeleton();
87 const osg::Matrix& getMatrixFromSkeletonToGeometry()
const;
88 const osg::Matrix& getInvMatrixFromSkeletonToGeometry()
const;
145 if(!finder.
_root.valid())
147 osg::notify(
osg::WARN) <<
"A RigGeometry did not find a parent skeleton for RigGeometry ( " << geom->
getName() <<
" )" << std::endl;
RigComputeBoundingBoxCallback(const RigComputeBoundingBoxCallback &rhs, const osg::CopyOp ©op)
const Skeleton * getSkeleton() const
const ParentList & getParents() const
#define OSGANIMATION_EXPORT
void apply(osg::Transform &node)
osg::Matrix _invMatrixFromSkeletonToGeometry
osg::observer_ptr< Skeleton > _root
UpdateRigGeometry(const UpdateRigGeometry &, const osg::CopyOp &)
const VertexInfluenceMap * getInfluenceMap() const
void setInfluenceMap(VertexInfluenceMap *vertexInfluenceMap)
osg::ref_ptr< RigTransform > _rigTransformImplementation
RigComputeBoundingBoxCallback(double factor=2.0)
osg::BoundingBox _boundingBox
META_Object(osgAnimation, UpdateRigGeometry)
void buildVertexInfluenceSet()
void computeMatrixFromRootSkeleton()
#define META_Object(library, name)
VertexInfluenceSet _vertexInfluenceSet
const std::string & getName() const
osg::Matrix _matrixFromSkeletonToGeometry
void setSkeleton(Skeleton *)
void setNeedToComputeMatrix(bool state)
osg::ref_ptr< Skeleton > _root
FindNearestParentSkeleton()
virtual void update(osg::NodeVisitor *, osg::Drawable *drw)
OSG_EXPORT std::ostream & notify(const NotifySeverity severity)
VertexInfluenceMap * getInfluenceMap()
bool _needToComputeMatrix
bool getNeedToComputeMatrix() const
osg::ref_ptr< VertexInfluenceMap > _vertexInfluenceMap
osg::ref_ptr< osg::Geometry > _geometry