rename ExampleInterface -> CommonExampleInterface to be a little bit more consistent in 'CommonInterfaces' naming

This commit is contained in:
erwin coumans
2015-04-29 13:33:26 -07:00
parent 4ed666a72a
commit 40375983d6
56 changed files with 87 additions and 85 deletions

View File

@@ -128,7 +128,7 @@ void BasicExample::renderScene()
ExampleInterface* BasicExampleCreateFunc(PhysicsInterface* pint, GUIHelperInterface* helper, int option) CommonExampleInterface* BasicExampleCreateFunc(PhysicsInterface* pint, GUIHelperInterface* helper, int option)
{ {
return new BasicExample(helper); return new BasicExample(helper);
} }

View File

@@ -16,7 +16,7 @@ subject to the following restrictions:
#ifndef BASIC_EXAMPLE_H #ifndef BASIC_EXAMPLE_H
#define BASIC_EXAMPLE_H #define BASIC_EXAMPLE_H
class ExampleInterface* BasicExampleCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* BasicExampleCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //BASIC_DEMO_PHYSICS_SETUP_H #endif //BASIC_DEMO_PHYSICS_SETUP_H

View File

@@ -16,7 +16,7 @@ subject to the following restrictions:
#include "BasicExample.h" #include "BasicExample.h"
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
#include "../CommonInterfaces/CommonGUIHelperInterface.h" #include "../CommonInterfaces/CommonGUIHelperInterface.h"
@@ -30,7 +30,7 @@ int main(int argc, char* argv[])
int option = 0; int option = 0;
ExampleInterface* example = BasicExampleCreateFunc(pint, &noGfx, option); CommonExampleInterface* example = BasicExampleCreateFunc(pint, &noGfx, option);
example->initPhysics(); example->initPhysics();
example->stepSimulation(1.f/60.f); example->stepSimulation(1.f/60.f);

View File

@@ -1234,7 +1234,7 @@ void BenchmarkDemo::exitPhysics()
struct ExampleInterface* BenchmarkCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) struct CommonExampleInterface* BenchmarkCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new BenchmarkDemo(helper,option); return new BenchmarkDemo(helper,option);
} }

View File

@@ -15,7 +15,7 @@ subject to the following restrictions:
#ifndef BENCHMARK_EXAMPLE_H #ifndef BENCHMARK_EXAMPLE_H
#define BENCHMARK_EXAMPLE_H #define BENCHMARK_EXAMPLE_H
class ExampleInterface* BenchmarkCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* BenchmarkCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);

View File

