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
animmodel Struct Referenceabstract

#include <animmodel.hpp>

Inheritance diagram for animmodel:
model skelmodel vertmodel iqm md5 smd md2 md3 obj

Classes

struct  animpos
 
struct  animspec
 
struct  animstate
 
struct  linkedpart
 
struct  mesh
 
struct  meshgroup
 
struct  part
 
struct  shaderparams
 
struct  shaderparamskey
 
struct  skin
 

Public Types

enum  { LINK_TAG = 0, LINK_COOP, LINK_REUSE }
 

Public Member Functions

virtual meshgrouploadmeshes (const char *name, va_list args)
 
meshgroupsharemeshes (const char *name,...)
 
virtual int linktype (animmodel *m) const
 
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
 
 animmodel (const char *name)
 
 ~animmodel () override
 
void cleanup () override
 
partaddpart ()
 
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
 
virtual bool loaddefaultparts ()
 
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
 
virtual bool load ()=0
 
virtual int type () const =0
 
virtual bool skeletal () const
 
void boundbox (vec &center, vec &radius)
 
float collisionbox (vec &center, vec &radius)
 
float boundsphere (vec &center)
 
float above ()
 

Static Public Member Functions

static void disablebones ()
 
static void disabletangents ()
 
static void disabletc ()
 
static void disablenormals ()
 
static void disablevbo ()
 

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]
 

Class Documentation

struct animmodel::animspec
Class Members
int frame
int priority
int range
float speed

Member Enumeration Documentation

anonymous enum
Enumerator
LINK_TAG 
LINK_COOP 
LINK_REUSE 

Constructor & Destructor Documentation

animmodel::animmodel ( const char *  name)
inline
animmodel::~animmodel ( )
inlineoverride

References parts.

Member Function Documentation

float model::above ( )
inlineinherited

References model::boundbox().

Referenced by abovemodel(), and lightent().

part& animmodel::addpart ( )
inline

References parts.

Referenced by md3::loaddefaultparts(), and obj::loaddefaultparts().

void model::boundbox ( vec center,
vec radius 
)
inlineinherited
float model::boundsphere ( vec center)
inlineinherited
void animmodel::calcbb ( vec center,
vec radius 
)
inlineoverridevirtual

Implements model.

References vec::add(), f(), initmatrix(), vec::mul(), parts, and vec::sub().

void animmodel::cleanup ( )
inlineoverridevirtual

Reimplemented from model.

References loopv, and parts.

Referenced by vertmodel::vertmeshgroup::preload(), and vertmodel::vertmeshgroup::render().

float model::collisionbox ( vec center,
vec radius 
)
inlineinherited
static void animmodel::disablebones ( )
inlinestatic
static void animmodel::disablenormals ( )
inlinestatic
static void animmodel::disabletangents ( )
inlinestatic
static void animmodel::disabletc ( )
inlinestatic
static void animmodel::disablevbo ( )
inlinestatic
void animmodel::endrender ( )
inlineoverridevirtual
bool animmodel::envmapped ( )
inlineoverridevirtual

Reimplemented from model.

References loopv, and parts.

Referenced by render().

void animmodel::genBIH ( vector< BIH::mesh > &  bih)
inline

References initmatrix(), and parts.

Referenced by setBIH().

void animmodel::initmatrix ( matrix4x3 m)
inline
bool animmodel::link ( part p,
const char *  tag,
const vec translate = vec(0, 0, 0),
int  anim = -1,
int  basetime = 0,
vec pos = nullptr 
)
inline

References parts, and model::translate.

Referenced by render().

virtual int animmodel::linktype ( animmodel m) const
inlinevirtual

Reimplemented in skelmodel, and md2.

References LINK_TAG.

Referenced by render().

virtual bool model::load ( )
pure virtualinherited

Implemented in smd, md5, iqm, md2, obj, and md3.

Referenced by loadmodel().

