- Cal3D 0.11 API Reference -

bone.h

00001 //****************************************************************************//
00002 // bone.h                                                                     //
00003 // Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger                       //
00004 //****************************************************************************//
00005 // This library is free software; you can redistribute it and/or modify it    //
00006 // under the terms of the GNU Lesser General Public License as published by   //
00007 // the Free Software Foundation; either version 2.1 of the License, or (at    //
00008 // your option) any later version.                                            //
00009 //****************************************************************************//
00010 
00011 #ifndef CAL_BONE_H
00012 #define CAL_BONE_H
00013 
00014 
00015 #include "cal3d/global.h"
00016 #include "cal3d/vector.h"
00017 #include "cal3d/quaternion.h"
00018 #include "cal3d/matrix.h"
00019 #include "cal3d/corebone.h"
00020 
00021 
00022 //class CalCoreBone;
00023 class CalSkeleton;
00024 class CalModel;
00025 class CalCoreModel;
00026 
00027 
00028 class CAL3D_API CalBone
00029 {
00030 public:
00031   CalBone(CalCoreBone* coreBone);
00032   ~CalBone() { }
00033 
00034   void blendState(float weight, const CalVector& translation, const CalQuaternion& rotation);
00035   void calculateState();
00036   void clearState();
00037   CalCoreBone *getCoreBone();
00038   void setCoreState();
00039   void setCoreStateRecursive();
00040   void setRotation(const CalQuaternion& rotation);
00041   const CalQuaternion& getRotation();
00042   const CalQuaternion& getRotationAbsolute();
00043   const CalQuaternion& getRotationBoneSpace();
00044   void setTranslation(const CalVector& translation);
00045   const CalVector& getTranslation();
00046   const CalVector& getTranslationAbsolute();
00047   const CalVector& getTranslationBoneSpace();
00048   const CalMatrix& getTransformMatrix();
00049   void lockState();
00050   void setSkeleton(CalSkeleton *pSkeleton);
00051   void calculateBoundingBox();
00052   CalBoundingBox & getBoundingBox();
00053 
00054 private:
00055   CalCoreBone *m_pCoreBone;
00056   CalSkeleton *m_pSkeleton;
00057   float m_accumulatedWeight;
00058   float m_accumulatedWeightAbsolute;
00059   CalVector m_translation;
00060   CalQuaternion m_rotation;
00061   CalVector m_translationAbsolute;
00062   CalQuaternion m_rotationAbsolute;
00063   CalVector m_translationBoneSpace;
00064   CalQuaternion m_rotationBoneSpace;
00065   CalMatrix m_transformMatrix;  
00066   CalBoundingBox m_boundingBox;
00067 };
00068 
00069 #endif
00070 
00071 //****************************************************************************//

Generated at Thu Jun 29 19:03:59 2006 by The Cal3D Team with Doxygen 1.4.6