@@ -1,14 +1,16 @@
#ifndef EXAMPLE_INTERFACE_H
#define EXAMPLE_INTERFACE_H
class ExampleInterface #ifndef COMMON_EXAMPLE_INTERFACE_H
#define COMMON_EXAMPLE_INTERFACE_H
class CommonExampleInterface
{ {
public: public:
typedef class ExampleInterface* (CreateFunc)(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); typedef class CommonExampleInterface* (CreateFunc)(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
virtual ~ExampleInterface() virtual ~CommonExampleInterface()
{ {
} }
@@ -25,4 +27,4 @@ public:
#endif //EXAMPLE_INTERFACE_H #endif //COMMON_EXAMPLE_INTERFACE_H

View File

@@ -11,14 +11,14 @@
#include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h" #include "BulletDynamics/Featherstone/btMultiBodyLinkCollider.h"
#include "btBulletDynamicsCommon.h" #include "btBulletDynamicsCommon.h"
#include "ExampleInterface.h" #include "CommonExampleInterface.h"
#include "CommonGUIHelperInterface.h" #include "CommonGUIHelperInterface.h"
#include "CommonRenderInterface.h" #include "CommonRenderInterface.h"
#include "CommonGraphicsAppInterface.h" #include "CommonGraphicsAppInterface.h"
#include "CommonWindowInterface.h" #include "CommonWindowInterface.h"
#include "CommonCameraInterface.h" #include "CommonCameraInterface.h"
struct CommonMultiBodyBase : public ExampleInterface struct CommonMultiBodyBase : public CommonExampleInterface
{ {
//keep the collision shapes, for deletion/cleanup //keep the collision shapes, for deletion/cleanup
btAlignedObjectArray<btCollisionShape*> m_collisionShapes; btAlignedObjectArray<btCollisionShape*> m_collisionShapes;

View File

@@ -4,7 +4,7 @@
#include "btBulletDynamicsCommon.h" #include "btBulletDynamicsCommon.h"
#include "ExampleInterface.h" #include "CommonExampleInterface.h"
#include "CommonGUIHelperInterface.h" #include "CommonGUIHelperInterface.h"
#include "CommonRenderInterface.h" #include "CommonRenderInterface.h"
#include "CommonCameraInterface.h" #include "CommonCameraInterface.h"
@@ -12,7 +12,7 @@
#include "CommonGraphicsAppInterface.h" #include "CommonGraphicsAppInterface.h"
#include "CommonWindowInterface.h" #include "CommonWindowInterface.h"
struct CommonRigidBodyBase : public ExampleInterface struct CommonRigidBodyBase : public CommonExampleInterface
{ {
//keep the collision shapes, for deletion/cleanup //keep the collision shapes, for deletion/cleanup
btAlignedObjectArray<btCollisionShape*> m_collisionShapes; btAlignedObjectArray<btCollisionShape*> m_collisionShapes;

View File

@@ -870,7 +870,7 @@ void AllConstraintDemo::keyboardCallback(unsigned char key, int x, int y)
} }
} }
class ExampleInterface* AllConstraintCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* AllConstraintCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new AllConstraintDemo(helper); return new AllConstraintDemo(helper);
} }

View File

@@ -15,7 +15,7 @@ subject to the following restrictions:
#ifndef ALL_CONSTRAINT_DEMO_H #ifndef ALL_CONSTRAINT_DEMO_H
#define ALL_CONSTRAINT_DEMO_H #define ALL_CONSTRAINT_DEMO_H
class ExampleInterface* AllConstraintCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* AllConstraintCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //ALL_CONSTRAINT_DEMO_H #endif //ALL_CONSTRAINT_DEMO_H

View File

@@ -144,7 +144,7 @@ void ConstraintPhysicsSetup::initPhysics()
m_guiHelper->autogenerateGraphicsObjects(m_dynamicsWorld); m_guiHelper->autogenerateGraphicsObjects(m_dynamicsWorld);
} }
class ExampleInterface* ConstraintCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* ConstraintCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new ConstraintPhysicsSetup(helper); return new ConstraintPhysicsSetup(helper);
} }

View File

@@ -1,6 +1,6 @@
#ifndef CONSTAINT_PHYSICS_SETUP_H #ifndef CONSTAINT_PHYSICS_SETUP_H
#define CONSTAINT_PHYSICS_SETUP_H #define CONSTAINT_PHYSICS_SETUP_H
class ExampleInterface* ConstraintCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* ConstraintCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //CONSTAINT_PHYSICS_SETUP_H #endif //CONSTAINT_PHYSICS_SETUP_H

View File

@@ -473,7 +473,7 @@ void Dof6Spring2Setup::stepSimulation(float deltaTime)
m_dynamicsWorld->stepSimulation(deltaTime); m_dynamicsWorld->stepSimulation(deltaTime);
} }
class ExampleInterface* Dof6Spring2CreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* Dof6Spring2CreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new Dof6Spring2Setup(helper); return new Dof6Spring2Setup(helper);
} }

View File

@@ -1,6 +1,6 @@
#ifndef GENERIC_6DOF_SPRING2_CONSTRAINT_DEMO_H #ifndef GENERIC_6DOF_SPRING2_CONSTRAINT_DEMO_H
#define GENERIC_6DOF_SPRING2_CONSTRAINT_DEMO_H #define GENERIC_6DOF_SPRING2_CONSTRAINT_DEMO_H
class ExampleInterface* Dof6Spring2CreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* Dof6Spring2CreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //GENERIC_6DOF_SPRING2_CONSTRAINT_DEMO_H #endif //GENERIC_6DOF_SPRING2_CONSTRAINT_DEMO_H

View File

@@ -10,7 +10,7 @@ public:
EmptyExample m_emptyExample; EmptyExample m_emptyExample;
virtual ExampleInterface* getCurrentExample() virtual CommonExampleInterface* getCurrentExample()
{ {
return &m_emptyExample; return &m_emptyExample;
} }

