C# Class Protogame.BoundingBoxExtensions

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.

Afficher le fichier Open project: RedpointGames/Protogame

Méthodes publiques

Méthode Description
CopyTo ( this rectangle, IBoundingBox boundingBox ) : void

Copies the specified XNA rectangle to the Protogame bounding box.

CopyTo ( this boundingBox, Rectangle rectangle ) : void

Copies the specified Protogame bounding box to the XNA rectangle.

ToBoundingBox ( this rectangle ) : IBoundingBox

Converts the specified XNA rectangle to a Protogame bounding box.

ToProtogame ( this boundingBox ) : IBoundingBox

Converts the specified XNA bounding box to a Protogame bounding box.

ToRectangle ( this boundingBox ) : Rectangle

Converts the specified Protogame bounding box to an XNA rectangle.

ToXna ( this boundingBox ) : Microsoft.Xna.Framework.BoundingBox

Converts the specified Protogame bounding box to an XNA bounding box.

Method Details

CopyTo() public static méthode

Copies the specified XNA rectangle to the Protogame bounding box.
public static CopyTo ( this rectangle, IBoundingBox boundingBox ) : void
rectangle this /// The XNA rectangle to copy from. ///
boundingBox IBoundingBox /// The Protogame bounding box to copy to. ///
Résultat void

CopyTo() public static méthode

Copies the specified Protogame bounding box to the XNA rectangle.
public static CopyTo ( this boundingBox, Rectangle rectangle ) : void
boundingBox this /// The Protogame bounding box to copy from. ///
rectangle Microsoft.Xna.Framework.Rectangle /// The XNA rectangle to copy to. ///
Résultat void

ToBoundingBox() public static méthode

Converts the specified XNA rectangle to a Protogame bounding box.
public static ToBoundingBox ( this rectangle ) : IBoundingBox
rectangle this /// The XNA rectangle to convert. ///
Résultat IBoundingBox

ToProtogame() public static méthode

Converts the specified XNA bounding box to a Protogame bounding box.
public static ToProtogame ( this boundingBox ) : IBoundingBox
boundingBox this /// The XNA bounding box to convert. ///
Résultat IBoundingBox

ToRectangle() public static méthode

Converts the specified Protogame bounding box to an XNA rectangle.
public static ToRectangle ( this boundingBox ) : Rectangle
boundingBox this /// The Protogame bounding box to convert. ///
Résultat Microsoft.Xna.Framework.Rectangle

ToXna() public static méthode

Converts the specified Protogame bounding box to an XNA bounding box.
public static ToXna ( this boundingBox ) : Microsoft.Xna.Framework.BoundingBox
boundingBox this /// The Protogame bounding box to convert. ///
Résultat Microsoft.Xna.Framework.BoundingBox