Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros
skelmodel.hpp File Reference
#include "inexor/shared/command.hpp"

Go to the source code of this file.

Classes

struct  skelmodel
 
struct  skelmodel::vert
 
struct  skelmodel::vvert
 
struct  skelmodel::vvertn
 
struct  skelmodel::vvertbump
 
struct  skelmodel::vvertw
 
struct  skelmodel::vvertnw
 
struct  skelmodel::vvertbumpw
 
struct  skelmodel::bumpvert
 
struct  skelmodel::tri
 
struct  skelmodel::blendcombo
 
struct  skelmodel::animcacheentry
 
struct  skelmodel::vbocacheentry
 
struct  skelmodel::skelcacheentry
 
struct  skelmodel::blendcacheentry
 
struct  skelmodel::skelmesh
 
struct  skelmodel::tag
 
struct  skelmodel::skelanimspec
 
struct  skelmodel::boneinfo
 
struct  skelmodel::antipode
 
struct  skelmodel::pitchdep
 
struct  skelmodel::pitchtarget
 
struct  skelmodel::pitchcorrect
 
struct  skelmodel::skeleton
 
struct  skelmodel::skelmeshgroup
 
struct  skelmodel::animpartmask
 
struct  skelmodel::skelpart
 
struct  skeladjustment
 
struct  skelloader< MDL >
 
struct  skelcommands< MDL >
 

Macros

#define BONEMASK_NOT   0x8000
 Skeletal Models Header: Header for model file formats with embedded skeletons. More...
 
#define BONEMASK_END   0xFFFF
 
#define BONEMASK_BONE   0x7FFF
 
#define IPLOOP(type, dosetup, dotransform)
 
#define INTERPBONE(bone)
 
#define FILLVDATA(type)
 
#define GENVBO(type, args)
 
#define GENVBOANIM(type)   GENVBO(type, (idxs, vlen, vverts))
 
#define GENVBOSTAT(type)   GENVBO(type, (idxs, vlen, vverts, htdata, htlen))
 
#define SEARCHCACHE(cachesize, cacheentry, cache, reusecheck)
 

Class Documentation

struct skelmodel::bumpvert
Class Members
quat tangent
struct skelmodel::tri
Class Members
ushort vert[3]
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::animpartmask
Class Members
uchar bones[1]
animpartmask * next
int numbones

Macro Definition Documentation

#define BONEMASK_BONE   0x7FFF
#define BONEMASK_END   0xFFFF
#define BONEMASK_NOT   0x8000

Skeletal Models Header: Header for model file formats with embedded skeletons.

Referenced by skelmodel::skeleton::applybonemask(), and skelcommands< MDL >::setanimpart().

#define FILLVDATA (   type)
Value:
do { \
loopv(meshes) ((skelmesh *)meshes[i])->fillverts((type *)vdata); \
} while(0)
#define loopv(v)
Definition: cube_loops.hpp:21

Referenced by skelmodel::skelmeshgroup::genvbo().

#define GENVBO (   type,
  args 
)
Value:
do { \
vertsize = sizeof(type); \
vector<type> vverts; \
loopv(meshes) vlen += ((skelmesh *)meshes[i])->genvbo args; \
glBufferData_(GL_ARRAY_BUFFER, vverts.length()*sizeof(type), vverts.getbuf(), GL_STATIC_DRAW); \
} while(0)
GLintptr GLsizeiptr length
Definition: glexts.hpp:354
PFNGLBUFFERDATAPROC glBufferData_
Definition: rendergl.cpp:126
int vverts
Definition: octarender.cpp:1235
void genvbo(int type, void *buf, int len, vtxarray **vas, int numva)
Definition: octarender.cpp:80
#define loopv(v)
Definition: cube_loops.hpp:21
#define GENVBOANIM (   type)    GENVBO(type, (idxs, vlen, vverts))
#define GENVBOSTAT (   type)    GENVBO(type, (idxs, vlen, vverts, htdata, htlen))
#define INTERPBONE (   bone)
Value:
const animstate &s = as[partmask[bone]]; \
const framedata &f = partframes[partmask[bone]]; \
dualquat d; \
(d = f.fr1[bone]).mul((1-s.cur.t)*s.interp); \
d.accumulate(f.fr2[bone], s.cur.t*s.interp); \
if(s.interp<1) \
{ \
d.accumulate(f.pfr1[bone], (1-s.prev.t)*(1-s.interp)); \
d.accumulate(f.pfr2[bone], s.prev.t*(1-s.interp)); \
}
ICOMMAND * f(float *a, float *b), floatret(*a **b)
if(NOT DEFINED PROJECT_ARCH) message(FATAL_ERROR"You are generating from the wrong folder! \"Where is the Source
Definition: CMakeLists.txt:2
int d
Definition: octaedit.cpp:1749

Referenced by skelmodel::skeleton::interpbones().

#define IPLOOP (   type,
  dosetup,
  dotransform 
)
Value:
{ \
const vert &src = verts[i]; \
type &dst = ((type * RESTRICT)vdata)[i]; \
dosetup; \
const dualquat &b = (src.interpindex < blendoffset ? bdata1 : bdata2)[src.interpindex]; \
dst.pos = b.transform(src.pos); \
dotransform; \
}
vec transform(const vec &v) const
Definition: geom.hpp:637
int numverts
Definition: explosion.cpp:35
Definition: geom.hpp:536
else loopi(numargs)
Definition: command.cpp:3019
#define RESTRICT
Definition: cube_tools.hpp:18
struct sphere::vert * verts

Referenced by skelmodel::skelmesh::interpverts().

#define SEARCHCACHE (   cachesize,
  cacheentry,
  cache,
  reusecheck 
)
Value:
loopi(cachesize) \
{ \
cacheentry &c = cache[i]; \
if(c.owner==owner) \
{ \
if(c==sc) return c; \
else c.owner = -1; \
break; \
} \
} \
loopi(cachesize-1) \
{ \
cacheentry &c = cache[i]; \
if(reusecheck c.owner < 0 || c.millis < lastmillis) \
return c; \
} \
return cache[cachesize-1];
else loopi(numargs)
Definition: command.cpp:3019
int lastmillis
Definition: legacy_time.cpp:14
if(NOT DEFINED PROJECT_ARCH) message(FATAL_ERROR"You are generating from the wrong folder! \"Where is the Source
Definition: CMakeLists.txt:2

Referenced by skelmodel::skelmeshgroup::checkblendcache(), and skelmodel::skelmeshgroup::checkvbocache().