View File

@@ -1,16 +1,16 @@
#ifndef EMPTY_EXAMPLE_H #ifndef EMPTY_EXAMPLE_H
#define EMPTY_EXAMPLE_H #define EMPTY_EXAMPLE_H
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
class EmptyExample : public ExampleInterface class EmptyExample : public CommonExampleInterface
{ {
public: public:
EmptyExample() {} EmptyExample() {}
virtual ~EmptyExample(){} virtual ~EmptyExample(){}
static ExampleInterface* CreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) static CommonExampleInterface* CreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new EmptyExample; return new EmptyExample;
} }

View File

@@ -1,7 +1,7 @@
#ifndef EXAMPLE_BROWSER_GUI_H #ifndef EXAMPLE_BROWSER_GUI_H
#define EXAMPLE_BROWSER_GUI_H #define EXAMPLE_BROWSER_GUI_H
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
class ExampleBrowserInterface class ExampleBrowserInterface
{ {
@@ -9,7 +9,7 @@ class ExampleBrowserInterface
virtual ~ExampleBrowserInterface() {} virtual ~ExampleBrowserInterface() {}
virtual ExampleInterface* getCurrentExample() = 0; virtual CommonExampleInterface* getCurrentExample() = 0;
virtual bool init(int argc, char* argv[])=0; virtual bool init(int argc, char* argv[])=0;

View File

@@ -32,7 +32,7 @@ struct ExampleEntry
int m_menuLevel; int m_menuLevel;
const char* m_name; const char* m_name;
const char* m_description; const char* m_description;
ExampleInterface::CreateFunc* m_createFunc; CommonExampleInterface::CreateFunc* m_createFunc;
int m_option; int m_option;
ExampleEntry(int menuLevel, const char* name) ExampleEntry(int menuLevel, const char* name)
@@ -40,7 +40,7 @@ struct ExampleEntry
{ {
} }
ExampleEntry(int menuLevel, const char* name,const char* description, ExampleInterface::CreateFunc* createFunc, int option=0) ExampleEntry(int menuLevel, const char* name,const char* description, CommonExampleInterface::CreateFunc* createFunc, int option=0)
:m_menuLevel(menuLevel), m_name(name), m_description(description), m_createFunc(createFunc), m_option(option) :m_menuLevel(menuLevel), m_name(name), m_description(description), m_createFunc(createFunc), m_option(option)
{ {
} }
@@ -207,7 +207,7 @@ void ExampleEntries::initExampleEntries()
} }
void ExampleEntries::registerExampleEntry(int menuLevel, const char* name,const char* description, ExampleInterface::CreateFunc* createFunc, int option) void ExampleEntries::registerExampleEntry(int menuLevel, const char* name,const char* description, CommonExampleInterface::CreateFunc* createFunc, int option)
{ {
ExampleEntry e( menuLevel,name,description, createFunc, option); ExampleEntry e( menuLevel,name,description, createFunc, option);
gAdditionalRegisteredExamples.push_back(e); gAdditionalRegisteredExamples.push_back(e);
@@ -218,7 +218,7 @@ int ExampleEntries::getNumRegisteredExamples()
return m_data->m_allExamples.size(); return m_data->m_allExamples.size();
} }
ExampleInterface::CreateFunc* ExampleEntries::getExampleCreateFunc(int index) CommonExampleInterface::CreateFunc* ExampleEntries::getExampleCreateFunc(int index)
{ {
return m_data->m_allExamples[index].m_createFunc; return m_data->m_allExamples[index].m_createFunc;
} }

View File

@@ -2,7 +2,7 @@
#ifndef EXAMPLE_ENTRIES_H #ifndef EXAMPLE_ENTRIES_H
#define EXAMPLE_ENTRIES_H #define EXAMPLE_ENTRIES_H
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
@@ -17,13 +17,13 @@ public:
ExampleEntries(); ExampleEntries();
virtual ~ExampleEntries(); virtual ~ExampleEntries();
static void registerExampleEntry(int menuLevel, const char* name,const char* description, ExampleInterface::CreateFunc* createFunc, int option=0); static void registerExampleEntry(int menuLevel, const char* name,const char* description, CommonExampleInterface::CreateFunc* createFunc, int option=0);
void initExampleEntries(); void initExampleEntries();
int getNumRegisteredExamples(); int getNumRegisteredExamples();
ExampleInterface::CreateFunc* getExampleCreateFunc(int index); CommonExampleInterface::CreateFunc* getExampleCreateFunc(int index);
const char* getExampleName(int index); const char* getExampleName(int index);

