Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
model Struct Referenceabstract

#include <model.hpp>

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

Public Member Functions

 model (const char *name)
 
virtual ~model ()
 
virtual void calcbb (vec &center, vec &radius)=0
 
virtual void render (int anim, int basetime, int basetime2, const vec &o, float yaw, float pitch, dynent *d, modelattach *a=nullptr, const vec &color=vec(0, 0, 0), const vec &dir=vec(0, 0, 0), float transparent=1)=0
 
virtual bool load ()=0
 
virtual int type () const =0
 
virtual BIHsetBIH ()
 
virtual bool envmapped ()
 
virtual bool skeletal () const
 
virtual void setshader (Shader *shader)
 
virtual void setenvmap (float envmapmin, float envmapmax, Texture *envmap)
 
virtual void setspec (float spec)
 
virtual void setambient (float ambient)
 
virtual void setglow (float glow, float glowdelta, float glowpulse)
 
virtual void setglare (float specglare, float glowglare)
 
virtual void setalphatest (float alpha)
 
virtual void setalphablend (bool blend)
 
virtual void setfullbright (float fullbright)
 
virtual void setcullface (bool cullface)
 
virtual void preloadBIH ()
 
virtual void preloadshaders (bool force=false)
 
virtual void preloadmeshes ()
 
virtual void cleanup ()
 
virtual void startrender ()
 
virtual void endrender ()
 
void boundbox (vec &center, vec &radius)
 
float collisionbox (vec &center, vec &radius)
 
float boundsphere (vec &center)
 
float above ()
 

Public Attributes

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
 

Constructor & Destructor Documentation

model::model ( const char *  name)
inline
virtual model::~model ( )
inlinevirtual

References bih, and name.

Member Function Documentation

float model::above ( )
inline

References boundbox().

Referenced by abovemodel(), and lightent().

void model::boundbox ( vec center,
vec radius 
)
inline
float model::boundsphere ( vec center)
inline

References boundbox(), and vec::magnitude().

virtual void model::calcbb ( vec center,
vec radius 
)
pure virtual

Implemented in animmodel.

Referenced by boundbox().

virtual void model::cleanup ( )
inlinevirtual

Reimplemented in animmodel.

Referenced by cleanupmodels().

float model::collisionbox ( vec center,
vec radius 
)
inline
virtual void model::endrender ( )
inlinevirtual

Reimplemented in animmodel.

Referenced by endmodelbatches(), endmodelquery(), and rendermodel().

virtual bool model::envmapped ( )
inlinevirtual

Reimplemented in animmodel.

virtual bool model::load ( )
pure virtual

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

Referenced by loadmodel().

virtual void model::preloadBIH ( )
inlinevirtual

Reimplemented in animmodel.

References bih, and setBIH().

Referenced by animmodel::preloadBIH(), and preloadusedmapmodels().

virtual void model::preloadmeshes ( )
inlinevirtual

Reimplemented in animmodel.

Referenced by flushpreloadedmodels(), and preloadusedmapmodels().

virtual void model::preloadshaders ( bool  force = false)
inlinevirtual

Reimplemented in animmodel.

Referenced by loadmodel(), and preloadmodelshaders().

virtual void model::render ( int  anim,
int  basetime,
int  basetime2,
const vec o,
float  yaw,
float  pitch,
dynent d,
modelattach a = nullptr,
const vec color = vec(0, 0, 0),
const vec dir = vec(0, 0, 0),
float  transparent = 1 
)
pure virtual

Implemented in animmodel.

Referenced by renderbatchedmodel(), and rendermodel().

virtual void model::setalphablend ( bool  blend)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlalphablend().

virtual void model::setalphatest ( float  alpha)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlalphatest().

virtual void model::setambient ( float  ambient)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlambient().

virtual BIH* model::setBIH ( )
inlinevirtual

Reimplemented in animmodel.

Referenced by mmintersect(), and preloadBIH().

virtual void model::setcullface ( bool  cullface)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlcullface().

virtual void model::setenvmap ( float  envmapmin,
float  envmapmax,
Texture envmap 
)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlenvmap().

virtual void model::setfullbright ( float  fullbright)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlfullbright().

virtual void model::setglare ( float  specglare,
float  glowglare 
)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlglare().

virtual void model::setglow ( float  glow,
float  glowdelta,
float  glowpulse 
)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlglow().

virtual void model::setshader ( Shader shader)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlshader().

virtual void model::setspec ( float  spec)
inlinevirtual

Reimplemented in animmodel.

Referenced by mdlspec().

virtual bool model::skeletal ( ) const
inlinevirtual

Reimplemented in skelmodel.

virtual void model::startrender ( )
inlinevirtual

Reimplemented in animmodel.

Referenced by endmodelbatches(), endmodelquery(), and rendermodel().

virtual int model::type ( ) const
pure virtual

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

Referenced by skelmodel::linktype().

Member Data Documentation

bool model::alphadepth

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

int model::batch

Referenced by addbatchedmodel().

vec model::bbcenter

Referenced by boundbox().

vec model::bbextend

Referenced by boundbox(), and mdlextendbb().

vec model::bbradius

Referenced by boundbox().

BIH* model::bih
bool model::collide

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

vec model::collidecenter

Referenced by collisionbox().

float model::collideheight

Referenced by collisionbox(), and mdlbb().

vec model::collideradius

Referenced by collisionbox().

float model::collidexyradius

Referenced by collisionbox(), and mdlbb().

bool model::depthoffset
bool model::ellipsecollide
float model::eyeheight

Referenced by mdlbb(), and setbbfrommodel().

char* model::name
float model::offsetpitch
float model::offsetyaw
float model::rejectradius

Referenced by collisionbox().

float model::scale
bool model::shadow

Referenced by mdlshadow(), and mmintersect().

float model::spinpitch

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

float model::spinyaw

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

vec model::translate

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