Пример #1
0
        private void drawTriangle(Point3D[] p, GraphicsDevice d, Color c)
        {
            VertexPositionColor[] tri = { new VertexPositionColor(Vector3Extension.CreateV3FromP3(p[0]), c),
                                          new VertexPositionColor(Vector3Extension.CreateV3FromP3(p[1]), c),
                                          new VertexPositionColor(Vector3Extension.CreateV3FromP3(p[2]), c) };

            d.DrawUserPrimitives <VertexPositionColor>(PrimitiveType.TriangleList, tri, 0, 1);
        }
Пример #2
0
 private void drawLine(Point3D[] p, GraphicsDevice d, Color c)
 {
     VertexPositionColor[] li = { new VertexPositionColor(Vector3Extension.CreateV3FromP3(p[0]), c),
                                  new VertexPositionColor(Vector3Extension.CreateV3FromP3(p[1]), c) };
     d.DrawUserPrimitives <VertexPositionColor>(PrimitiveType.LineStrip, li, 0, 1);
 }