GameTools loadPLB

From Wikiid
Revision as of 20:51, 23 October 2007 by SteveBaker (Talk | contribs) (New page: 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 ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 :
plb_to_ac3d, mklevel, mktile, mktree, tiled, autogen_java, mk3dgallery
gameTools - File Formats :
title_screen.rgb, ultimate.xml, material.xml, decoration.xml, physics.xml
tiled.xml, tiled_autotiles.xml, Level files, Tile naming scheme, PLB files
gameTools - Source Code :
Game functions: gameCamera, gameClock, gameChecksum/gameHashTable, gameHTTP,
gameIsect, gameJoystick, gameParticleManager, gameScreen/gameMouse,
gameSky, gameStarter, gameStrokeFont, gameUtils
Material database: MatList/MatEntry
Tile map handling: TileObject/MapFlag/MapEntry/Map
Java Interfacing: JavaLink
Image file loading: liImage/liImageFactory
3D Model file loading: loadPLB, PLB exporter
Physics: Sabot, Bullet, gameTools - Use with Blender, PLB exporter
Object management: Object


Wikiid Pages relating to Lemur of Lima (edit)
Lemur of Lima - Main page
Lemur of Lima - Controls
Lemur of Lima - Levels :
List of Levels, Level design, Screen shots, Models
Lemur of Lima - Java Plugins :
Java plugin API, Event handling, Flags, GameInterface API , Alphabetical Index
Lemur of Lima - Source Code Documentation :
Initialisation, Main Loop, gameTools