Files
bullet3/Demos3/bullet2/BasicDemo/HingeDemo.h
erwin coumans dfa738c13a Properly propagate the applied impulse for the MLCP solvers, so it will be available for contact and non-contact constraints.
Use real-time clock in AllBullet2Demos, rather than hard-coded 1./60.
2014-02-24 13:24:49 -08:00

64 lines
1.3 KiB
C++

#ifndef HINGE_DEMO_H
#define HINGE_DEMO_H
#include "BasicDemo.h"
enum HINGE_CREATION_METHOD
{
FEATHERSTONE_HINGE=1,
DANTZIG_HINGE,
LEMKE_HINGE,
PGS_HINGE,
SI_HINGE,
INERTIA_HINGE
};
class HingeDemo : public BasicDemo
{
int m_hingeMethod;
public:
static BulletDemoInterface* FeatherstoneCreateFunc(SimpleOpenGL3App* app)
{
return new HingeDemo(app, FEATHERSTONE_HINGE);
}
static BulletDemoInterface* DantzigCreateFunc(SimpleOpenGL3App* app)
{
return new HingeDemo(app, DANTZIG_HINGE);
}
static BulletDemoInterface* LemkeCreateFunc(SimpleOpenGL3App* app)
{
return new HingeDemo(app, LEMKE_HINGE);
}
static BulletDemoInterface* PGSCreateFunc(SimpleOpenGL3App* app)
{
return new HingeDemo(app, PGS_HINGE);
}
static BulletDemoInterface* SICreateFunc(SimpleOpenGL3App* app)
{
return new HingeDemo(app, SI_HINGE);
}
static BulletDemoInterface* InertiaCreateFunc(SimpleOpenGL3App* app)
{
return new HingeDemo(app, INERTIA_HINGE);
}
HingeDemo(SimpleOpenGL3App* app, HINGE_CREATION_METHOD hingeMethod);
class btMultiBody* createFeatherstoneHinge(class btMultiBodyDynamicsWorld* world, const struct btMultiBodySettings2& settings);
virtual void initPhysics();
virtual void exitPhysics();
virtual void renderScene();
};
#endif //HINGE_DEMO_H