View File

@@ -27,7 +27,7 @@
#include "GwenGUISupport/GwenTextureWindow.h" #include "GwenGUISupport/GwenTextureWindow.h"
#include "GwenGUISupport/GraphingTexture.h" #include "GwenGUISupport/GraphingTexture.h"
#include "../CommonInterfaces/Common2dCanvasInterface.h" #include "../CommonInterfaces/Common2dCanvasInterface.h"
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
#include "Bullet3Common/b3CommandLineArgs.h" #include "Bullet3Common/b3CommandLineArgs.h"
#include "../OpenGLWindow/SimpleCamera.h" #include "../OpenGLWindow/SimpleCamera.h"
#include "../OpenGLWindow/SimpleOpenGL2Renderer.h" #include "../OpenGLWindow/SimpleOpenGL2Renderer.h"
@@ -48,7 +48,7 @@ const char* startFileName = "bulletDemo.txt";
static GwenUserInterface* gui = 0; static GwenUserInterface* gui = 0;
static int sCurrentDemoIndex = 0; static int sCurrentDemoIndex = 0;
static int sCurrentHightlighted = 0; static int sCurrentHightlighted = 0;
static ExampleInterface* sCurrentDemo = 0; static CommonExampleInterface* sCurrentDemo = 0;
static b3AlignedObjectArray<const char*> allNames; static b3AlignedObjectArray<const char*> allNames;
static class ExampleEntries* gAllExamples=0; static class ExampleEntries* gAllExamples=0;
@@ -233,7 +233,7 @@ void selectDemo(int demoIndex)
delete s_guiHelper; delete s_guiHelper;
s_guiHelper = 0; s_guiHelper = 0;
} }
ExampleInterface::CreateFunc* func = gAllExamples->getExampleCreateFunc(demoIndex); CommonExampleInterface::CreateFunc* func = gAllExamples->getExampleCreateFunc(demoIndex);
if (func) if (func)
{ {
s_parameterInterface->removeAllParameters(); s_parameterInterface->removeAllParameters();
@@ -696,7 +696,7 @@ bool OpenGLExampleBrowser::init(int argc, char* argv[])
ExampleInterface* OpenGLExampleBrowser::getCurrentExample() CommonExampleInterface* OpenGLExampleBrowser::getCurrentExample()
{ {
btAssert(sCurrentDemo); btAssert(sCurrentDemo);
return sCurrentDemo; return sCurrentDemo;

View File

@@ -10,7 +10,7 @@ public:
OpenGLExampleBrowser(class ExampleEntries* examples); OpenGLExampleBrowser(class ExampleEntries* examples);
virtual ~OpenGLExampleBrowser(); virtual ~OpenGLExampleBrowser();
virtual ExampleInterface* getCurrentExample(); virtual CommonExampleInterface* getCurrentExample();
virtual bool init(int argc, char* argv[]); virtual bool init(int argc, char* argv[]);

View File

@@ -34,7 +34,7 @@ class btCollisionShape;
#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h" #include "BulletDynamics/ConstraintSolver/btHingeConstraint.h"
#include "BulletDynamics/ConstraintSolver/btSliderConstraint.h" #include "BulletDynamics/ConstraintSolver/btSliderConstraint.h"
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#include "btBulletCollisionCommon.h" #include "btBulletCollisionCommon.h"
#include "../CommonInterfaces/CommonGUIHelperInterface.h" #include "../CommonInterfaces/CommonGUIHelperInterface.h"
@@ -43,7 +43,7 @@ class btCollisionShape;
#include "../CommonInterfaces/CommonGraphicsAppInterface.h" #include "../CommonInterfaces/CommonGraphicsAppInterface.h"
///VehicleDemo shows how to setup and use the built-in raycast vehicle ///VehicleDemo shows how to setup and use the built-in raycast vehicle
class ForkLiftDemo : public ExampleInterface class ForkLiftDemo : public CommonExampleInterface
{ {
public: public:
@@ -1303,7 +1303,7 @@ btRigidBody* ForkLiftDemo::localCreateRigidBody(btScalar mass, const btTransform
return body; return body;
} }
ExampleInterface* ForkLiftCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) CommonExampleInterface* ForkLiftCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new ForkLiftDemo(helper); return new ForkLiftDemo(helper);
} }

View File

@@ -15,7 +15,7 @@ subject to the following restrictions:
#ifndef FORKLIFT_DEMO_H #ifndef FORKLIFT_DEMO_H
#define FORKLIFT_DEMO_H #define FORKLIFT_DEMO_H
class ExampleInterface* ForkLiftCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* ForkLiftCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif // FORKLIFT_DEMO_H #endif // FORKLIFT_DEMO_H

View File

@@ -123,7 +123,7 @@ void GyroscopicSetup::physicsDebugDraw(int debugFlags)
} }
class ExampleInterface* GyroscopicCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* GyroscopicCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new GyroscopicSetup(helper); return new GyroscopicSetup(helper);
} }

