Include Rayleigh damping. Use struct instead of class. Update PinnedSoftBody test
This commit is contained in:
		| @@ -32,7 +32,7 @@ public: | ||||
| 		b3SoftBodyDef def; | ||||
| 		def.mesh = &m_mesh; | ||||
| 		def.density = 0.2f; | ||||
| 		def.E = 100.0f; | ||||
| 		def.E = 1000.0f; | ||||
| 		def.nu = 0.33f;		 | ||||
| 		def.c_yield = 0.1f; | ||||
| 		def.c_creep = 0.5f; | ||||
| @@ -40,6 +40,12 @@ public: | ||||
|  | ||||
| 		m_body = new b3SoftBody(def); | ||||
|  | ||||
| 		for (u32 i = 0; i < m_mesh.vertexCount; ++i) | ||||
| 		{ | ||||
| 			b3SoftBodyNode* n = m_body->GetVertexNode(i); | ||||
| 			n->SetDamping(0.2f); | ||||
| 		} | ||||
|  | ||||
| 		u32 pinIndex = ~0; | ||||
| 		float32 pinDot = -B3_MAX_FLOAT; | ||||
| 		for (u32 i = 0; i < m_mesh.vertexCount; ++i) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user