Exemplo n.º 1
0
        /// <summary>Draw an inclusive (inner) boundary around a rectangle</summary>
        public void DrawRectInside(Bounds bounds, int depth, CubeCornerColors colors)
        {
            Position bottomLeft  = new Position(bounds.startX, bounds.startY, depth);
            Position bottomRight = new Position(bounds.endX - 1, bounds.startY, depth);
            Position topLeft     = new Position(bounds.startX, bounds.endY - 1, depth);
            Position topRight    = new Position(bounds.endX - 1, bounds.endY - 1, depth);

            DrawLine(bottomLeft, topLeft, colors.BottomFrontLeft, colors.TopFrontLeft);
            DrawLine(topLeft, topRight, colors.TopFrontLeft, colors.TopFrontRight);
            DrawLine(topRight, bottomRight, colors.TopFrontRight, colors.BottomFrontRight);
            DrawLine(bottomRight, bottomLeft, colors.BottomFrontRight, colors.BottomFrontLeft);
        }
Exemplo n.º 2
0
        /// <summary>Draw an inclusive (inner) boundary around a rectangle</summary>
        public void DrawRectInside(Rectangle bounds, int depth, CubeCornerColors colors)
        {
            Position bottomLeft  = new Position(bounds.X, bounds.Y, depth);
            Position bottomRight = new Position(bounds.X + bounds.Width - 1, bounds.Y, depth);
            Position topLeft     = new Position(bounds.X, bounds.Y + bounds.Height - 1, depth);
            Position topRight    = new Position(bounds.X + bounds.Width - 1, bounds.Y + bounds.Height - 1, depth);

            DrawLine(bottomLeft, topLeft, colors.BottomFrontLeft, colors.TopFrontLeft);
            DrawLine(topLeft, topRight, colors.TopFrontLeft, colors.TopFrontRight);
            DrawLine(topRight, bottomRight, colors.TopFrontRight, colors.BottomFrontRight);
            DrawLine(bottomRight, bottomLeft, colors.BottomFrontRight, colors.BottomFrontLeft);
        }
Exemplo n.º 3
0
        public void DrawAABB(AABB aabb, CubeCornerColors colors)
        {
            DrawLine(aabb.BottomBackLeft, aabb.BottomBackRight, colors.BottomBackLeft, colors.BottomBackRight);
            DrawLine(aabb.BottomBackLeft, aabb.BottomFrontLeft, colors.BottomBackLeft, colors.BottomFrontLeft);
            DrawLine(aabb.BottomBackRight, aabb.BottomFrontRight, colors.BottomBackRight, colors.BottomFrontRight);
            DrawLine(aabb.BottomFrontLeft, aabb.BottomFrontRight, colors.BottomFrontLeft, colors.BottomFrontRight);

            DrawLine(aabb.BottomBackLeft, aabb.TopBackLeft, colors.BottomBackLeft, colors.TopBackLeft);
            DrawLine(aabb.BottomBackRight, aabb.TopBackRight, colors.BottomBackRight, colors.TopBackRight);
            DrawLine(aabb.BottomFrontLeft, aabb.TopFrontLeft, colors.BottomFrontLeft, colors.TopFrontLeft);
            DrawLine(aabb.BottomFrontRight, aabb.TopFrontRight, colors.BottomFrontRight, colors.TopFrontRight);

            DrawLine(aabb.TopBackLeft, aabb.TopBackRight, colors.TopBackLeft, colors.TopBackRight);
            DrawLine(aabb.TopBackLeft, aabb.TopFrontLeft, colors.TopBackLeft, colors.TopFrontLeft);
            DrawLine(aabb.TopBackRight, aabb.TopFrontRight, colors.TopBackRight, colors.TopFrontRight);
            DrawLine(aabb.TopFrontLeft, aabb.TopFrontRight, colors.TopFrontLeft, colors.TopFrontRight);
        }