GpuRigidBodyDemo.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef GPU_RIGID_BODY_DEMO_H
  2. #define GPU_RIGID_BODY_DEMO_H
  3. #include "Bullet3Common/b3Vector3.h"
  4. #include "../CommonOpenCL/CommonOpenCLBase.h"
  5. class GpuRigidBodyDemo : public CommonOpenCLBase
  6. {
  7. protected:
  8. class GLInstancingRenderer* m_instancingRenderer;
  9. class GLPrimitiveRenderer* m_primRenderer;
  10. class CommonWindowInterface* m_window;
  11. struct GpuRigidBodyDemoInternalData* m_data;
  12. public:
  13. GpuRigidBodyDemo(GUIHelperInterface* helper);
  14. virtual ~GpuRigidBodyDemo();
  15. virtual void initPhysics();
  16. virtual void setupScene();
  17. virtual void destroyScene(){};
  18. virtual void exitPhysics();
  19. virtual void renderScene();
  20. virtual void stepSimulation(float deltaTime);
  21. //for picking
  22. b3Vector3 getRayTo(int x,int y);
  23. virtual bool mouseMoveCallback(float x,float y);
  24. virtual bool mouseButtonCallback(int button, int state, float x, float y);
  25. virtual bool keyboardCallback(int key, int state);
  26. unsigned char* loadImage(const char* fileName, int& width, int& height, int& n);
  27. };
  28. #endif //GPU_RIGID_BODY_DEMO_H