Exemplo n.º 1
0
        public void DrawBindBox(BindBox box)
        {
            GL.Begin(BeginMode.Lines);

            //1
            GL.Vertex3(box.x, box.y, box.z);
            GL.Vertex3(box.x, box.y + box.ySize, box.z);

            GL.Vertex3(box.x, box.y + box.ySize, box.z);
            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z);

            GL.Vertex3(box.x, box.y + box.ySize, box.z);
            GL.Vertex3(box.x, box.y + box.ySize, box.z + box.zSize);

            //2
            GL.Vertex3(box.x + box.xSize, box.y, box.z);
            GL.Vertex3(box.x, box.y, box.z);

            GL.Vertex3(box.x + box.xSize, box.y, box.z);
            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z);

            GL.Vertex3(box.x + box.xSize, box.y, box.z);
            GL.Vertex3(box.x + box.xSize, box.y, box.z + box.zSize);

            //3
            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z + box.zSize);
            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z);

            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z + box.zSize);
            GL.Vertex3(box.x + box.xSize, box.y, box.z + box.zSize);

            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z + box.zSize);
            GL.Vertex3(box.x, box.y + box.ySize, box.z + box.zSize);

            //4
            GL.Vertex3(box.x, box.y, box.z + box.zSize);
            GL.Vertex3(box.x, box.y, box.z);

            GL.Vertex3(box.x, box.y, box.z + box.zSize);
            GL.Vertex3(box.x + box.xSize, box.y, box.z + box.zSize);

            GL.Vertex3(box.x, box.y, box.z + box.zSize);
            GL.Vertex3(box.x, box.y + box.ySize, box.z + box.zSize);

            GL.End();
        }
Exemplo n.º 2
0
        public void DrawBindBox(BindBox box)
        {
            GL.Begin(BeginMode.Lines);

            //1
            GL.Vertex3(box.x, box.y, box.z);
            GL.Vertex3(box.x, box.y + box.ySize, box.z);

            GL.Vertex3(box.x, box.y + box.ySize, box.z);
            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z);

            GL.Vertex3(box.x, box.y + box.ySize, box.z);
            GL.Vertex3(box.x, box.y + box.ySize, box.z + box.zSize);

            //2
            GL.Vertex3(box.x + box.xSize, box.y, box.z);
            GL.Vertex3(box.x, box.y, box.z);

            GL.Vertex3(box.x + box.xSize, box.y, box.z);
            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z);

            GL.Vertex3(box.x + box.xSize, box.y, box.z);
            GL.Vertex3(box.x + box.xSize, box.y, box.z + box.zSize);

            //3
            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z + box.zSize);
            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z);

            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z + box.zSize);
            GL.Vertex3(box.x + box.xSize, box.y, box.z + box.zSize);

            GL.Vertex3(box.x + box.xSize, box.y + box.ySize, box.z + box.zSize);
            GL.Vertex3(box.x, box.y + box.ySize, box.z + box.zSize);

            //4
            GL.Vertex3(box.x, box.y, box.z + box.zSize);
            GL.Vertex3(box.x, box.y, box.z);

            GL.Vertex3(box.x, box.y, box.z + box.zSize);
            GL.Vertex3(box.x + box.xSize, box.y, box.z + box.zSize);

            GL.Vertex3(box.x, box.y, box.z + box.zSize);
            GL.Vertex3(box.x, box.y + box.ySize, box.z + box.zSize);

            GL.End();

        }