Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4075 in orxonox.OLD for orxonox/branches/md2_loader/src


Ignore:
Timestamp:
May 6, 2005, 9:51:51 AM (20 years ago)
Author:
patrick
Message:

orxonox/braches/md2_loader: started implementing loader/model classes

File:
1 edited

Legend:

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

    r4073 r4075  
    103103typedef char tMd2Skin[64];
    104104
    105 
    106 //! A class for representating a MD2Model it handles also all of the loading code
    107 class MD2Model : public AbstractModel
    108 {
     105//! This is a MD2 Model class
     106class MD2Model : public AbstractModel {
    109107
    110108public:
    111109  MD2Model();
    112110  virtual ~MD2Model();
     111 
     112  bool loadModel(const char* filename);
     113  bool loadSkin(const char* filename);
     114 
     115  void drawModel(float time);
     116  void drawFrame(int frame);
     117 
     118  void setAnim(int type);
     119  void scaleModel(float s);
     120 
     121private:
     122  void animate(float time);
     123  void processLightning();
     124  void interpolate(CVector3* vertlist);
     125  void renderFrame();
     126};
     127
     128//! A class that handles all of the loading code
     129class MD2Loader {
     130
     131public:
     132  MD2Loader();
     133  virtual ~MD2Loader();
    113134 
    114135  bool importMD2(t3DModel *pModel, char *strFileName, char *strTexture);
     
    122143 
    123144  FILE *m_FilePointer; 
    124   tMd2Header m_Header;                                  //!< The header data
     145  tMd2Header m_Header;                                      //!< The header data
    125146  tMd2Skin *m_pSkins;                                           //!< The skin data
    126147  tMd2TexCoord *m_pTexCoords;                           //!< The texture coordinates
    127148  tMd2Face *m_pTriangles;                                       //!< Face index information
    128   tMd2Frame *m_pFrames;                                 //!< The frames of animation (vertices)
     149  tMd2Frame *m_pFrames;                                     //!< The frames of animation (vertices)
    129150};
    130151
Note: See TracChangeset for help on using the changeset viewer.