add user interface to select Soft Body demo
This commit is contained in:
@@ -97,9 +97,26 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
btDemoEntry g_demoEntries[] =
|
btDemoEntry g_demoEntries[] =
|
||||||
{
|
{
|
||||||
{"SoftBodyDemo",SoftDemo::Create},
|
{"SoftBody Cloth",SoftDemo0::Create},
|
||||||
|
{"SoftBody Pressure",SoftDemo1::Create},
|
||||||
|
{"SoftBody Volume",SoftDemo2::Create},
|
||||||
|
{"SoftBody Ropes",SoftDemo3::Create},
|
||||||
|
{"SoftBody Ropes Attach",SoftDemo4::Create},
|
||||||
|
{"SoftBody Cloth Attach",SoftDemo5::Create},
|
||||||
|
{"SoftBody Sticks",SoftDemo6::Create},
|
||||||
|
{"SoftBody Collide",SoftDemo7::Create},
|
||||||
|
{"SoftBody Collide2",SoftDemo8::Create},
|
||||||
|
{"SoftBody Collide3",SoftDemo9::Create},
|
||||||
|
{"SoftBody Impact",SoftDemo10::Create},
|
||||||
|
{"SoftBody Aero",SoftDemo11::Create},
|
||||||
|
{"SoftBody Friction",SoftDemo12::Create},
|
||||||
|
{"SoftBody Torus",SoftDemo13::Create},
|
||||||
|
{"SoftBody Torus Match",SoftDemo14::Create},
|
||||||
|
{"SoftBody Bunny",SoftDemo15::Create},
|
||||||
|
{"SoftBody Bunny Match",SoftDemo16::Create},
|
||||||
{"DynamicControlDemo",MotorDemo::Create},
|
{"DynamicControlDemo",MotorDemo::Create},
|
||||||
{"RagdollDemo",RagdollDemo::Create},
|
{"RagdollDemo",RagdollDemo::Create},
|
||||||
{"BasicDemo", BasicDemo::Create},
|
{"BasicDemo", BasicDemo::Create},
|
||||||
|
|||||||
@@ -769,7 +769,7 @@ static void Init_TorusMatch(SoftDemo* pdemo)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned current_demo=14;
|
unsigned current_demo=14;
|
||||||
|
|
||||||
void SoftDemo::clientResetScene()
|
void SoftDemo::clientResetScene()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -116,6 +116,41 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define MACRO_SOFT_DEMO(a) class SoftDemo##a : public SoftDemo\
|
||||||
|
{\
|
||||||
|
public:\
|
||||||
|
static DemoApplication* Create()\
|
||||||
|
{\
|
||||||
|
SoftDemo* demo = new SoftDemo##a;\
|
||||||
|
extern unsigned int current_demo;\
|
||||||
|
current_demo=a;\
|
||||||
|
demo->myinit();\
|
||||||
|
demo->initPhysics();\
|
||||||
|
return demo;\
|
||||||
|
}\
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
MACRO_SOFT_DEMO(0) //Init_Cloth
|
||||||
|
MACRO_SOFT_DEMO(1) //Init_Pressure
|
||||||
|
MACRO_SOFT_DEMO(2)//Init_Volume
|
||||||
|
MACRO_SOFT_DEMO(3)//Init_Ropes
|
||||||
|
MACRO_SOFT_DEMO(4)//Init_Ropes_Attach
|
||||||
|
MACRO_SOFT_DEMO(5)//Init_ClothAttach
|
||||||
|
MACRO_SOFT_DEMO(6)//Init_Sticks
|
||||||
|
MACRO_SOFT_DEMO(7)//Init_Collide
|
||||||
|
MACRO_SOFT_DEMO(8)//Init_Collide2
|
||||||
|
MACRO_SOFT_DEMO(9)//Init_Collide3
|
||||||
|
MACRO_SOFT_DEMO(10)//Init_Impact
|
||||||
|
MACRO_SOFT_DEMO(11)//Init_Aero
|
||||||
|
MACRO_SOFT_DEMO(12)//Init_Friction
|
||||||
|
MACRO_SOFT_DEMO(13)//Init_Torus
|
||||||
|
MACRO_SOFT_DEMO(14)//Init_TorusMatch
|
||||||
|
MACRO_SOFT_DEMO(15)//Init_Bunny
|
||||||
|
MACRO_SOFT_DEMO(16)//Init_BunnyMatch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif //CCD_PHYSICS_DEMO_H
|
#endif //CCD_PHYSICS_DEMO_H
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user