Files
bullet3/Demos/GyroscopicDemo/main.cpp
erwin.coumans 54744b6ab9 added gyroscopic force option for btRigidBody, body->setFlags(BT_ENABLE_GYROPSCOPIC_FORCE);
Note that it can easily introduce instability at regular (60Hertz) simulation steps so it is generally best to not use the option.
If needed, use a very small internal step, such as 1000 Hertz (world->stepSimulation(dt,100,1./1000.f); or stepSimulation(1./1000.,0);
2012-09-14 21:39:48 +00:00

21 lines
500 B
C++

#include "GyroscopicDemo.h"
#include "GlutStuff.h"
#include "GLDebugDrawer.h"
#include "btBulletDynamicsCommon.h"
int main(int argc,char** argv)
{
GyroscopicDemo* constraintDemo = new GyroscopicDemo();
constraintDemo->initPhysics();
constraintDemo->setDebugMode(btIDebugDraw::DBG_DrawConstraints+btIDebugDraw::DBG_DrawConstraintLimits);
return glutmain(argc, argv,640,480,"Constraint Demo. http://www.continuousphysics.com/Bullet/phpBB2/",constraintDemo);
}