Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2005, 10:50:00 PM (19 years ago)
Author:
patrick
Message:

orxonox/branches/md2_model: flushing work state

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.h

    r4224 r4227  
    174174
    175175
    176 
    177 //! This is a MD2 Model class
    178 class MD2Model2 : public AbstractModel {
    179 
    180 public:
    181   MD2Model2();
    182   virtual ~MD2Model2();
    183  
    184   bool loadModel(const char* filename);
    185   bool loadSkin(const char* filename);
    186  
    187   void drawFrame(int frame);
    188   void draw();
    189   void draw2();
    190  
    191   void setAnim(int type);
    192   void scaleModel(float scaleFactor) { this->scaleFactor = scaleFactor;}
    193 
    194   void tick(float dtS);
    195 
    196 
    197 private:
    198   void animate(); 
    199   void processLighting();
    200   void interpolate(sVec3D* verticesList);
    201   void renderFrame();
    202 
    203  public:
    204   /* these variables are static, because they are all the same for every model */
    205   static sVec3D anorms[NUM_VERTEX_NORMALS];
    206   static float anormsDots[SHADEDOT_QUANT][256];
    207   static sAnim animationList[21];
    208 
    209  private:
    210   int numFrames;
    211   int numVertices;
    212   int numTriangles;
    213   int numGLCommands;
    214 
    215   sVec3D* pVertices;
    216   int* pGLCommands;
    217   int* pLightNormals;
    218 
    219   unsigned int textureID;
    220   Material* material;
    221   sAnimState animationState;
    222   float scaleFactor;
    223   //tMd2Header* header;
    224 };
    225 
    226 
    227176//! A class that handles all of the loading code
    228177class MD2Loader : public BaseObject {
     
    250199
    251200
     201//! This is a MD2 Model class
     202class MD2Model2 : public AbstractModel {
     203
     204public:
     205  MD2Model2();
     206  virtual ~MD2Model2();
     207 
     208  bool loadModel(const char* filename);
     209  bool loadSkin(const char* filename);
     210 
     211  void drawFrame(int frame);
     212  void draw();
     213  void draw2();
     214 
     215  void setAnim(int type);
     216  void scaleModel(float scaleFactor) { this->scaleFactor = scaleFactor;}
     217
     218  void tick(float dtS);
     219  void debug();
     220
     221
     222private:
     223  void animate(); 
     224  void processLighting();
     225  void interpolate(sVec3D* verticesList);
     226  void renderFrame();
     227
     228 public:
     229  /* these variables are static, because they are all the same for every model */
     230  static sVec3D anorms[NUM_VERTEX_NORMALS];
     231  static float anormsDots[SHADEDOT_QUANT][256];
     232  static sAnim animationList[21];
     233
     234 private:
     235  int numFrames;
     236  int numVertices;
     237  int numTriangles;
     238  int numGLCommands;
     239
     240  sVec3D* pVertices;
     241  int* pGLCommands;
     242  int* pLightNormals;
     243
     244  unsigned int textureID;
     245  Material* material;
     246  sAnimState animationState;
     247  float scaleFactor;
     248  tMd2Header* header;
     249};
     250
     251
     252
     253
     254
    252255#endif /* _MD2MODEL_H */
Note: See TracChangeset for help on using the changeset viewer.