C# Class fCraft.BoundingBox

Defines a 3D bounding box, in integer cartesian coordinates
Afficher le fichier Open project: fragmer/fCraft Class Usage Examples

Méthodes publiques

Свойство Type Description
Empty BoundingBox
XMin int

Méthodes publiques

Méthode Description
BoundingBox ( Position p1, Position p2 ) : System
BoundingBox ( Position pos, int widthX, int widthY, int height ) : System
BoundingBox ( System.Xml.Linq.XElement root ) : System
BoundingBox ( int x1, int y1, int h1, int x2, int y2, int h2 ) : System
Contains ( BoundingBox other ) : bool

Checks if another bounding box is wholly contained inside this one.

Contains ( int x, int y, int h ) : bool

Checks if a given point is inside this bounding box.

GetIntersection ( BoundingBox other ) : BoundingBox

Returns a BoundingBox object that describes the space shared between this and another box. Returns BoundingBox.Empty if there is no intersection.

Insersects ( BoundingBox other ) : bool

Checks whether this bounding box intersects/touches another one.

Serialize ( ) : System.Xml.Linq.XElement
Serialize ( string customElementName ) : System.Xml.Linq.XElement

Method Details

BoundingBox() public méthode

public BoundingBox ( Position p1, Position p2 ) : System
p1 Position
p2 Position
Résultat System

BoundingBox() public méthode

public BoundingBox ( Position pos, int widthX, int widthY, int height ) : System
pos Position
widthX int
widthY int
height int
Résultat System

BoundingBox() public méthode

public BoundingBox ( System.Xml.Linq.XElement root ) : System
root System.Xml.Linq.XElement
Résultat System

BoundingBox() public méthode

public BoundingBox ( int x1, int y1, int h1, int x2, int y2, int h2 ) : System
x1 int
y1 int
h1 int
x2 int
y2 int
h2 int
Résultat System

Contains() public méthode

Checks if another bounding box is wholly contained inside this one.
public Contains ( BoundingBox other ) : bool
other BoundingBox
Résultat bool

Contains() public méthode

Checks if a given point is inside this bounding box.
public Contains ( int x, int y, int h ) : bool
x int
y int
h int
Résultat bool

GetIntersection() public méthode

Returns a BoundingBox object that describes the space shared between this and another box. Returns BoundingBox.Empty if there is no intersection.
public GetIntersection ( BoundingBox other ) : BoundingBox
other BoundingBox
Résultat BoundingBox

Insersects() public méthode

Checks whether this bounding box intersects/touches another one.
public Insersects ( BoundingBox other ) : bool
other BoundingBox
Résultat bool

Serialize() public méthode

public Serialize ( ) : System.Xml.Linq.XElement
Résultat System.Xml.Linq.XElement

Serialize() public méthode

public Serialize ( string customElementName ) : System.Xml.Linq.XElement
customElementName string
Résultat System.Xml.Linq.XElement

Property Details

Empty public_oe static_oe property

public static BoundingBox,fCraft Empty
Résultat BoundingBox

XMin public_oe property

public int XMin
Résultat int