GameTools gameCamera

From Wikiid
Jump to: navigation, search

Makes driving the PLIB camera a little less painful.

The camera supports two modes:

CAMERA_FOLLOW_MODE 
The camera follows along behind the object.
CAMERA_TRACK_MODE 
The camera stays in one position and tracks the object.

After creating a gameCamera object, one may call gameCamera::getMode() to get the current camera mode, gameCamera::setMode(mode) to set it or gameCamera::toggleMode() to cycle through the availabel modes.

 class Camera
 {
   Camera ( int pos = 0 ) ;
   int     getMode () ;
   void toggleMode () ;
   void setClipRanges( float near, float far ) ;
   void setHeight    ( float _height    ) ;
   void setRange     ( float _range     ) ;
   void setDirection ( float _direction ) ;
   void setTarget    ( sgCoord     *pos ) ;
   void setTarget    ( ssgTransform *_trackTarget ) ;
   const sgCoord *getPosition () { return & final ; }
   void update () ;
   void apply  () ;
 } ;

At the start of the run, you must call initCamera() and updateCamera() must be called every frame.

 void   initCamera () ;
 void updateCamera () ;
 Camera *getCamera ( int which = 0 ) ;
 void setNumScreenSplits ( int numSplits ) ;


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