View File

@@ -2,6 +2,6 @@
#ifndef GYROSCOPIC_SETUP_H #ifndef GYROSCOPIC_SETUP_H
#define GYROSCOPIC_SETUP_H #define GYROSCOPIC_SETUP_H
class ExampleInterface* GyroscopicCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* GyroscopicCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //GYROSCOPIC_SETUP_H #endif //GYROSCOPIC_SETUP_H

View File

@@ -276,7 +276,7 @@ char* makeExeToBspFilename(const char* lpCmdLine)
} }
struct ExampleInterface* ImportBspCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) struct CommonExampleInterface* ImportBspCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
BspDemo* demo = new BspDemo(helper); BspDemo* demo = new BspDemo(helper);

View File

@@ -15,7 +15,7 @@ subject to the following restrictions:
#ifndef BSP_DEMO_H #ifndef BSP_DEMO_H
#define BSP_DEMO_H #define BSP_DEMO_H
class ExampleInterface* ImportBspCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* ImportBspCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //BSP_DEMO_H #endif //BSP_DEMO_H

View File

@@ -197,7 +197,7 @@ void ImportColladaSetup::initPhysics()
} }
class ExampleInterface* ImportColladaCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* ImportColladaCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new ImportColladaSetup(helper); return new ImportColladaSetup(helper);
} }

View File

@@ -19,7 +19,7 @@ subject to the following restrictions:
#ifndef IMPORT_COLLADA_SETUP_H #ifndef IMPORT_COLLADA_SETUP_H
#define IMPORT_COLLADA_SETUP_H #define IMPORT_COLLADA_SETUP_H
class ExampleInterface* ImportColladaCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* ImportColladaCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //IMPORT_COLLADA_SETUP_H #endif //IMPORT_COLLADA_SETUP_H

View File

@@ -99,7 +99,7 @@ void ImportObjSetup::initPhysics()
} }
} }
ExampleInterface* ImportObjCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) CommonExampleInterface* ImportObjCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new ImportObjSetup(helper); return new ImportObjSetup(helper);
} }

View File

@@ -1,7 +1,7 @@
#ifndef IMPORT_OBJ_EXAMPLE_H #ifndef IMPORT_OBJ_EXAMPLE_H
#define IMPORT_OBJ_EXAMPLE_H #define IMPORT_OBJ_EXAMPLE_H
class ExampleInterface* ImportObjCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* ImportObjCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //IMPORT_OBJ_EXAMPLE_H #endif //IMPORT_OBJ_EXAMPLE_H

View File

@@ -92,7 +92,7 @@ void ImportSTLSetup::initPhysics()
} }
} }
class ExampleInterface* ImportSTLCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* ImportSTLCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new ImportSTLSetup(helper); return new ImportSTLSetup(helper);
} }

View File

@@ -1,6 +1,6 @@
#ifndef IMPORT_STL_SETUP_H #ifndef IMPORT_STL_SETUP_H
#define IMPORT_STL_SETUP_H #define IMPORT_STL_SETUP_H
class ExampleInterface* ImportSTLCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* ImportSTLCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //IMPORT_OBJ_SETUP_H #endif //IMPORT_OBJ_SETUP_H

