Exemplo n.º 1
0
		public override void Step(TestSettings settings)
		{
			base.Step(settings);

			PolygonShape shape = new PolygonShape();
			shape.Set(m_points, e_count);

			m_debugDraw.DrawString("Press g to generate a new random convex hull");
			

			m_debugDraw.DrawPolygon(shape.m_vertices, shape.m_count, Color.FromArgb(225, 225, 225));

			for (int i = 0; i < e_count; ++i)
			{
				m_debugDraw.DrawPoint(m_points[i], 2.0f, Color.FromArgb(225, 128, 128));
				//m_debugDraw.DrawString(m_points[i] + new Vec2(0.05f, 0.05f), "%d", i);
			}

			if (shape.Validate() == false)
			{
				m_textLine += 0;
			}

			if (m_auto)
			{
				Generate();
			}
		}