00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __AELIB_AEGEOM_MD2OBJECT_H__
00023 #define __AELIB_AEGEOM_MD2OBJECT_H__
00024
00025 #include <aedefs.h>
00026 #include <aeengine/eflags.h>
00027 #include <aegeom/object.h>
00028 #include <aegeom/model.h>
00029 #include <aegeom/vector3.h>
00030 #include <aegfx/material.h>
00031 #include <aegfx/texcoord2.h>
00032 #include <aegfx/texture.h>
00033 #include <aemdlldr/mdlstruct.h>
00034
00041 class aeMD2Object: public aeModel {
00042 AECF_CNDEF
00043
00044 private:
00045 int frameSize;
00046 int currentFrame;
00047 int nextFrame;
00048 int startFrame;
00049 int endFrame;
00050 int keyFrame;
00051 float interpol;
00052 float percent;
00053 mesh_t *triIndex;
00054
00055 public:
00056 aeMD2Object(char *mdlstr, aeVector3_vector *vertList, aeTexCoord2_vector *stList,
00057 mesh_t *triIdx, unsigned int numframes, unsigned int numverts, unsigned int numtris,
00058 unsigned int numst, unsigned int framesize);
00059
00060 ~aeMD2Object();
00061
00067 void draw(aeEngineflags *);
00068
00076 int animate(aeEngineflags *);
00077
00083 int renderFrame(aeEngineflags *);
00084
00092 void setAnimation(int startframe, int endframe, float percent);
00093
00099 void setFrame(int keyframe);
00100
00107 modelState_t getState();
00108
00114 void setState(modelState_t state);
00115 };
00116
00117 #endif // __AELIB_AEGEOM_MD2OBJECT_H__