00001 #ifndef _SKINVERT_H
00002 #define _SKINVERT_H
00003
00004 #include "math/vector3.h"
00005 #include "Joint.h"
00006 #include "TexCoord.h"
00007
00008 class SkinVertWeight {
00009 public:
00010 SkinVertWeight() {}
00011 SkinVertWeight(int _joint, float _weight) {joint = _joint; weight = _weight;}
00012 ~SkinVertWeight() {}
00013 public:
00014 int joint;
00015 float weight;
00016 };
00017
00018 class SkinVert {
00019 public:
00020 SkinVert() {}
00021 ~SkinVert() {}
00022
00023 void SetPosition(Vector3 &_pos);
00024 void SetNormal(Vector3 &_normal);
00025 void Update(BallJoint *joints);
00026 void Update(BallJoint *joints, Vector3 *verts, Vector3 *norms)
00027 {
00028 drawPos = verts;
00029 drawNormal = norms;
00030 Update(joints);
00031 }
00032 void Draw() {
00033 glNormal3f(drawNormal->x,drawNormal->y,drawNormal->z);
00034 glTexCoord2f(texCoord.x,texCoord.y);
00035 glVertex3f(drawPos->x,drawPos->y,drawPos->z);
00036 }
00037
00038 public:
00039 Vector3 pos, *drawPos;
00040 Vector3 normal, *drawNormal;
00041 TexCoord texCoord;
00042 int numWeights;
00043 SkinVertWeight *weights;
00044 };
00045
00046 #endif //_SKINVERT_H