Exemple #1
0
 /// <summary>
 /// Returns whether any portion of the drawable object is on camera.
 /// </summary>
 public static Boolean IsObjectOnCamera(Camera c, DrawableObject o)
 {
     return(Math2d.RectanglesIntersect(c.LogicalRect, o.PositionLogical));
 }
        /// <summary>
        /// Whether this object even appears on the camera.
        /// </summary>
        /// <returns></returns>
        public Boolean ShouldBeDrawn()
        {
            Boolean shouldDraw = Visible && Math2d.RectanglesIntersect(m_camera.LogicalRect, PositionLogical);

            return(shouldDraw);
        }