virtual bool animmodel::loaddefaultparts ( )
inlinevirtual
virtual void animmodel::loaded ( )
inlinevirtual
virtual meshgroup* animmodel::loadmeshes ( const char *  name,
va_list  args 
)
inlinevirtual

Reimplemented in smd, md5, iqm, md2, obj, and md3.

Referenced by sharemeshes().

void animmodel::preloadBIH ( )
inlineoverridevirtual

Reimplemented from model.

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

void animmodel::preloadmeshes ( )
inlineoverridevirtual

Reimplemented from model.

References loopv, and parts.

void animmodel::preloadshaders ( bool  force)
inlineoverridevirtual

Reimplemented from model.

References loopv, and parts.

void animmodel::render ( int  anim,
int  basetime,
int  basetime2,
float  pitch,
const vec axis,
const vec forward,
dynent d,
modelattach a 
)
inline
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 
)
inlineoverridevirtual
void animmodel::setalphablend ( bool  alphablend)
inlineoverridevirtual

Reimplemented from model.

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

void animmodel::setalphatest ( float  alphatest)
inlineoverridevirtual

Reimplemented from model.

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

void animmodel::setambient ( float  ambient)
inlineoverridevirtual

Reimplemented from model.

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

BIH* animmodel::setBIH ( )
inlineoverridevirtual

Reimplemented from model.

References model::bih, and genBIH().

void animmodel::setcullface ( bool  cullface)
inlineoverridevirtual

Reimplemented from model.

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

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

Reimplemented from model.

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

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

Reimplemented from model.

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

void animmodel::setspec ( float  spec)
inlineoverridevirtual

Reimplemented from model.

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

meshgroup* animmodel::sharemeshes ( const char *  name,
  ... 
)
inline
virtual bool model::skeletal ( ) const
inlinevirtualinherited

Reimplemented in skelmodel.

void animmodel::startrender ( )
inlineoverridevirtual
virtual int model::type ( ) const
pure virtualinherited

Implemented in iqm, md2, md3, md5, smd, and obj.

Referenced by skelmodel::linktype().

bool animmodel::unlink ( part p)
inline

References parts.

Referenced by render().

Member Data Documentation

bool model::alphadepth
inherited

Referenced by mdlalphadepth(), and 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
static
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

Referenced by mdldepthoffset(), and render().

bool model::ellipsecollide
inherited
bool animmodel::enablealphablend = false
static
bool animmodel::enablebones = false
static
bool animmodel::enablecullface = true
static
bool animmodel::enabledepthoffset = false
static

Referenced by endrender(), render(), and startrender().

bool animmodel::enablenormals = false
static
bool animmodel::enabletangents = false
static
bool animmodel::enabletc = false
static
float model::eyeheight
inherited

Referenced by mdlbb(), and setbbfrommodel().

float animmodel::lastalphatest = -1
static

Referenced by startrender().

GLuint animmodel::lastbbuf = 0
static
GLuint animmodel::lastebuf = 0
static
GLuint animmodel::lastenvmaptex = 0
static
Texture * animmodel::lastmasks = nullptr
static
GLuint animmodel::lastnbuf = 0
static
Texture * animmodel::lastnormalmap = nullptr
static
GLuint animmodel::lasttcbuf = 0
static
Texture * animmodel::lasttex = nullptr
static
GLuint animmodel::lastvbuf = 0
static
GLuint animmodel::lastxbuf = 0
static
vec animmodel::lightcolor
static
vec animmodel::lightdir
static

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

int animmodel::matrixpos = 0
static
matrix4 animmodel::matrixstack
static
char* model::name
inherited
float model::offsetpitch
inherited

Referenced by initmatrix(), mdlpitch(), and render().

float model::offsetyaw
inherited

Referenced by initmatrix(), mdlyaw(), and render().

vector<part *> animmodel::parts
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 render().

float model::spinyaw
inherited

Referenced by mdlspin(), and render().

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

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