BoundingBoxExtensions¶
-
class
BoundingBoxExtensions
: System.Object These extension methods assist with converting between bounding boxes and rectangles.
Protogame’s bounding box includes speed attributes, which the built-in MonoGame bounding box does not have.
-
public void
CopyTo
(Protogame.IBoundingBox boundingBox, Rectangle rectangle) Copies the specified Protogame bounding box to the XNA rectangle.
Parameters: - boundingBox (Protogame.IBoundingBox) – The Protogame bounding box to copy from.
- rectangle (Microsoft.Xna.Framework.Rectangle) – The XNA rectangle to copy to.
-
public void
CopyTo
(Rectangle rectangle, Protogame.IBoundingBox boundingBox) Copies the specified XNA rectangle to the Protogame bounding box.
Parameters: - rectangle (Microsoft.Xna.Framework.Rectangle) – The XNA rectangle to copy from.
- boundingBox (Protogame.IBoundingBox) – The Protogame bounding box to copy to.
-
public Protogame.IBoundingBox
ToBoundingBox
(Rectangle rectangle) Converts the specified XNA rectangle to a Protogame bounding box.
Parameters: - rectangle (Microsoft.Xna.Framework.Rectangle) – The XNA rectangle to convert.
Returns: The T:Protogame.IBoundingBox.
-
public Protogame.IBoundingBox
ToProtogame
(BoundingBox boundingBox) Converts the specified XNA bounding box to a Protogame bounding box.
Parameters: - boundingBox (Microsoft.Xna.Framework.BoundingBox) – The XNA bounding box to convert.
Returns: The T:Protogame.IBoundingBox.
-
public Rectangle
ToRectangle
(Protogame.IBoundingBox boundingBox) Converts the specified Protogame bounding box to an XNA rectangle.
Parameters: - boundingBox (Protogame.IBoundingBox) – The Protogame bounding box to convert.
Returns: The T:Microsoft.Xna.Framework.Rectangle.
-
public BoundingBox
ToXna
(Protogame.IBoundingBox boundingBox) Converts the specified Protogame bounding box to an XNA bounding box.
Parameters: - boundingBox (Protogame.IBoundingBox) – The Protogame bounding box to convert.
Returns: The T:Microsoft.Xna.Framework.BoundingBox.
-
public void