Show
Ignore:
Timestamp:
11/13/09 14:39:21 (4 years ago)
Author:
cedricpinson
Message:

From Cedric Pinson, Fix Skeleton to compute correctly bind matrix, fix compile issue on osganimationhardware after fixing Skeleton

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgAnimation/Skeleton

    r10656 r10751  
    11/*  -*-c++-*-  
    2  *  Copyright (C) 2008 Cedric Pinson <mornifle@plopbyte.net> 
     2 *  Copyright (C) 2008 Cedric Pinson <cedric.pinson@plopbyte.net> 
    33 * 
    44 * This library is open source and may be redistributed and/or modified under   
     
    1313*/ 
    1414 
    15 #ifndef OSGANIMATION_SKELETON_H 
    16 #define OSGANIMATION_SKELETON_H 
     15#ifndef OSGANIMATION_SKELETON 
     16#define OSGANIMATION_SKELETON 1 
    1717 
    18 #include <osg/MatrixTransform> 
     18#include <osgAnimation/Export> 
    1919#include <osgAnimation/Bone> 
    20 #include <osgAnimation/Export> 
    2120 
    2221namespace osgAnimation  
     
    3231        public: 
    3332            META_Object(osgAnimation, UpdateSkeleton); 
    34             UpdateSkeleton() : _needValidate(true) {} 
    35             UpdateSkeleton(const UpdateSkeleton& us, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY) : osg::Object(us, copyop), osg::NodeCallback(us, copyop) { _needValidate = true;} 
     33            UpdateSkeleton(); 
     34            UpdateSkeleton(const UpdateSkeleton&, const osg::CopyOp&); 
    3635            virtual void operator()(osg::Node* node, osg::NodeVisitor* nv); 
    37  
     36            bool needToValidate() const; 
    3837        protected: 
    3938            bool _needValidate; 
    4039        }; 
    4140 
    42         Skeleton(const Skeleton& b, const osg::CopyOp& copyop= osg::CopyOp::SHALLOW_COPY) : Bone(b,copyop) {} 
    4341        Skeleton(); 
    44         void setDefaultUpdateCallback(void); 
    45         void computeBindMatrix() { _invBindInSkeletonSpace = osg::Matrix::inverse(_bindInBoneSpace); _needToRecomputeBindMatrix = false; } 
     42        Skeleton(const Skeleton&, const osg::CopyOp&); 
     43 
     44        void setDefaultUpdateCallback(); 
     45        void computeBindMatrix(); 
    4646    }; 
    4747