Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
md5 Struct Reference

#include <md5.hpp>

Inheritance diagram for md5:
skelmodel skelloader< md5 > animmodel modelloader< md5 > model

Classes

struct  md5mesh
 
struct  md5meshgroup
 

Public Types

enum  { LINK_TAG = 0, LINK_COOP, LINK_REUSE }
 

Public Member Functions

 md5 (const char *name)
 
int type () const override
 
meshgrouploadmeshes (const char *name, va_list args) override
 
bool loaddefaultparts () override
 
bool load () override
 
int linktype (animmodel *m) const override
 
bool skeletal () const override
 
skelpartaddpart ()
 
meshgroupsharemeshes (const char *name,...)
 
void render (int anim, int basetime, int basetime2, float pitch, const vec &axis, const vec &forward, dynent *d, modelattach *a)
 
void render (int anim, int basetime, int basetime2, const vec &o, float yaw, float pitch, dynent *d, modelattach *a, const vec &color, const vec &dir, float trans) override
 
void cleanup () override
 
void initmatrix (matrix4x3 &m)
 
void genBIH (vector< BIH::mesh > &bih)
 
void preloadBIH () override
 
BIHsetBIH () override
 
bool link (part *p, const char *tag, const vec &translate=vec(0, 0, 0), int anim=-1, int basetime=0, vec *pos=nullptr)
 
bool unlink (part *p)
 
bool envmapped () override
 
void preloadshaders (bool force) override
 
void preloadmeshes () override
 
void setshader (Shader *shader) override
 
void setenvmap (float envmapmin, float envmapmax, Texture *envmap) override
 
void setspec (float spec) override
 
void setambient (float ambient) override
 
void setglow (float glow, float delta, float pulse) override
 
void setglare (float specglare, float glowglare) override
 
void setalphatest (float alphatest) override
 
void setalphablend (bool alphablend) override
 
void setfullbright (float fullbright) override
 
void setcullface (bool cullface) override
 
void calcbb (vec &center, vec &radius) override
 
virtual void loaded ()
 
void startrender () override
 
void endrender () override
 
void boundbox (vec &center, vec &radius)
 
float collisionbox (vec &center, vec &radius)
 
float boundsphere (vec &center)
 
float above ()
 

Static Public Member Functions

static const char * formatname ()
 
static void disablebones ()
 
static void disabletangents ()
 
static void disabletc ()
 
static void disablenormals ()
 
static void disablevbo ()
 
static bool animated ()
 
static bool multiparted ()
 
static bool multimeshed ()
 

Public Attributes

vector< part * > parts
 
char * name
 
float spinyaw
 
float spinpitch
 
float offsetyaw
 
float offsetpitch
 
bool collide
 
bool ellipsecollide
 
bool shadow
 
bool alphadepth
 
bool depthoffset
 
float scale
 
vec translate
 
BIHbih
 
vec bbcenter
 
vec bbradius
 
vec bbextend
 
vec collidecenter
 
vec collideradius
 
float rejectradius
 
float eyeheight
 
float collidexyradius
 
float collideheight
 
int batch
 

Static Public Attributes

static bool enabletc = false
 
static bool enablealphablend = false
 
static bool enablecullface = true
 
static bool enablenormals = false
 
static bool enabletangents = false
 
static bool enablebones = false
 
static bool enabledepthoffset = false
 
static vec lightdir
 
static vec lightcolor
 
static float transparent = 1
 
static float lastalphatest = -1
 
static GLuint lastvbuf = 0
 
static GLuint lasttcbuf = 0
 
static GLuint lastnbuf = 0
 
static GLuint lastxbuf = 0
 
static GLuint lastbbuf = 0
 
static GLuint lastebuf = 0
 
static GLuint lastenvmaptex = 0
 
static GLuint closestenvmaptex = 0
 
static Texturelasttex = nullptr
 
static Texturelastmasks = nullptr
 
static Texturelastnormalmap = nullptr
 
static int matrixpos = 0
 
static matrix4 matrixstack [64]
 
static vector< skeladjustmentadjustments
 
static md5loading
 
static string dir
 

Member Enumeration Documentation

anonymous enum
inherited
Enumerator
LINK_TAG 
LINK_COOP 
LINK_REUSE 

Constructor & Destructor Documentation

md5::md5 ( const char *  name)
inline

Member Function Documentation

float model::above ( )
inlineinherited

References model::boundbox().

