Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Functions
animmodel.hpp File Reference

Go to the source code of this file.

Classes

struct  animmodel
 
struct  animmodel::animspec
 
struct  animmodel::animpos
 
struct  animmodel::animstate
 
struct  animmodel::shaderparams
 
struct  animmodel::shaderparamskey
 
struct  animmodel::skin
 
struct  animmodel::mesh
 
struct  animmodel::meshgroup
 
struct  animmodel::linkedpart
 
struct  animmodel::part
 
struct  modelloader< MDL >
 
struct  modelcommands< MDL, MESH >
 

Macros

#define DOMODELSHADER(name, body)
 
#define LOADMODELSHADER(name)   DOMODELSHADER(name, return name##shader)
 
#define SETMODELSHADER(m, name)   DOMODELSHADER(name, (m)->setshader(name##shader))
 
#define loopmeshes(meshname, m, body)
 
#define loopskins(meshname, s, body)   loopmeshes(meshname, m, { skin &s = mdl.skins[i]; body; })
 

Functions

static uint hthash (const animmodel::shaderparams &k)
 
static bool htcmp (const animmodel::shaderparams &x, const animmodel::shaderparams &y)
 

Class Documentation

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

Macro Definition Documentation

#define DOMODELSHADER (   name,
  body 
)
Value:
do { \
static Shader *name##shader = NULL; \
if(!name##shader) name##shader = useshaderbyname(#name); \
body; \
} while(0)
#define NULL
Definition: cube_types.hpp:35
void shader(int *type, char *name, char *vs, char *ps)
Definition: shader.cpp:1060
if(NOT DEFINED PROJECT_ARCH) message(FATAL_ERROR"You are generating from the wrong folder! \"Where is the Source
Definition: CMakeLists.txt:2
Shader * useshaderbyname(const char *name)
Definition: shader.cpp:1051
Definition: shader.hpp:142
#define LOADMODELSHADER (   name)    DOMODELSHADER(name, return name##shader)
#define loopmeshes (   meshname,
  m,
  body 
)
Value:
if(!MDL::loading || MDL::loading->parts.empty()) { Log.std->error("not loading an {}", MDL::formatname()); return; } \
part &mdl = *MDL::loading->parts.last(); \
if(!mdl.meshes) return; \
loopv(mdl.meshes->meshes) \
{ \
MESH &m = *(MESH *)mdl.meshes->meshes[i]; \
if(!strcmp(meshname, "*") || (m.name && !strcmp(m.name, meshname))) \
{ \
body; \
} \
}
static Logger std
Logger for everything not fitting elsewhere.
Definition: Logging.hpp:89
partrenderer * parts[24]
Definition: renderparticles.cpp:735
inexor::util::log_manager Log
Definition: Logging.cpp:241
if(NOT DEFINED PROJECT_ARCH) message(FATAL_ERROR"You are generating from the wrong folder! \"Where is the Source
Definition: CMakeLists.txt:2
#define loopv(v)
Definition: cube_loops.hpp:21

Referenced by modelcommands< MDL, struct MDL::vertmesh >::setnoclip().

#define loopskins (   meshname,
  s,
  body 
)    loopmeshes(meshname, m, { skin &s = mdl.skins[i]; body; })
#define SETMODELSHADER (   m,
  name 
)    DOMODELSHADER(name, (m)->setshader(name##shader))

Referenced by animmodel::skin::bind().

Function Documentation

static bool htcmp ( const animmodel::shaderparams x,
const animmodel::shaderparams y 
)
inlinestatic
static uint hthash ( const animmodel::shaderparams k)
inlinestatic

References memhash().