2020-09-20 ODEのオブジェクトの作り方 OpenDynamicsEngine 物理シミュレーション オブジェクト用の構造体を作る struct MyObject { dBodyID body; }; static MyObject sphere; C++ main関数で詳しく設定 sphere.body = dBodyCreate (world); dReal radius = 5.0; dMassSetSphere (&m,DENSITY,radius); C++ drawstuffのシミュレーションループ関数内で描画 const dReal *pos, *radius; pos = dBodyGetPosition(sphere.body); radius = dBodyGetRotation(sphere.body); dsDrawSphere(pos1,R1,radius);