Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007 #if !defined(_GBONE_H)
00008 #define _GBONE_H
00009
00010 #define NOMINMAX
00011 #include "glew.h"
00012 #include "windows.h"
00013 #include <vector>
00014 #include <string>
00015 #include "constants.h"
00016 #include "GGraphicsObject.h"
00017 #include "GBoundingBox.h"
00018
00019 using namespace std;
00020 class GBoundingBox;
00021
00022 class GBone : public GGraphicsObject
00023 {
00024 public:
00025 int index;
00026 int parent;
00027 char name[60];
00028 GVec4f translation;
00029 GVec4f position;
00030 GVec4f transformed_position;
00031 GMatrix16 transformationmatrix;
00032
00033
00034 GMatrix16 TRANSLATION;
00035 GMatrix16 XROTATION;
00036 GMatrix16 YROTATION;
00037 GMatrix16 ZROTATION;
00038 GMatrix16 INVERSE_TRANSLATION;
00039 GMatrix16 ACCUMULATION_MATRIX;
00040
00041 GBoundingBox *boundingbox;
00042 vector<GBone*> children;
00043 GVec4f rotations;
00044
00045 GBone();
00046 GBoundingBox *GetBoundingBox(void);
00047 int Init(void);
00048 int Draw(double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS);
00049 int Draw(double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS, int SelectedBone);
00050 int DrawSprites(double time, double dtime, GMatrix16 *viewmatrix, GMatrix16 *worldmatrix, int FLAGS);
00051 int CountChildren(void);
00052 GBone *GetBoneForIndex(int _index);
00053 GBone *GetBoneForName(char* _name);
00054 int Reset(void);
00055 int Rebuild(GMatrix16 *Transformations);
00056 int Rotate(GBone *parentbone, float pitch, float yaw, float azimuth);
00057 int ApplyTransformation(GMatrix16 Transformations);
00058 int Move(GVec4f v);
00059 int SetPosition(GVec4f v);
00060 };
00061
00062 #endif //_GBONE_H