[Plib-cvs] plib/demos/simon/src Makefile,NONE,1.1 simon.cxx,NONE,1.1 simon.h,NONE,1.1
Brought to you by:
sjbaker
From: Steve B. <sj...@us...> - 2002-09-14 19:50:32
|
Update of /cvsroot/plib/plib/demos/simon/src In directory usw-pr-cvs1:/tmp/cvs-serv6726/plib/demos/simon/src Added Files: Makefile simon.cxx simon.h Log Message: Added SIMON - a *very* simple 3D programming framework. --- NEW FILE: Makefile --- SIMON = libsimon.a all: ${SIMON} simon.o : simon.cxx simon.h g++ -o simon.o -c simon.cxx libsimon.a : simon.o ar cru libsimon.a simon.o install: libsimon.a simon.h mkdir -p /usr/local/simon cp libsimon.a simon.h /usr/local/simon uninstall: rm -r /usr/local/simon clean: rm -f libsimon.a *.o --- NEW FILE: simon.cxx --- #include "simon.h" #include <plib/js.h> class siEntity ; static int siNextModel = 0 ; static bool siInitialised = false ; static ssgRoot *siScene = NULL ; static siEntity *siModels [ SI_MAX_MODELS ] ; class siEntity { protected: int handle ; char *name ; sgCoord pos ; sgCoord vel ; [...302 lines suppressed...] int siLoad ( char *filename ) { if ( ! siInitialised ) siInit () ; siModel *m = new siModel ( filename ) ; return m -> getHandle () ; } void siRun () { if ( ! siInitialised ) siInit () ; glutMainLoop () ; } --- NEW FILE: simon.h --- #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> #ifdef WIN32 #include <windows.h> #else #include <unistd.h> #endif #include <math.h> #include <plib/ssg.h> #include <GL/glut.h> #define SI_MAX_MODELS 500 void siUpdate () ; void siRun () ; int siLoad ( char *filename ) ; void siPosition ( int hh, float x, float y, float z = 0.0f, float h = 0.0f, float p = 0.0f, float r = 0.0f ) ; void siSpeedAndDirection ( int hh, float s, float h, float p = 0.0f ) ; void siVelocity ( int hh, float x, float y, float z = 0.0f, float h = 0.0f, float p = 0.0f, float r = 0.0f ) ; float siGetPositionX ( int h ) ; float siGetPositionY ( int h ) ; float siGetPositionZ ( int h ) ; float siGetPositionH ( int h ) ; float siGetPositionP ( int h ) ; float siGetPositionR ( int h ) ; float siJoystickLR () ; float siJoystickUD () ; bool siJoystickA () ; bool siJoystickB () ; bool siJoystickC () ; bool siJoystickD () ; bool siJoystickL () ; bool siJoystickR () ; |