2.8 branch: backport of osgAnimation from svn head 11026.

This commit is contained in:
Paul MARTZ
2010-03-13 20:55:16 +00:00
parent 15fd3bdcc2
commit 38e68ed7f1
84 changed files with 6677 additions and 1331 deletions

View File

@@ -1,5 +1,5 @@
/* -*-c++-*-
* Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net>
* Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net>
*
* This library is open source and may be redistributed and/or modified under
* the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
@@ -12,33 +12,36 @@
* OpenSceneGraph Public License for more details.
*/
#ifndef OSGANIMATION_SKELETON_H
#define OSGANIMATION_SKELETON_H
#ifndef OSGANIMATION_SKELETON
#define OSGANIMATION_SKELETON 1
#include <osg/MatrixTransform>
#include <osgAnimation/Bone>
#include <osgAnimation/Export>
#include <osg/MatrixTransform>
namespace osgAnimation
{
class OSGANIMATION_EXPORT Skeleton : public Bone
class OSGANIMATION_EXPORT Skeleton : public osg::MatrixTransform
{
public:
META_Node(osgAnimation, Skeleton);
struct OSGANIMATION_EXPORT UpdateSkeleton : public osg::NodeCallback
class OSGANIMATION_EXPORT UpdateSkeleton : public osg::NodeCallback
{
public:
META_Object(osgAnimation, UpdateSkeleton);
UpdateSkeleton() {}
UpdateSkeleton(const UpdateSkeleton& us, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY) : osg::NodeCallback(us, copyop) {}
UpdateSkeleton();
UpdateSkeleton(const UpdateSkeleton&, const osg::CopyOp&);
virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
bool needToValidate() const;
protected:
bool _needValidate;
};
Skeleton(const Skeleton& b, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY) : Bone(b,copyop) {}
Skeleton();
void setDefaultUpdateCallback(void);
void computeBindMatrix() { _invBindInSkeletonSpace = osg::Matrix::inverse(_bindInBoneSpace); }
Skeleton(const Skeleton&, const osg::CopyOp&);
void setDefaultUpdateCallback();
};
}