update tests
This commit is contained in:
		@@ -34,6 +34,11 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		m_cloth->Draw();
 | 
							m_cloth->Draw();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if (m_clothDragger.IsDragging() == true)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								g_draw->DrawSegment(m_clothDragger.GetPointA(), m_clothDragger.GetPointB(), b3Color_white);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		extern u32 b3_clothSolverIterations;
 | 
							extern u32 b3_clothSolverIterations;
 | 
				
			||||||
		g_draw->DrawString(b3Color_white, "Iterations = %u", b3_clothSolverIterations);
 | 
							g_draw->DrawString(b3Color_white, "Iterations = %u", b3_clothSolverIterations);
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,8 +77,6 @@ public:
 | 
				
			|||||||
	b3RectangleGarment m_rectangleGarment;
 | 
						b3RectangleGarment m_rectangleGarment;
 | 
				
			||||||
	b3GarmentMesh m_rectangleGarmentMesh;
 | 
						b3GarmentMesh m_rectangleGarmentMesh;
 | 
				
			||||||
	b3GarmentClothMesh m_rectangleClothMesh;
 | 
						b3GarmentClothMesh m_rectangleClothMesh;
 | 
				
			||||||
 | 
					 | 
				
			||||||
	b3BoxHull m_boxHull;
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
@@ -37,7 +37,7 @@ public:
 | 
				
			|||||||
			m_rectangleClothMesh.vertices[i] = dq * m_rectangleClothMesh.vertices[i];
 | 
								m_rectangleClothMesh.vertices[i] = dq * m_rectangleClothMesh.vertices[i];
 | 
				
			||||||
			m_rectangleClothMesh.vertices[i].y += 5.0f;
 | 
								m_rectangleClothMesh.vertices[i].y += 5.0f;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
		b3ClothDef def;
 | 
							b3ClothDef def;
 | 
				
			||||||
		def.mesh = &m_rectangleClothMesh;
 | 
							def.mesh = &m_rectangleClothMesh;
 | 
				
			||||||
		def.density = 0.2f;
 | 
							def.density = 0.2f;
 | 
				
			||||||
@@ -47,6 +47,12 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		m_cloth = m_world.CreateCloth(def);
 | 
							m_cloth = m_world.CreateCloth(def);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							for (b3Particle* p = m_cloth->GetParticleList().m_head; p; p = p->GetNext())
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								p->SetRadius(0.2f);
 | 
				
			||||||
 | 
								p->SetFriction(0.2f);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			b3BodyDef bd;
 | 
								b3BodyDef bd;
 | 
				
			||||||
			bd.type = e_staticBody;
 | 
								bd.type = e_staticBody;
 | 
				
			||||||
@@ -59,11 +65,6 @@ public:
 | 
				
			|||||||
			tableShape.m_hull = &m_tableHull;
 | 
								tableShape.m_hull = &m_tableHull;
 | 
				
			||||||
			tableShape.m_radius = 0.2f;
 | 
								tableShape.m_radius = 0.2f;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			//b3CapsuleShape tableShape;
 | 
					 | 
				
			||||||
			//tableShape.m_centers[0].Set(0.0f, 0.0f, -1.0f);
 | 
					 | 
				
			||||||
			//tableShape.m_centers[1].Set(0.0f, 0.0f, 1.0f);
 | 
					 | 
				
			||||||
			//tableShape.m_radius = 2.0f;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			b3ShapeDef sd;
 | 
								b3ShapeDef sd;
 | 
				
			||||||
			sd.shape = &tableShape;
 | 
								sd.shape = &tableShape;
 | 
				
			||||||
			sd.friction = 1.0f;
 | 
								sd.friction = 1.0f;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user