- Cal3D 0.9 API Reference -

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

# 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 // Includes                                                                   //
    00016 //****************************************************************************//
    00017
    00018 #include "cal3d/global.h"
    00019 #include "cal3d/matrix.h"
    00020 #include "cal3d/vector.h"
    00021 #include "cal3d/quaternion.h"
    00022
    00023 //****************************************************************************//
    00024 // Forward declarations                                                       //
    00025 //****************************************************************************//
    00026
    00027 class CalCoreSkeleton;
    00028 class CalCoreModel;
    00029
    00030 //****************************************************************************//
    00031 // Class declaration                                                          //
    00032 //****************************************************************************//
    00033
    00034
    00035  /*****************************************************************************/
    00039 class CAL3D_API CalCoreBone
    00040 {
    00041 // member variables
    00042 protected:
    00043   std::string m_strName;
    00044   CalCoreSkeleton *m_pCoreSkeleton;
    00045   int m_parentId;
    00046   std::list<int> m_listChildId;
    00047   CalVector m_translation;
    00048   CalQuaternion m_rotation;
    00049   CalVector m_translationAbsolute;
    00050   CalQuaternion m_rotationAbsolute;
    00051   CalVector m_translationBoneSpace;
    00052   CalQuaternion m_rotationBoneSpace;
    00053   Cal::UserData m_userData;
    00054
    00055   CalBoundingBox m_boundingBox;
    00056   CalVector m_boundingPosition[6];
    00057
    00058
    00059 // constructors/destructor
    00060 public:
    00061   CalCoreBone();
    00062   virtual ~CalCoreBone();
    00063
    00064 // member functions
    00065 public:
    00066   bool addChildId(int childId);
    00067   void calculateState();
    00068   bool create(const std::string& strName);
    00069   void destroy();
    00070   std::list<int>& getListChildId();
    00071   const std::string& getName();
    00072   int getParentId();
    00073   CalCoreSkeleton *getCoreSkeleton();
    00074   const CalQuaternion& getRotation();
    00075   const CalQuaternion& getRotationAbsolute();
    00076   const CalQuaternion& getRotationBoneSpace();
    00077   const CalVector& getTranslation();
    00078   const CalVector& getTranslationAbsolute();
    00079   const CalVector& getTranslationBoneSpace();
    00080   Cal::UserData getUserData();
    00081   void setCoreSkeleton(CalCoreSkeleton *pCoreSkeleton);
    00082   void setParentId(int parentId);
    00083   void setRotation(const CalQuaternion& rotation);
    00084   void setRotationBoneSpace(const CalQuaternion& rotation);
    00085   void setTranslation(const CalVector& translation);
    00086   void setTranslationBoneSpace(const CalVector& translation);
    00087   void setUserData(Cal::UserData userData);
    00088
    00089   void calculateBoundingBox(CalCoreModel * pCoreModel);
    00090   CalBoundingBox & getBoundingBox();
    00091   void getBoundingData(int planeId,CalVector & position);
    00092
    00093 };
    00094
    00095 #endif
    00096
    00097 //****************************************************************************//

Generated at Wed Apr 7 16:57:16 2004 by The Cal3D Team with 1.3.6 © 1997-2001 Dimitri van Heesch