GameTools loadPLB
The PLB loader takes in a 3D model from either a file or a URL in the gameTools PLB file format and loads it into a PLIB scene graph.
The basic call is to loadPLB which takes either one or two filenames. If one filename is provided, the model is used for both visualisation and collision detection. If two filenames are provided, the first one is for visualisation and the second one will only be used for collision detection:
ssgEntity *loadPLB ( const char *fname, const char *alt_fname = NULL ) ;
There are a few options you can set in the loader that control debug output. hideGeometry==true causes the polygonal geometry not to be loaded, hideBones==false would cause the (normally hidden) animation 'bones' to be represented by OpenGL lines. For normal operation, this function does not need to be called:
void loadPLBOptions ( bool hideGeometry = false, bool hideBones = true ) ;
In addition, you can cause callbacks to be called whenever an "object" or a "state" is loaded:
typedef ssgEntity *(*loadPLBNOCB)( const char *name, ssgEntity *tf ); typedef ssgSimpleState *(*loadPLBNTCB)( const char *name, ssgSimpleState *tf ); void loadPLBNamedObjectCallback ( loadPLBNOCB function ) ; void loadPLBNamedTextureCallback ( loadPLBNTCB function ) ;
...in each case, the function is called with the name of the objects being loaded along with a pointer to its PLIB representation.
In addition, this library contains some 'convenience' functions for converting strings into arrays of floats or ints:
int strStringToInts ( const char *str, int **resptr ) ; int strStringToFloats ( const char *str, float **resptr ) ;
...and because both texture maps and external "library objects" are cached and shared, there is a means to query those caches:
ssgBranch *findExternal ( const char *str ) ; ssgTexture *findTexture ( const char *str ) ;
Wikiid Pages relating to gameTools (edit) |
gameTools - Main page |
gameTools - Support Tools : |
gameTools - File Formats : |
gameTools - Source Code :
|
Wikiid Pages relating to Lemur of Lima (edit) |
Lemur of Lima - Main page |
Lemur of Lima - Controls |
Lemur of Lima - Levels : |
Lemur of Lima - Java Plugins : |
Lemur of Lima - Source Code Documentation : |