View File

@@ -270,7 +270,7 @@ void ImportUrdfSetup::stepSimulation(float deltaTime)
} }
} }
class ExampleInterface* ImportURDFCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* ImportURDFCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new ImportUrdfSetup(helper, option); return new ImportUrdfSetup(helper, option);

View File

@@ -2,6 +2,6 @@
#define IMPORT_URDF_SETUP_H #define IMPORT_URDF_SETUP_H
class ExampleInterface* ImportURDFCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* ImportURDFCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //IMPORT_URDF_SETUP_H #endif //IMPORT_URDF_SETUP_H

View File

@@ -142,7 +142,7 @@ void MultiBodyCustomURDFDemo::stepSimulation(float deltaTime)
} }
class ExampleInterface* MultiBodyCustomURDFDemoCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* MultiBodyCustomURDFDemoCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new MultiBodyCustomURDFDemo(helper); return new MultiBodyCustomURDFDemo(helper);
} }

View File

@@ -15,6 +15,6 @@ subject to the following restrictions:
#ifndef MULTI_DOF_CUSTOM_URDF_DEMO_H #ifndef MULTI_DOF_CUSTOM_URDF_DEMO_H
#define MULTI_DOF_CUSTOM_URDF_DEMO_H #define MULTI_DOF_CUSTOM_URDF_DEMO_H
class ExampleInterface* MultiBodyCustomURDFDemoCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* MultiBodyCustomURDFDemoCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //MULTI_DOF_CUSTOM_URDF_DEMO_H #endif //MULTI_DOF_CUSTOM_URDF_DEMO_H

View File

@@ -418,7 +418,7 @@ void MultiDofDemo::addBoxes_testMultiDof()
} }
} }
class ExampleInterface* MultiDofCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* MultiDofCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new MultiDofDemo(helper); return new MultiDofDemo(helper);
} }

View File

@@ -2,7 +2,7 @@
#ifndef MULTI_DOF_DEMO_H #ifndef MULTI_DOF_DEMO_H
#define MULTI_DOF_DEMO_H #define MULTI_DOF_DEMO_H
class ExampleInterface* MultiDofCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* MultiDofCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //MULTI_DOF_DEMO_H #endif //MULTI_DOF_DEMO_H

View File

@@ -269,7 +269,7 @@ void TestJointTorqueSetup::stepSimulation(float deltaTime)
} }
class ExampleInterface* TestJointTorqueCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* TestJointTorqueCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new TestJointTorqueSetup(helper); return new TestJointTorqueSetup(helper);
} }

View File

@@ -1,7 +1,7 @@
#ifndef TEST_JOINT_TORQUE_SETUP_H #ifndef TEST_JOINT_TORQUE_SETUP_H
#define TEST_JOINT_TORQUE_SETUP_H #define TEST_JOINT_TORQUE_SETUP_H
class ExampleInterface* TestJointTorqueCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* TestJointTorqueCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //TEST_JOINT_TORQUE_SETUP_H #endif //TEST_JOINT_TORQUE_SETUP_H

View File

@@ -16,7 +16,7 @@ subject to the following restrictions:
#include "MultiBodyCustomURDFDemo.h" #include "MultiBodyCustomURDFDemo.h"
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
#include "../CommonInterfaces/CommonGUIHelperInterface.h" #include "../CommonInterfaces/CommonGUIHelperInterface.h"
@@ -30,7 +30,7 @@ int main(int argc, char* argv[])
int option = 0; int option = 0;
ExampleInterface* example = MultiBodyCustomURDFDemoCreateFunc(pint, &noGfx, option); CommonExampleInterface* example = MultiBodyCustomURDFDemoCreateFunc(pint, &noGfx, option);
example->initPhysics(); example->initPhysics();
example->stepSimulation(1.f/60.f); example->stepSimulation(1.f/60.f);

View File

@@ -325,7 +325,7 @@ void Planar2D::exitPhysics()
m_box2dbox2dAlgo = 0; m_box2dbox2dAlgo = 0;
} }
ExampleInterface* Planar2DCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) CommonExampleInterface* Planar2DCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new Planar2D(helper); return new Planar2D(helper);
} }

