コード例 #1
0
 public static void Square()
 {
     GL.Begin(PrimitiveType.Quads);
     GL.Color3(Color.Aqua);
     Painter.PaintSquare(
         new Vector3(0, 0, 0),
         new Vector3(0, 0.5f, 0),
         new Vector3(0.5f, 0.5f, 0),
         new Vector3(0.5f, 0, 0));
     GL.End();
 }
コード例 #2
0
ファイル: TankPainter.cs プロジェクト: desolver/OpenGL
        private static void MakeSquare(Vector3 point1, Vector3 point2, Vector3 point3, Vector3 point4, bool isMirrored = false)
        {
            if (isMirrored)
            {
                point1 = new Vector3(-point1.X, point1.Y, point1.Z);
                point2 = new Vector3(-point2.X, point2.Y, point2.Z);
                point3 = new Vector3(-point3.X, point3.Y, point3.Z);
                point4 = new Vector3(-point4.X, point4.Y, point4.Z);
            }

            Painter.PaintSquare(point1, point2, point3, point4);
        }