Defines a 3D bounding box, in integer cartesian coordinates. Coordinates are always inclusive, so note that even a bounding box with coinciding vertices is a 1x1x1 cube, and has non-zero volume and non-zero dimensions.
More...
|
| | BoundingBox (Vector3I p1, Vector3I p2) |
| | Constructs a bounding box using two vectors as opposite corners.
|
| |
| | BoundingBox (BoundingBox other) |
| | Creates a copy of the given BoundingBox.
|
| |
| | BoundingBox (Vector3I origin, int width, int length, int height) |
| | Constructs a bounding box at a given origin, with given dimensions.
|
| |
| | BoundingBox (int x1, int y1, int z1, int x2, int y2, int z2) |
| | Constructs a bounding box between two given coordinates.
|
| |
| bool | Insersects ([NotNull] BoundingBox other) |
| | Checks whether this bounding box intersects/touches another one.
|
| |
| bool | Contains ([NotNull] BoundingBox other) |
| | Checks if another bounding box is wholly contained inside this one.
|
| |
| bool | Contains (int x, int y, int z) |
| | Checks if a given point is inside this bounding box.
|
| |
| bool | Contains (Vector3I point) |
| | Checks if a given point is inside this bounding box.
|
| |
| BoundingBox | GetIntersection ([NotNull] BoundingBox other) |
| | Returns a BoundingBox object that describes the space shared between this and another box.
|
| |
| | BoundingBox ([NotNull] XElement root) |
| |
| XElement | Serialize ([NotNull] string tagName) |
| |
| XElement | Serialize () |
| |
| bool | Equals ([NotNull] BoundingBox other) |
| |
| override string | ToString () |
| |
| object | Clone () |
| |
|
| int | Volume [get] |
| | Returns volume of this bounding box. Guaranteed to be at least 1.
|
| |
| Vector3I | Dimensions [get] |
| | Gets a vector of the box's dimensions: (width,length,height) - that's (x,y,z). Guaranteed to be non-zero in every direction.
|
| |
| int | Width [get] |
| | Width of the bounding box (XMax - XMin + 1). Inclusive, and always at least 1.
|
| |
| int | Length [get] |
| | Width of the bounding box (YMax - YMin + 1). Notch's Z. Inclusive, and always at least 1.
|
| |
| int | Height [get] |
| | Width of the bounding box (ZMax - ZMin + 1). Notch's Y. Inclusive, and always at least 1.
|
| |
| Vector3I | MinVertex [get, set] |
| | Gets or sets the vertex closest to the coordinate origin, opposite MaxVertex. When setting, MaxVertex may be adjusted as well, to keep minimums/maximums consistent.
|
| |
| Vector3I | MaxVertex [get, set] |
| | Gets or sets the vertex farthest from the origin, opposite MinVertex. When setting, MaxVertex may be adjusted as well, to keep minimums/maximums consistent.
|
| |
Defines a 3D bounding box, in integer cartesian coordinates. Coordinates are always inclusive, so note that even a bounding box with coinciding vertices is a 1x1x1 cube, and has non-zero volume and non-zero dimensions.
Constructs a bounding box using two vectors as opposite corners.
| fCraft.BoundingBox.BoundingBox |
( |
Vector3I |
origin, |
|
|
int |
width, |
|
|
int |
length, |
|
|
int |
height |
|
) |
| |
Constructs a bounding box at a given origin, with given dimensions.
- Parameters
-
| origin | Origin point of the bounding box. |
| width | Width (X-axis, horizontal). May be negative. |
| length | Length (Y-axis, horizontal). May be negative. |
| height | Width (Z-axis, vertical). May be negative. |
| fCraft.BoundingBox.BoundingBox |
( |
int |
x1, |
|
|
int |
y1, |
|
|
int |
z1, |
|
|
int |
x2, |
|
|
int |
y2, |
|
|
int |
z2 |
|
) |
| |
Constructs a bounding box between two given coordinates.
| fCraft.BoundingBox.BoundingBox |
( |
[NotNull] XElement |
root | ) |
|
| object fCraft.BoundingBox.Clone |
( |
| ) |
|
| bool fCraft.BoundingBox.Contains |
( |
[NotNull] BoundingBox |
other | ) |
|
Checks if another bounding box is wholly contained inside this one.
- Exceptions
-
| ArgumentNullException | other is null. |
| bool fCraft.BoundingBox.Contains |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
z |
|
) |
| |
Checks if a given point is inside this bounding box.
| bool fCraft.BoundingBox.Contains |
( |
Vector3I |
point | ) |
|
Checks if a given point is inside this bounding box.
| bool fCraft.BoundingBox.Equals |
( |
[NotNull] BoundingBox |
other | ) |
|
Returns a BoundingBox object that describes the space shared between this and another box.
- Returns
- Intersecting volume, or BoundingBox.Empty if there is no overlap.
- Exceptions
-
| ArgumentNullException | other is null. |
| bool fCraft.BoundingBox.Insersects |
( |
[NotNull] BoundingBox |
other | ) |
|
Checks whether this bounding box intersects/touches another one.
- Exceptions
-
| ArgumentNullException | other is null. |
| XElement fCraft.BoundingBox.Serialize |
( |
[NotNull] string |
tagName | ) |
|
| XElement fCraft.BoundingBox.Serialize |
( |
| ) |
|
| override string fCraft.BoundingBox.ToString |
( |
| ) |
|
| int fCraft.BoundingBox.XMin |
| const string fCraft.BoundingBox.XmlRootElementName = "BoundingBox" |
Gets a vector of the box's dimensions: (width,length,height) - that's (x,y,z). Guaranteed to be non-zero in every direction.
| int fCraft.BoundingBox.Height |
|
get |
Width of the bounding box (ZMax - ZMin + 1). Notch's Y. Inclusive, and always at least 1.
| int fCraft.BoundingBox.Length |
|
get |
Width of the bounding box (YMax - YMin + 1). Notch's Z. Inclusive, and always at least 1.
Gets or sets the vertex farthest from the origin, opposite MinVertex. When setting, MaxVertex may be adjusted as well, to keep minimums/maximums consistent.
Gets or sets the vertex closest to the coordinate origin, opposite MaxVertex. When setting, MaxVertex may be adjusted as well, to keep minimums/maximums consistent.
| int fCraft.BoundingBox.Volume |
|
get |
Returns volume of this bounding box. Guaranteed to be at least 1.
| int fCraft.BoundingBox.Width |
|
get |
Width of the bounding box (XMax - XMin + 1). Inclusive, and always at least 1.
The documentation for this class was generated from the following file: