Esempio n. 1
0
		public static void AddTriangle(Vector3 a, Vector3 b, Vector3 c, Color color, float life = 0f)
        {
            // Get a DebugShape we can use to draw the triangle
            DebugShape shape = GetShapeForLines(3, life);

            // Add the vertices to the shape
            shape.Vertices[0] = new VertexPositionColor(a.ToXNA(), color);
            shape.Vertices[1] = new VertexPositionColor(b.ToXNA(), color);
            shape.Vertices[2] = new VertexPositionColor(b.ToXNA(), color);
            shape.Vertices[3] = new VertexPositionColor(c.ToXNA(), color);
            shape.Vertices[4] = new VertexPositionColor(c.ToXNA(), color);
            shape.Vertices[5] = new VertexPositionColor(a.ToXNA(), color);
		}
Esempio n. 2
0
		public static void AddLine(Vector3 a, Vector3 b, Color color, float life = 0f)
        {
            // Get a DebugShape we can use to draw the line
			DebugShape shape = GetShapeForLines(1, life);

            // Add the two vertices to the shape
			shape.Vertices[0] = new VertexPositionColor(a.ToXNA(), color);
            shape.Vertices[1] = new VertexPositionColor(b.ToXNA(), color);
		}