Referenced by abovemodel(), and lightent().

skelpart& skelmodel::addpart ( )
inlineinherited
static bool modelloader< md5 >::animated ( )
inlinestaticinherited
void model::boundbox ( vec center,
vec radius 
)
inlineinherited
float model::boundsphere ( vec center)
inlineinherited
void animmodel::calcbb ( vec center,
vec radius 
)
inlineoverridevirtualinherited
void animmodel::cleanup ( )
inlineoverridevirtualinherited
float model::collisionbox ( vec center,
vec radius 
)
inlineinherited
static void animmodel::disablebones ( )
inlinestaticinherited
static void animmodel::disablenormals ( )
inlinestaticinherited
static void animmodel::disabletangents ( )
inlinestaticinherited
static void animmodel::disabletc ( )
inlinestaticinherited
static void animmodel::disablevbo ( )
inlinestaticinherited
void animmodel::endrender ( )
inlineoverridevirtualinherited
bool animmodel::envmapped ( )
inlineoverridevirtualinherited

Reimplemented from model.

References loopv, and animmodel::parts.

Referenced by animmodel::render().

static const char* md5::formatname ( )
inlinestatic
void animmodel::genBIH ( vector< BIH::mesh > &  bih)
inlineinherited
void animmodel::initmatrix ( matrix4x3 m)
inlineinherited
bool animmodel::link ( part p,
const char *  tag,
const vec translate = vec(0, 0, 0),
int  anim = -1,
int  basetime = 0,
vec pos = nullptr 
)
inlineinherited

References animmodel::parts, and model::translate.

Referenced by animmodel::render().

int skelmodel::linktype ( animmodel m) const
inlineoverridevirtualinherited
bool md5::load ( )
inlineoverridevirtual
bool md5::loaddefaultparts ( )
inlineoverridevirtual
virtual void animmodel::loaded ( )
inlinevirtualinherited
meshgroup* md5::loadmeshes ( const char *  name,
va_list  args 
)
inlineoverridevirtual

Reimplemented from animmodel.

References md5::md5meshgroup::load().

static bool modelloader< md5 >::multimeshed ( )
inlinestaticinherited
static bool modelloader< md5 >::multiparted ( )
inlinestaticinherited
void animmodel::preloadBIH ( )
inlineoverridevirtualinherited

Reimplemented from model.

References model::bih, loopv, animmodel::parts, and model::preloadBIH().

void animmodel::preloadmeshes ( )
inlineoverridevirtualinherited

Reimplemented from model.

References loopv, and animmodel::parts.

void animmodel::preloadshaders ( bool  force)
inlineoverridevirtualinherited

Reimplemented from model.

References loopv, and animmodel::parts.

void animmodel::render ( int  anim,
int  basetime,
int  basetime2,
float  pitch,
const vec axis,
const vec forward,
dynent d,
modelattach a 
)
inlineinherited
void animmodel::render ( int  anim,
int  basetime,
int  basetime2,
const vec o,
float  yaw,
float  pitch,
dynent d,
modelattach a,
const vec color,
const vec dir,
float  trans 
)
inlineoverridevirtualinherited
void animmodel::setalphablend ( bool  alphablend)
inlineoverridevirtualinherited

Reimplemented from model.

References animmodel::loaddefaultparts(), loopv, loopvj, and animmodel::parts.

void animmodel::setalphatest ( float  alphatest)
inlineoverridevirtualinherited

Reimplemented from model.

References animmodel::loaddefaultparts(), loopv, loopvj, and animmodel::parts.

void animmodel::setambient ( float  ambient)
inlineoverridevirtualinherited

Reimplemented from model.

References animmodel::loaddefaultparts(), loopv, loopvj, and animmodel::parts.

BIH* animmodel::setBIH ( )
inlineoverridevirtualinherited

Reimplemented from model.

References model::bih, and animmodel::genBIH().

void animmodel::setcullface ( bool  cullface)
inlineoverridevirtualinherited

Reimplemented from model.

References animmodel::loaddefaultparts(), loopv, loopvj, and animmodel::parts.

void animmodel::setenvmap ( float  envmapmin,
float  envmapmax,
Texture envmap 
)
inlineoverridevirtualinherited
void animmodel::setfullbright ( float  fullbright)
inlineoverridevirtualinherited

Reimplemented from model.

References animmodel::loaddefaultparts(), loopv, loopvj, and animmodel::parts.

