Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 2, 2005, 12:14:27 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: md2model data/model seperation

File:
1 edited

Legend:

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

    r4282 r4459  
    2525
    2626//! These are the needed defines for the max values when loading .MD2 files
    27 #define MD2_IDENT                       (('2'<<24) + ('P'<<16) + ('D'<<8) + 'I')
    28 #define MD2_VERSION                     8
    29 #define MD2_MAX_TRIANGLES               4096
    30 #define MD2_MAX_VERTICES                2048
    31 #define MD2_MAX_TEXCOORDS               2048
    32 #define MD2_MAX_FRAMES                  512
    33 #define MD2_MAX_SKINS                   32
    34 #define MD2_MAX_FRAMESIZE               (MD2_MAX_VERTICES * 4 + 128)
     27#define MD2_IDENT                       (('2'<<24) + ('P'<<16) + ('D'<<8) + 'I') //!< the md2 identifier tag in the bin file
     28#define MD2_VERSION                     8                                        //!< the md2 version in the header
     29#define MD2_MAX_TRIANGLES               4096                                     //!< maximal triangles count
     30#define MD2_MAX_VERTICES                2048                                     //!< maximal vertices count
     31#define MD2_MAX_TEXCOORDS               2048                                     //!< maximal tex coordinates
     32#define MD2_MAX_FRAMES                  512                                      //!< maximal frames
     33#define MD2_MAX_SKINS                   32                                       //!< maximal skins
     34#define MD2_MAX_FRAMESIZE               (MD2_MAX_VERTICES * 4 + 128)             //!< maximal framesize
    3535
    36 #define NUM_VERTEX_NORMALS              162
     36#define NUM_VERTEX_NORMALS              162                                      //!<
    3737#define SHADEDOT_QUANT                  16
    3838
     
    6666
    6767
    68 
     68//! animation names enumeration
    6969typedef enum
    7070  {
     
    105105{
    106106 public:
    107   MD2Data();
     107  MD2Data(const char* modelFileName, const char* skinFileName);
    108108  virtual ~MD2Data();
    109109
     110 private:
    110111  bool loadModel(const char* fileName);
    111   bool loadSkin(const char* fileName);
     112  bool loadSkin(const char* fileName = NULL);
    112113
     114 public:
    113115  int numFrames;
    114116  int numVertices;
     
    133135
    134136public:
    135   MD2Model();
     137  MD2Model(const char* modelFileName, const char* skinFileName = NULL);
    136138  virtual ~MD2Model();
    137  
    138   bool loadModel(const char* filename);
    139   bool loadSkin(const char* filename);
    140  
     139   
    141140  void drawFrame(int frame);
    142141  void draw();
Note: See TracChangeset for help on using the changeset viewer.