trick/trick_sims/Cannon/SIM_cannon_numeric/S_define
2019-04-24 18:29:50 -05:00

37 lines
1.1 KiB
Plaintext

/************************TRICK HEADER*************************
PURPOSE:
(Cannon Numeric)
LIBRARY DEPENDENCIES:
(
(cannon/gravity/src/cannon_init.c)
(cannon/gravity/src/cannon_numeric.c)
)
*************************************************************/
#include "sim_objects/default_trick_sys.sm"
// Uncomment to get a webserver. Also uncomment lines in S_overrise.mk to link in mongoose lib.
// #include "mongoose_httpd/mongoose_httpd.sm"
##include "cannon/gravity/include/cannon_numeric.h"
class CannonSimObject : public Trick::SimObject {
public:
CANNON cannon ;
CannonSimObject() {
("default_data") cannon_default_data( &cannon ) ;
("initialization") cannon_init( &cannon ) ;
("derivative") cannon_deriv( &cannon ) ;
("integration") trick_ret = cannon_integ( &cannon ) ;
("dynamic_event") cannon_impact( &cannon) ;
}
} ;
CannonSimObject dyn ;
IntegLoop dyn_integloop (0.01) dyn;
void create_connections() {
dyn_integloop.getIntegrator(Runge_Kutta_4, 5);
}