void animmodel::setglare ( float  specglare,
float  glowglare 
)
inlineoverridevirtualinherited
void animmodel::setglow ( float  glow,
float  delta,
float  pulse 
)
inlineoverridevirtualinherited
void animmodel::setshader ( Shader shader)
inlineoverridevirtualinherited

Reimplemented from model.

References animmodel::loaddefaultparts(), loopv, loopvj, animmodel::parts, and shader().

void animmodel::setspec ( float  spec)
inlineoverridevirtualinherited

Reimplemented from model.

References animmodel::loaddefaultparts(), loopv, loopvj, and animmodel::parts.

meshgroup* animmodel::sharemeshes ( const char *  name,
  ... 
)
inlineinherited
bool skelmodel::skeletal ( ) const
inlineoverridevirtualinherited

Reimplemented from model.

void animmodel::startrender ( )
inlineoverridevirtualinherited
int md5::type ( ) const
inlineoverridevirtual

Implements model.

References MDL_MD5.

bool animmodel::unlink ( part p)
inlineinherited

References animmodel::parts.

Referenced by animmodel::render().

Member Data Documentation

vector<skeladjustment> skelloader< md5 >::adjustments
staticinherited
bool model::alphadepth
inherited

Referenced by mdlalphadepth(), and animmodel::render().

int model::batch
inherited

Referenced by addbatchedmodel().

vec model::bbcenter
inherited

Referenced by model::boundbox().

vec model::bbextend
inherited

Referenced by model::boundbox(), and mdlextendbb().

vec model::bbradius
inherited

Referenced by model::boundbox().

BIH* model::bih
inherited
GLuint animmodel::closestenvmaptex = 0
staticinherited
bool model::collide
inherited

Referenced by mdlcollide(), mmcollide(), and mmintersect().

vec model::collidecenter
inherited

Referenced by model::collisionbox().

float model::collideheight
inherited

Referenced by model::collisionbox(), and mdlbb().

vec model::collideradius
inherited

Referenced by model::collisionbox().

float model::collidexyradius
inherited

Referenced by model::collisionbox(), and mdlbb().

bool model::depthoffset
inherited
string modelloader< md5 >::dir
staticinherited

Referenced by md5::md5mesh::load(), and load().

bool model::ellipsecollide
inherited
bool animmodel::enablealphablend = false
staticinherited
bool animmodel::enablebones = false
staticinherited
bool animmodel::enablecullface = true
staticinherited
bool animmodel::enabledepthoffset = false
staticinherited
bool animmodel::enablenormals = false
staticinherited
bool animmodel::enabletangents = false
staticinherited
bool animmodel::enabletc = false
staticinherited
float model::eyeheight
inherited

Referenced by mdlbb(), and setbbfrommodel().

float animmodel::lastalphatest = -1
staticinherited

Referenced by animmodel::startrender().

GLuint animmodel::lastbbuf = 0
staticinherited
GLuint animmodel::lastebuf = 0
staticinherited
GLuint animmodel::lastenvmaptex = 0
staticinherited
Texture * animmodel::lastmasks = nullptr
staticinherited
GLuint animmodel::lastnbuf = 0
staticinherited
Texture * animmodel::lastnormalmap = nullptr
staticinherited
GLuint animmodel::lasttcbuf = 0
staticinherited
Texture * animmodel::lasttex = nullptr
staticinherited
GLuint animmodel::lastvbuf = 0
staticinherited
GLuint animmodel::lastxbuf = 0
staticinherited
vec animmodel::lightcolor
staticinherited
vec animmodel::lightdir
staticinherited
md5 * modelloader< md5 >::loading
staticinherited

Referenced by md5::md5mesh::load(), and load().

int animmodel::matrixpos = 0
staticinherited
matrix4 animmodel::matrixstack
staticinherited
char* model::name
inherited
float model::offsetpitch
inherited
float model::offsetyaw
inherited
vector<part *> animmodel::parts
inherited
float model::rejectradius
inherited

Referenced by model::collisionbox().

float model::scale
inherited
bool model::shadow
inherited

Referenced by mdlshadow(), and mmintersect().

float model::spinpitch
inherited

Referenced by mdlspin(), and animmodel::render().

float model::spinyaw
inherited

Referenced by mdlspin(), and animmodel::render().

vec model::translate
inherited
float animmodel::transparent = 1
staticinherited

The documentation for this struct was generated from the following file: