cloth2

diff src/cloth.h @ 1:dc15b741486c

exploding cloth
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 11 Jan 2016 20:24:13 +0200
parents ef0c22554406
children
line diff
     1.1 --- a/src/cloth.h	Mon Jan 11 16:51:16 2016 +0200
     1.2 +++ b/src/cloth.h	Mon Jan 11 20:24:13 2016 +0200
     1.3 @@ -16,6 +16,7 @@
     1.4  private:
     1.5  	float mass, elast;	// global mass attributes
     1.6  	float spring_k;		// spring constant for all springs
     1.7 +	float damping;
     1.8  	Vector3 grav, forces;
     1.9  
    1.10  	std::vector<ClothMass> masses;
    1.11 @@ -30,6 +31,13 @@
    1.12  
    1.13  	void create_rect(int x, int y, float width, float height);
    1.14  
    1.15 +	void set_mass(float m);
    1.16 +	void set_elasticity(float e);
    1.17 +	void set_spring_constant(float k);
    1.18 +	void set_damping(float d);
    1.19 +	void set_gravity(const Vector3 &g);
    1.20 +	void set_force(const Vector3 &f);
    1.21 +
    1.22  	void transform(const Matrix4x4 &xform);
    1.23  
    1.24  	void add_collider(Object *o);