Files
BlitzNext/Runtime/blitz3d/md2rep.hpp
T

51 lines
1.0 KiB
C++
Raw Normal View History

2014-01-31 08:23:00 +13:00
#ifndef MD2REP_H
#define MD2REP_H
2019-01-18 15:55:06 +01:00
#include "model.hpp"
2014-01-31 08:23:00 +13:00
class MD2Rep{
public:
struct Vert{
Vector coords,normal;
};
MD2Rep( const string &f );
virtual ~MD2Rep();
void render( Vert *verts,int frame );
void render( Vert *verts,int frame,float time );
void render( Vert *verts,int frame_a,int frame_b,float time );
void render( Vert *verts,const Vert *verts_a,const Vert *verts_b,float time );
void render( Model *model,int frame_a,int frame_b,float time );
void render( Model *model,const Vert *verts_a,const Vert *verts_b,float time );
void render( Model *model,const Vert *verts_a,int frame_b,float time );
const Box &getBox()const{ return box; }
const int numFrames()const{ return n_frames; }
const int numVertices()const{ return n_verts; }
private:
struct Vertex{
unsigned char x,y,z,n;
};
struct VertexUV{
float u,v;
};
struct Frame{
Vector scale,trans;
vector<Vertex> verts;
};
Box box;
gxMesh *mesh;
int n_frames;
int n_verts,n_tris;
vector<Frame> frames;
vector<VertexUV> uvs;
};
#endif