C# Класс fCraft.BoundingBox

Defines a 3D bounding box, in integer cartesian coordinates
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Empty BoundingBox
XMin int

Открытые методы

Метод Описание
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

Описание методов

BoundingBox() публичный Метод

public BoundingBox ( Position p1, Position p2 ) : System
p1 Position
p2 Position
Результат System

BoundingBox() публичный Метод

public BoundingBox ( Position pos, int widthX, int widthY, int height ) : System
pos Position
widthX int
widthY int
height int
Результат System

BoundingBox() публичный Метод

public BoundingBox ( System.Xml.Linq.XElement root ) : System
root System.Xml.Linq.XElement
Результат System

BoundingBox() публичный Метод

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
Результат System

Contains() публичный Метод

Checks if another bounding box is wholly contained inside this one.
public Contains ( BoundingBox other ) : bool
other BoundingBox
Результат bool

Contains() публичный Метод

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
Результат bool

GetIntersection() публичный Метод

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
Результат BoundingBox

Insersects() публичный Метод

Checks whether this bounding box intersects/touches another one.
public Insersects ( BoundingBox other ) : bool
other BoundingBox
Результат bool

Serialize() публичный Метод

public Serialize ( ) : System.Xml.Linq.XElement
Результат System.Xml.Linq.XElement

Serialize() публичный Метод

public Serialize ( string customElementName ) : System.Xml.Linq.XElement
customElementName string
Результат System.Xml.Linq.XElement

Описание свойств

Empty публичное статическое свойство

public static BoundingBox,fCraft Empty
Результат BoundingBox

XMin публичное свойство

public int XMin
Результат int