- Cal3D 0.11 API Reference -

corebone.h

00001 //****************************************************************************//
00002 // corebone.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_COREBONE_H
00012 #define CAL_COREBONE_H
00013 
00014 
00015 #include "cal3d/global.h"
00016 #include "cal3d/matrix.h"
00017 #include "cal3d/vector.h"
00018 #include "cal3d/quaternion.h"
00019 
00020 
00021 class CalCoreSkeleton;
00022 class CalCoreModel;
00023 
00024 
00025 class CAL3D_API CalCoreBone
00026 {
00027 public:
00028   CalCoreBone(const std::string& name);
00029   ~CalCoreBone() { }
00030 
00031   bool addChildId(int childId);
00032   void calculateState();
00033   std::list<int>& getListChildId();
00034   const std::string& getName();
00035   int getParentId();
00036   CalCoreSkeleton *getCoreSkeleton();
00037   const CalQuaternion& getRotation();
00038   const CalQuaternion& getRotationAbsolute();
00039   const CalQuaternion& getRotationBoneSpace();
00040   const CalVector& getTranslation();
00041   const CalVector& getTranslationAbsolute();
00042   const CalVector& getTranslationBoneSpace();
00043   Cal::UserData getUserData();
00044   void setCoreSkeleton(CalCoreSkeleton *pCoreSkeleton);
00045   void setParentId(int parentId);
00046   void setRotation(const CalQuaternion& rotation);
00047   void setRotationBoneSpace(const CalQuaternion& rotation);
00048   void setTranslation(const CalVector& translation);
00049   void setTranslationBoneSpace(const CalVector& translation);
00050   void setUserData(Cal::UserData userData);
00051 
00052   void calculateBoundingBox(CalCoreModel * pCoreModel);
00053   CalBoundingBox & getBoundingBox();
00054   void getBoundingData(int planeId,CalVector & position); 
00055   bool isBoundingBoxPrecomputed();
00056   void scale(float factor);
00057   
00058 private:
00059   std::string m_strName;
00060   CalCoreSkeleton *m_pCoreSkeleton;
00061   int m_parentId;
00062   std::list<int> m_listChildId;
00063   CalVector m_translation;
00064   CalQuaternion m_rotation;
00065   CalVector m_translationAbsolute;
00066   CalQuaternion m_rotationAbsolute;
00067   CalVector m_translationBoneSpace;
00068   CalQuaternion m_rotationBoneSpace;
00069   Cal::UserData m_userData;
00070 
00071   CalBoundingBox m_boundingBox;
00072   CalVector m_boundingPosition[6];
00073   bool m_boundingBoxPrecomputed;
00074 };
00075 
00076 #endif
00077 
00078 //****************************************************************************//

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