enable URDF loading throught the 'File/Open' menu

set a default camera targets for each demo. note that it is only reset when switching to a different demo, so you can restart at your chosen location.
no OpenCL pairbench drawing in OpenGL2 (there is no VBO available etc)
This commit is contained in:
erwincoumans
2015-05-01 11:42:14 -07:00
parent 3dd41b84a8
commit 218e9f9bf9
66 changed files with 562 additions and 217 deletions

View File

@@ -141,6 +141,15 @@ class ForkLiftDemo : public CommonExampleInterface
void initPhysics();
void exitPhysics();
virtual void resetCamera()
{
float dist = 8;
float pitch = -45;
float yaw = 32;
float targetPos[3]={-0.33,-0.72,4.5};
m_guiHelper->resetCamera(dist,pitch,yaw,targetPos[0],targetPos[1],targetPos[2]);
}
/*static DemoApplication* Create()
{
ForkLiftDemo* demo = new ForkLiftDemo();
@@ -1200,7 +1209,7 @@ btRigidBody* ForkLiftDemo::localCreateRigidBody(btScalar mass, const btTransform
return body;
}
CommonExampleInterface* ForkLiftCreateFunc(struct PhysicsInterface* pint, struct GUIHelperInterface* helper, int option)
CommonExampleInterface* ForkLiftCreateFunc(struct CommonExampleOptions& options)
{
return new ForkLiftDemo(helper);
return new ForkLiftDemo(options.m_guiHelper);
}

View File

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