- Cal3D 0.11 API Reference -

corebone.h
1//****************************************************************************//
2// corebone.h //
3// Copyright (C) 2001, 2002 Bruno 'Beosil' Heidelberger //
4//****************************************************************************//
5// This library is free software; you can redistribute it and/or modify it //
6// under the terms of the GNU Lesser General Public License as published by //
7// the Free Software Foundation; either version 2.1 of the License, or (at //
8// your option) any later version. //
9//****************************************************************************//
10
11#ifndef CAL_COREBONE_H
12#define CAL_COREBONE_H
13
14
15#include "cal3d/global.h"
16#include "cal3d/matrix.h"
17#include "cal3d/vector.h"
18#include "cal3d/quaternion.h"
19
20
21class CalCoreSkeleton;
22class CalCoreModel;
23
24
25class CAL3D_API CalCoreBone
26{
27public:
28 CalCoreBone(const std::string& name);
29 ~CalCoreBone() { }
30
31 bool addChildId(int childId);
32 void calculateState();
33 std::list<int>& getListChildId();
34 const std::string& getName();
35 int getParentId();
36 CalCoreSkeleton *getCoreSkeleton();
37 const CalQuaternion& getRotation();
38 const CalQuaternion& getRotationAbsolute();
39 const CalQuaternion& getRotationBoneSpace();
40 const CalVector& getTranslation();
41 const CalVector& getTranslationAbsolute();
42 const CalVector& getTranslationBoneSpace();
43 Cal::UserData getUserData();
44 void setCoreSkeleton(CalCoreSkeleton *pCoreSkeleton);
45 void setParentId(int parentId);
46 void setRotation(const CalQuaternion& rotation);
47 void setRotationBoneSpace(const CalQuaternion& rotation);
48 void setTranslation(const CalVector& translation);
49 void setTranslationBoneSpace(const CalVector& translation);
50 void setUserData(Cal::UserData userData);
51
52 void calculateBoundingBox(CalCoreModel * pCoreModel);
53 CalBoundingBox & getBoundingBox();
54 void getBoundingData(int planeId,CalVector & position);
55 bool isBoundingBoxPrecomputed();
56 void scale(float factor);
57
58private:
59 std::string m_strName;
60 CalCoreSkeleton *m_pCoreSkeleton;
61 int m_parentId;
62 std::list<int> m_listChildId;
63 CalVector m_translation;
64 CalQuaternion m_rotation;
65 CalVector m_translationAbsolute;
66 CalQuaternion m_rotationAbsolute;
67 CalVector m_translationBoneSpace;
68 CalQuaternion m_rotationBoneSpace;
69 Cal::UserData m_userData;
70
71 CalBoundingBox m_boundingBox;
72 CalVector m_boundingPosition[6];
73 bool m_boundingBoxPrecomputed;
74};
75
76#endif
77
78//****************************************************************************//
The bounding box class.
Definition: vector.h:221
Definition: corebone.h:26
Definition: coremodel.h:26
Definition: coreskeleton.h:24
The quaternion class.
Definition: quaternion.h:36
The vector class.
Definition: vector.h:37

Generated by The Cal3D Team with Doxygen 1.9.4