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

#include <skelmodel.hpp>

Inheritance diagram for skelmodel:
animmodel model iqm md5 smd

Classes

struct  animcacheentry
 
struct  animpartmask
 
struct  antipode
 
struct  blendcacheentry
 
struct  blendcombo
 
struct  boneinfo
 
struct  bumpvert
 
struct  pitchcorrect
 
struct  pitchdep
 
struct  pitchtarget
 
struct  skelanimspec
 
struct  skelcacheentry
 
struct  skeleton
 
struct  skelmesh
 
struct  skelmeshgroup
 
struct  skelpart
 
struct  tag
 
struct  tri
 
struct  vbocacheentry
 
struct  vert
 
struct  vvert
 
struct  vvertbump
 
struct  vvertbumpw
 
struct  vvertn
 
struct  vvertnw
 
struct  vvertw
 

Public Types

enum  { LINK_TAG = 0, LINK_COOP, LINK_REUSE }
 

Public Member Functions

 skelmodel (const char *name)
 
int linktype (animmodel *m) const override
 
bool skeletal () const override
 
skelpartaddpart ()
 
virtual meshgrouploadmeshes (const char *name, va_list args)
 
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
 
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
 
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 skelmodel::animpartmask
Class Members
uchar bones[1]
animpartmask * next
int numbones
struct skelmodel::bumpvert
Class Members
quat tangent
struct skelmodel::pitchdep
Class Members
int bone
int parent
dualquat pose
struct skelmodel::pitchtarget
Class Members
int bone
int corrects
int deps
float deviated
int frame
float pitchmax
float pitchmin
dualquat pose
struct skelmodel::tri
Class Members
ushort vert[3]

Member Enumeration Documentation

anonymous enum
inherited
Enumerator
LINK_TAG 
LINK_COOP 
LINK_REUSE 

Constructor & Destructor Documentation

skelmodel::skelmodel ( const char *  name)
inline

Member Function Documentation

float model::above ( )
inlineinherited

References model::boundbox().

Referenced by abovemodel(), and lightent().

skelpart& skelmodel::addpart ( )
inline
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().

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
inlineoverridevirtual
virtual bool model::load ( )
pure virtualinherited

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

Referenced by loadmodel().

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

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

Referenced by animmodel::sharemeshes().

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
inlineoverridevirtual

Reimplemented from model.

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

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

Referenced by linktype().

bool animmodel::unlink ( part p)
inlineinherited

References animmodel::parts.

Referenced by animmodel::render().

Member Data Documentation

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
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
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: