Files
BlitzNext/Runtime/blitz3d/md2model.hpp
T

51 lines
970 B
C++
Raw Normal View History

2014-01-31 08:23:00 +13:00
#ifndef MD2MODEL_H
#define MD2MODEL_H
2019-01-18 15:55:06 +01:00
#include "model.hpp"
#include "md2rep.hpp"
2014-01-31 08:23:00 +13:00
class MD2Model : public Model{
public:
MD2Model( const string &filename );
MD2Model( const MD2Model &t );
~MD2Model();
//Entity interface
2016-10-03 17:11:15 +02:00
Entity *clone(){ return new MD2Model( *this ); }
2014-01-31 08:23:00 +13:00
MD2Model *getMD2Model(){ return this; }
//Object interface
void animate( float elapsed );
//Model interface
bool render( const RenderContext &rc );
//MD2 interface
void startMD2Anim( int first,int last,int mode,float speed,float trans );
int getMD2AnimLength()const;
bool getMD2Animating()const{ return !!anim_mode; }
float getMD2AnimTime()const{ return anim_time; }
bool getValid()const;
private:
struct Rep;
Rep *rep;
int anim_mode;
float anim_time,anim_speed;
int anim_first,anim_last,anim_len;
float render_t;
int render_a,render_b;
float trans_time,trans_speed;
MD2Rep::Vert *trans_verts;
//Unimplemented
MD2Model &operator=( const MD2Model & );
};
#endif