mirror of
https://github.com/nasa/trick.git
synced 2025-02-07 11:20:24 +00:00
Took the ODE bouncing ball tutorial sim and interfaced it within Trick. Created classes to handle interfacing with ODE and the DrawStuff graphics that comes with ODE. Created classes to contain the ball and the drawstuff graphics for the ball. refs #172
19 lines
395 B
C++
19 lines
395 B
C++
|
|
#include <ode/collision.h>
|
|
#include <drawstuff/drawstuff.h>
|
|
#include "BallDrawStuffObject.hh"
|
|
|
|
BallDrawStuffObject::BallDrawStuffObject() {}
|
|
|
|
int BallDrawStuffObject::init(dGeomID in_geom) {
|
|
geom = in_geom ;
|
|
add_object() ;
|
|
return 0 ;
|
|
}
|
|
|
|
int BallDrawStuffObject::draw() {
|
|
dsDrawSphere (dGeomGetPosition(geom),dGeomGetRotation(geom),dGeomSphereGetRadius(geom));
|
|
return 0 ;
|
|
}
|
|
|