Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
skelmodel::skeleton Struct Reference

#include <skelmodel.hpp>

Public Member Functions

 skeleton ()
 
 ~skeleton ()
 
skelanimspecfindskelanim (const char *name, char sep= '\0')
 
skelanimspecaddskelanim (const char *name)
 
int findbone (const char *name)
 
int findtag (const char *name)
 
bool addtag (const char *name, int bone, const matrix4x3 &matrix)
 
void calcantipodes ()
 
void remapbones ()
 
void addpitchdep (int bone, int frame)
 
int findpitchdep (int bone)
 
int findpitchcorrect (int bone)
 
void initpitchdeps ()
 
void optimize ()
 
void expandbonemask (uchar *expansion, int bone, int val)
 
void applybonemask (ushort *mask, uchar *partmask, int partindex)
 
void linkchildren ()
 
int availgpubones () const
 
bool gpuaccelerate () const
 
float calcdeviation (const vec &axis, const vec &forward, const dualquat &pose1, const dualquat &pose2)
 
void calcpitchcorrects (float pitch, const vec &axis, const vec &forward)
 
void interpbones (const animstate *as, float pitch, const vec &axis, const vec &forward, int numanimparts, const uchar *partmask, skelcacheentry &sc)
 
void initragdoll (ragdolldata &d, skelcacheentry &sc, part *p)
 
void genragdollbones (ragdolldata &d, skelcacheentry &sc, part *p)
 
void concattagtransform (part *p, int i, const matrix4x3 &m, matrix4x3 &n)
 
void calctags (part *p, skelcacheentry *sc=nullptr)
 
void cleanup (bool full=true)
 
bool canpreload ()
 
void preload ()
 
skelcacheentrycheckskelcache (part *p, const animstate *as, float pitch, const vec &axis, const vec &forward, ragdolldata *rdata)
 
int getblendoffset (UniformLoc &u)
 
void setglslbones (UniformLoc &u, skelcacheentry &sc, skelcacheentry &bc, int count)
 
void setgpubones (skelcacheentry &sc, blendcacheentry *bc, int count)
 
bool shouldcleanup () const
 

Public Attributes

char * name
 
int shared
 
vector< skelmeshgroup * > users
 
boneinfobones
 
int numbones
 
int numinterpbones
 
int numgpubones
 
int numframes
 
dualquatframebones
 
vector< skelanimspecskelanims
 
vector< tagtags
 
vector< antipodeantipodes
 
ragdollskelragdoll
 
vector< pitchdeppitchdeps
 
vector< pitchtargetpitchtargets
 
vector< pitchcorrectpitchcorrects
 
bool usegpuskel
 
vector< skelcacheentryskelcache
 
hashtable< GLuint, int > blendoffsets
 

Constructor & Destructor Documentation

skelmodel::skeleton::skeleton ( )
inline
skelmodel::skeleton::~skeleton ( )
inline

Member Function Documentation

void skelmodel::skeleton::addpitchdep ( int  bone,
int  frame 
)
inline
skelanimspec& skelmodel::skeleton::addskelanim ( const char *  name)
inline
bool skelmodel::skeleton::addtag ( const char *  name,
int  bone,
const matrix4x3 matrix 
)
inline
void skelmodel::skeleton::applybonemask ( ushort mask,
uchar partmask,
int  partindex 
)
inline
int skelmodel::skeleton::availgpubones ( ) const
inline
void skelmodel::skeleton::calcantipodes ( )
inline
float skelmodel::skeleton::calcdeviation ( const vec axis,
const vec forward,
const dualquat pose1,
const dualquat pose2 
)
inline
void skelmodel::skeleton::calcpitchcorrects ( float  pitch,
const vec axis,
const vec forward 
)
inline
void skelmodel::skeleton::calctags ( part p,
skelcacheentry sc = nullptr 
)
inline
bool skelmodel::skeleton::canpreload ( )
inline
skelcacheentry& skelmodel::skeleton::checkskelcache ( part p,
const animstate as,
float  pitch,
const vec axis,
const vec forward,
ragdolldata rdata 
)
inline
void skelmodel::skeleton::cleanup ( bool  full = true)
inline
void skelmodel::skeleton::concattagtransform ( part p,
int  i,
const matrix4x3 m,
matrix4x3 n 
)
inline
void skelmodel::skeleton::expandbonemask ( uchar expansion,
int  bone,
int  val 
)
inline
int skelmodel::skeleton::findbone ( const char *  name)
inline

References bones, loopi(), and numbones.

int skelmodel::skeleton::findpitchcorrect ( int  bone)
inline

References loopv, and pitchcorrects.

Referenced by initpitchdeps().

int skelmodel::skeleton::findpitchdep ( int  bone)
inline

References loopv, and pitchdeps.

Referenced by initpitchdeps().

skelanimspec* skelmodel::skeleton::findskelanim ( const char *  name,
char  sep = '\0' 
)
inline

References gle::end(), loopv, and skelanims.

Referenced by smd::smdmeshgroup::loadanim().

int skelmodel::skeleton::findtag ( const char *  name)
inline

References loopv, and tags.

Referenced by addtag(), and skelmodel::skelmeshgroup::findtag().

void skelmodel::skeleton::genragdollbones ( ragdolldata d,
skelcacheentry sc,
part p 
)
inline
int skelmodel::skeleton::getblendoffset ( UniformLoc u)
inline
bool skelmodel::skeleton::gpuaccelerate ( ) const
inline
void skelmodel::skeleton::initpitchdeps ( )
inline
void skelmodel::skeleton::initragdoll ( ragdolldata d,
skelcacheentry sc,
part p 
)
inline
void skelmodel::skeleton::interpbones ( const animstate as,
float  pitch,
const vec axis,
const vec forward,
int  numanimparts,
const uchar partmask,
skelcacheentry sc 
)
inline
void skelmodel::skeleton::linkchildren ( )
inline
void skelmodel::skeleton::optimize ( )
inline
void skelmodel::skeleton::preload ( )
inline
void skelmodel::skeleton::remapbones ( )
inline
void skelmodel::skeleton::setglslbones ( UniformLoc u,
skelcacheentry sc,
skelcacheentry bc,
int  count 
)
inline
void skelmodel::skeleton::setgpubones ( skelcacheentry sc,
blendcacheentry bc,
int  count 
)
inline
bool skelmodel::skeleton::shouldcleanup ( ) const
inline

Member Data Documentation

vector<antipode> skelmodel::skeleton::antipodes
hashtable<GLuint, int> skelmodel::skeleton::blendoffsets

Referenced by cleanup(), and getblendoffset().

boneinfo* skelmodel::skeleton::bones
dualquat* skelmodel::skeleton::framebones
char* skelmodel::skeleton::name
int skelmodel::skeleton::numbones
int skelmodel::skeleton::numframes
int skelmodel::skeleton::numgpubones
int skelmodel::skeleton::numinterpbones
vector<pitchcorrect> skelmodel::skeleton::pitchcorrects
vector<pitchdep> skelmodel::skeleton::pitchdeps
vector<pitchtarget> skelmodel::skeleton::pitchtargets

Referenced by calcpitchcorrects(), and initpitchdeps().

ragdollskel* skelmodel::skeleton::ragdoll
int skelmodel::skeleton::shared
vector<skelanimspec> skelmodel::skeleton::skelanims

Referenced by addskelanim(), and findskelanim().

vector<skelcacheentry> skelmodel::skeleton::skelcache
vector<tag> skelmodel::skeleton::tags
bool skelmodel::skeleton::usegpuskel
vector<skelmeshgroup *> skelmodel::skeleton::users

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