View File

@@ -15,7 +15,7 @@ subject to the following restrictions:
#ifndef PLANAR2D_H #ifndef PLANAR2D_H
#define PLANAR2D_H #define PLANAR2D_H
class ExampleInterface* Planar2DCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* Planar2DCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //BOX2D_DEMO_H #endif //BOX2D_DEMO_H

View File

@@ -3,11 +3,11 @@
#include "../CommonInterfaces/CommonGraphicsAppInterface.h" #include "../CommonInterfaces/CommonGraphicsAppInterface.h"
#include "../CommonInterfaces/CommonRenderInterface.h" #include "../CommonInterfaces/CommonRenderInterface.h"
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
#include "LinearMath/btTransform.h" #include "LinearMath/btTransform.h"
#include "../CommonInterfaces/CommonGUIHelperInterface.h" #include "../CommonInterfaces/CommonGUIHelperInterface.h"
///quick demo showing the right-handed coordinate system and positive rotations around each axis ///quick demo showing the right-handed coordinate system and positive rotations around each axis
class CoordinateSystemDemo : public ExampleInterface class CoordinateSystemDemo : public CommonExampleInterface
{ {
CommonGraphicsApp* m_app; CommonGraphicsApp* m_app;
float m_x; float m_x;
@@ -141,7 +141,7 @@ public:
}; };
struct ExampleInterface* CoordinateSystemCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) struct CommonExampleInterface* CoordinateSystemCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new CoordinateSystemDemo(helper->getAppInterface()); return new CoordinateSystemDemo(helper->getAppInterface());
} }

View File

@@ -1,7 +1,7 @@
#ifndef COORDINATE_SYSTEM_DEMO_H #ifndef COORDINATE_SYSTEM_DEMO_H
#define COORDINATE_SYSTEM_DEMO_H #define COORDINATE_SYSTEM_DEMO_H
class ExampleInterface* CoordinateSystemCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* CoordinateSystemCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //COORDINATE_SYSTEM_DEMO_H #endif //COORDINATE_SYSTEM_DEMO_H

View File

@@ -12,12 +12,12 @@
#include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h" #include "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.h"
//#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h" //#include "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.h"
//#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h" //#include "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.h"
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#include "btBulletCollisionCommon.h" #include "btBulletCollisionCommon.h"
#include "../CommonInterfaces/CommonGUIHelperInterface.h" #include "../CommonInterfaces/CommonGUIHelperInterface.h"
struct RaytracerPhysicsSetup : public ExampleInterface struct RaytracerPhysicsSetup : public CommonExampleInterface
{ {
struct CommonGraphicsApp* m_app; struct CommonGraphicsApp* m_app;
@@ -378,7 +378,7 @@ void RaytracerPhysicsSetup::syncPhysicsToGraphics(GraphicsPhysicsBridge& gfxBrid
{ {
} }
ExampleInterface* RayTracerCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) CommonExampleInterface* RayTracerCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new RaytracerPhysicsSetup(helper->getAppInterface()); return new RaytracerPhysicsSetup(helper->getAppInterface());
} }

View File

@@ -1,6 +1,6 @@
#ifndef RAYTRACER_SETUP_H #ifndef RAYTRACER_SETUP_H
#define RAYTRACER_SETUP_H #define RAYTRACER_SETUP_H
class ExampleInterface* RayTracerCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* RayTracerCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //RAYTRACER_SETUP_H #endif //RAYTRACER_SETUP_H

View File

@@ -6,11 +6,11 @@
#include "Bullet3Common/b3Quaternion.h" #include "Bullet3Common/b3Quaternion.h"
#include "Bullet3Common/b3AlignedObjectArray.h" #include "Bullet3Common/b3AlignedObjectArray.h"
#include "../CommonInterfaces/CommonRenderInterface.h" #include "../CommonInterfaces/CommonRenderInterface.h"
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
#include "../CommonInterfaces/CommonGUIHelperInterface.h" #include "../CommonInterfaces/CommonGUIHelperInterface.h"
///quick demo showing the right-handed coordinate system and positive rotations around each axis ///quick demo showing the right-handed coordinate system and positive rotations around each axis
class RenderInstancingDemo : public ExampleInterface class RenderInstancingDemo : public CommonExampleInterface
{ {
CommonGraphicsApp* m_app; CommonGraphicsApp* m_app;
float m_x; float m_x;
@@ -128,7 +128,7 @@ public:
}; };
class ExampleInterface* RenderInstancingCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* RenderInstancingCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new RenderInstancingDemo(helper->getAppInterface()); return new RenderInstancingDemo(helper->getAppInterface());
} }

