- Cal3D 0.9 API Reference -

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

# 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 // Includes                                                                   //
    00016 //****************************************************************************//
    00017
    00018 #include "cal3d/global.h"
    00019 #include "cal3d/vector.h"
    00020 #include "cal3d/quaternion.h"
    00021 #include "cal3d/matrix.h"
    00022 #include "cal3d/corebone.h"
    00023
    00024 //****************************************************************************//
    00025 // Forward declarations                                                       //
    00026 //****************************************************************************//
    00027
    00028 //class CalCoreBone;
    00029 class CalSkeleton;
    00030 class CalModel;
    00031 class CalCoreModel;
    00032 //class CalBoundingBox;
    00033
    00034 //****************************************************************************//
    00035 // Class declaration                                                          //
    00036 //****************************************************************************//
    00037
    00038  /*****************************************************************************/
    00042 class CAL3D_API CalBone
    00043 {
    00044 // member variables
    00045 protected:
    00046   CalCoreBone *m_pCoreBone;
    00047   CalSkeleton *m_pSkeleton;
    00048   float m_accumulatedWeight;
    00049   float m_accumulatedWeightAbsolute;
    00050   CalVector m_translation;
    00051   CalQuaternion m_rotation;
    00052   CalVector m_translationAbsolute;
    00053   CalQuaternion m_rotationAbsolute;
    00054   CalVector m_translationBoneSpace;
    00055   CalQuaternion m_rotationBoneSpace;
    00056   CalMatrix m_transformMatrix;
    00057
    00058   CalBoundingBox m_boundingBox;
    00059
    00060
    00061 // constructors/destructor
    00062 public:
    00063   CalBone();
    00064   virtual ~CalBone();
    00065
    00066 // member functions
    00067 public:
    00068   void blendState(float weight, const CalVector& translation, const CalQuaternion& rotation);
    00069   void calculateState();
    00070   void clearState();
    00071   bool create(CalCoreBone *pCoreBone);
    00072   void destroy();
    00073   CalCoreBone *getCoreBone();
    00074   void setCoreState();
    00075   void setCoreStateRecursive();
    00076   void setRotation(const CalQuaternion& rotation);
    00077   const CalQuaternion& getRotation();
    00078   const CalQuaternion& getRotationAbsolute();
    00079   const CalQuaternion& getRotationBoneSpace();
    00080   void setTranslation(const CalVector& translation);
    00081   const CalVector& getTranslation();
    00082   const CalVector& getTranslationAbsolute();
    00083   const CalVector& getTranslationBoneSpace();
    00084   const CalMatrix& getTransformMatrix();
    00085   void lockState();
    00086   void setSkeleton(CalSkeleton *pSkeleton);
    00087   void calculateBoundingBox();
    00088   CalBoundingBox & getBoundingBox();
    00089
    00090
    00091 };
    00092
    00093 #endif
    00094
    00095 //****************************************************************************//

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