mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-16 14:40:05 +00:00
72 lines
1.2 KiB
C++
72 lines
1.2 KiB
C++
#ifndef GPU_SOFT_BODY_DEMO_H
|
|
#define GPU_SOFT_BODY_DEMO_H
|
|
|
|
#include "../GpuDemo.h"
|
|
|
|
class GpuSoftBodyDemo : public GpuDemo
|
|
{
|
|
protected:
|
|
class GLInstancingRenderer* m_instancingRenderer;
|
|
class b3gWindowInterface* m_window;
|
|
|
|
struct GpuSoftBodyDemoInternalData* m_data;
|
|
|
|
public:
|
|
|
|
GpuSoftBodyDemo();
|
|
virtual ~GpuSoftBodyDemo();
|
|
|
|
virtual void initPhysics(const ConstructionInfo& ci);
|
|
|
|
virtual void setupScene(const ConstructionInfo& ci);
|
|
|
|
virtual void destroyScene(){};
|
|
|
|
virtual void exitPhysics();
|
|
|
|
virtual const char* getName()
|
|
{
|
|
return "GPUSOFT";
|
|
}
|
|
static GpuDemo* MyCreateFunc()
|
|
{
|
|
GpuDemo* demo = new GpuSoftBodyDemo;
|
|
return demo;
|
|
}
|
|
|
|
virtual void renderScene();
|
|
|
|
virtual void clientMoveAndDisplay();
|
|
|
|
|
|
};
|
|
|
|
class GpuSoftClothDemo : public GpuSoftBodyDemo
|
|
{
|
|
|
|
public:
|
|
GpuSoftClothDemo();
|
|
virtual ~GpuSoftClothDemo();
|
|
|
|
unsigned char* loadImage(const char* fileName, int& width, int& height, int& n);
|
|
|
|
virtual void setupScene(const ConstructionInfo& ci);
|
|
|
|
virtual void renderScene();
|
|
|
|
virtual const char* getName()
|
|
{
|
|
return "GpuSoftCloth";
|
|
}
|
|
|
|
static GpuDemo* MyCreateFunc()
|
|
{
|
|
GpuDemo* demo = new GpuSoftClothDemo;
|
|
return demo;
|
|
}
|
|
|
|
};
|
|
|
|
#endif //GPU_SOFT_BODY_DEMO_H
|
|
|