View File

@@ -1,6 +1,6 @@
#ifndef RENDER_INSTANCING_DEMO_H #ifndef RENDER_INSTANCING_DEMO_H
#define RENDER_INSTANCING_DEMO_H #define RENDER_INSTANCING_DEMO_H
class ExampleInterface* RenderInstancingCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* RenderInstancingCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //RENDER_INSTANCING_DEMO_H #endif //RENDER_INSTANCING_DEMO_H

View File

@@ -2322,7 +2322,7 @@ void SoftDemo::exitPhysics()
} }
class ExampleInterface* SoftDemoCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) class CommonExampleInterface* SoftDemoCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
current_demo = option; current_demo = option;
return new SoftDemo(helper); return new SoftDemo(helper);

View File

@@ -19,7 +19,7 @@ subject to the following restrictions:
#ifndef SOFT_DEMO_H #ifndef SOFT_DEMO_H
#define SOFT_DEMO_H #define SOFT_DEMO_H
class ExampleInterface* SoftDemoCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* SoftDemoCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //CCD_PHYSICS_DEMO_H #endif //CCD_PHYSICS_DEMO_H

View File

@@ -34,7 +34,7 @@ class btCollisionShape;
#include "BulletDynamics/ConstraintSolver/btHingeConstraint.h" #include "BulletDynamics/ConstraintSolver/btHingeConstraint.h"
#include "BulletDynamics/ConstraintSolver/btSliderConstraint.h" #include "BulletDynamics/ConstraintSolver/btSliderConstraint.h"
#include "../CommonInterfaces/ExampleInterface.h" #include "../CommonInterfaces/CommonExampleInterface.h"
#include "LinearMath/btAlignedObjectArray.h" #include "LinearMath/btAlignedObjectArray.h"
#include "btBulletCollisionCommon.h" #include "btBulletCollisionCommon.h"
#include "../CommonInterfaces/CommonGUIHelperInterface.h" #include "../CommonInterfaces/CommonGUIHelperInterface.h"
@@ -1317,7 +1317,7 @@ btRigidBody* Hinge2Vehicle::localCreateRigidBody(btScalar mass, const btTransfor
return body; return body;
} }
ExampleInterface* Hinge2VehicleCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option) CommonExampleInterface* Hinge2VehicleCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
{ {
return new Hinge2Vehicle(helper); return new Hinge2Vehicle(helper);
} }

View File

@@ -16,7 +16,7 @@ subject to the following restrictions:
#ifndef HINGE2_VEHICLE_H #ifndef HINGE2_VEHICLE_H
#define HINGE2_VEHICLE_H #define HINGE2_VEHICLE_H
class ExampleInterface* Hinge2VehicleCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* Hinge2VehicleCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif // HINGE2_VEHICLE_H #endif // HINGE2_VEHICLE_H

View File

@@ -813,7 +813,7 @@ static DemoApplication* Create()
*/ */
ExampleInterface* VoronoiFractureCreateFunc(PhysicsInterface* pint, GUIHelperInterface* helper, int option) CommonExampleInterface* VoronoiFractureCreateFunc(PhysicsInterface* pint, GUIHelperInterface* helper, int option)
{ {
return new VoronoiFractureDemo(helper); return new VoronoiFractureDemo(helper);
} }

View File

@@ -15,7 +15,7 @@ subject to the following restrictions:
#ifndef VORONOI_FRACTURE_DEMO_H #ifndef VORONOI_FRACTURE_DEMO_H
#define VORONOI_FRACTURE_DEMO_H #define VORONOI_FRACTURE_DEMO_H
class ExampleInterface* VoronoiFractureCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option); class CommonExampleInterface* VoronoiFractureCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option);
#endif //VORONOI_FRACTURE_DEMO_H #endif //VORONOI_FRACTURE_DEMO_H