aboutsummaryrefslogtreecommitdiff
path: root/demo/scenes/restitution.h
blob: 521f526e8e68fc15868a70d77869428e6168390e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
class Restitution : public Scene
{
public:

	Restitution(const char* name) : Scene(name) {}

	void Initialize()
	{
		float radius = 0.05f;
		CreateParticleGrid(Vec3(0.0f, 1.0f, 0.0f), 1, 1, 1, radius, Vec3(0.0f), 1.0f, false, 0.0f, NvFlexMakePhase(0, eNvFlexPhaseSelfCollide), 0.0f);

		g_params.radius = radius;
		g_params.dynamicFriction = 0.025f;
		g_params.dissipation = 0.0f;
		g_params.restitution = 1.0;
		g_params.numIterations = 4;

		g_numSubsteps = 4;

		// draw options		
		g_drawPoints = true;
	}
	
};