Alex Lin b9c871328b Introduce Open Dynamics Engine examples
Added a 3 wheeled car example from the ODE demos.  I collapsed all of the separate classes
handling the world, objects, and drawings into a single class.  Each world is different
and just including that with the objects for these simple examples is easier.  Same goes
for the drawing.

refs #172
2016-02-02 11:19:25 -06:00

42 lines
833 B
C++

/*
PURPOSE:
(Bouncing ball)
LIBRARY DEPENDENCY:
((Ball.cpp))
*/
#ifndef ODEBALL_HH
#define ODEBALL_HH
#include <ode/common.h>
#include <ode/src/objects.h>
#include "ODE/DrawStuff/DrawStuffObject.hh"
class Ball : public DrawStuffObject {
public:
dWorldID world; // ** world
dSpaceID space; // ** space
dJointGroupID contactgroup; // ** contact
dBodyID body; // ** the ball body
dGeomID geom; // ** contact geometry
dMass m; // ** the mass of the ball
dReal * pos ;
Ball() ;
int init() ;
int step(double time_step) ;
int shutdown() ;
virtual int draw() ;
static void nearCallback(void *data, dGeomID o1, dGeomID o2) ;
} ;
#endif