BoundingBox
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.csporter.helpers.Struct, java.io.Serializable
public final class BoundingBox implements Struct<BoundingBox>, Serializable
The axis-aligned bounding box
Constructors
Constructor | Description |
---|---|
BoundingBox(Vector3 minimum, Vector3 maximum) | Initialize a finite bounding box with given minimum and maximum corner |
BoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) | Initialize a finite bounding box with given minimum and maximum corner |
BoundingBox() |
Fields
Field | Description |
---|---|
INFINITE | The infinite bounding box |
NULL | The null bounding box |
Methods
Method | Description |
---|---|
clone() | |
contains(Vector3 p) | Check if the point p is inside the bounding box |
copyFrom(BoundingBox src) | |
equals(Object obj) | Determines if two objects are equal |
fromGeometry(Geometry geometry) | Construct a bounding box from given geometry |
getCenter() | The center of the bounding box. |
getClass() | |
getExtent() | Gets the extent of the bounding box. |
getMaximum() | The maximum corner of the bounding box |
getMinimum() | The minimum corner of the bounding box |
getSize() | The size of the bounding box |
hashCode() | Returns the hash code for this instance |
merge(BoundingBox bb) | Merges the new box into the current bounding box. |
merge(Vector3 pt) | Merge current bounding box with given point |
merge(Vector4 pt) | Merge current bounding box with given point |
merge(double x, double y, double z) | Merge current bounding box with given point |
mul(BoundingBox bbox, Matrix4 mat) | Operator overloading for multiply |
notify() | |
notifyAll() | |
overlapsWith(BoundingBox box) | Check if current bounding box overlaps with specified bounding box. |
scale() | Calculates the absolute largest coordinate value of any contained point. |
toString() | Gets the string representation of the bounding box. |
wait() | |
wait(long arg0) | |
wait(long arg0, int arg1) |
BoundingBox(Vector3 minimum, Vector3 maximum)
public BoundingBox(Vector3 minimum, Vector3 maximum)
Initialize a finite bounding box with given minimum and maximum corner
Parameters:
Parameter | Type | Description |
---|---|---|
minimum | Vector3 | The minimum corner |
maximum | Vector3 | The maximum corner |
BoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
public BoundingBox(double minX, double minY, double minZ, double maxX, double maxY, double maxZ)
Initialize a finite bounding box with given minimum and maximum corner
Parameters:
Parameter | Type | Description |
---|---|---|
minX | double | |
minY | double | |
minZ | double | |
maxX | double | |
maxY | double | |
maxZ | double |
BoundingBox()
public BoundingBox()
INFINITE
public static final BoundingBox INFINITE
The infinite bounding box
NULL
public static final BoundingBox NULL
The null bounding box
clone()
public BoundingBox clone()
Returns: BoundingBox
contains(Vector3 p)
public boolean contains(Vector3 p)
Check if the point p is inside the bounding box
Parameters:
Parameter | Type | Description |
---|---|---|
p | Vector3 | The point to test |
Returns: boolean
copyFrom(BoundingBox src)
public void copyFrom(BoundingBox src)
Parameters:
Parameter | Type | Description |
---|---|---|
src | BoundingBox |
equals(Object obj)
public boolean equals(Object obj)
Determines if two objects are equal
Parameters:
Parameter | Type | Description |
---|---|---|
obj | java.lang.Object |
Returns: boolean
fromGeometry(Geometry geometry)
public static BoundingBox fromGeometry(Geometry geometry)
Construct a bounding box from given geometry
Parameters:
Parameter | Type | Description |
---|---|---|
geometry | Geometry |
Returns: BoundingBox
getCenter()
public Vector3 getCenter()
The center of the bounding box.
Returns: Vector3
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getExtent()
public BoundingBoxExtent getExtent()
Gets the extent of the bounding box.
Returns: BoundingBoxExtent
getMaximum()
public Vector3 getMaximum()
The maximum corner of the bounding box
Returns: Vector3
getMinimum()
public Vector3 getMinimum()
The minimum corner of the bounding box
Returns: Vector3
getSize()
public Vector3 getSize()
The size of the bounding box
Returns: Vector3
hashCode()
public int hashCode()
Returns the hash code for this instance
Returns: int
merge(BoundingBox bb)
public void merge(BoundingBox bb)
Merges the new box into the current bounding box.
Parameters:
Parameter | Type | Description |
---|---|---|
bb | BoundingBox |
merge(Vector3 pt)
public void merge(Vector3 pt)
Merge current bounding box with given point
Parameters:
Parameter | Type | Description |
---|---|---|
pt | Vector3 |
merge(Vector4 pt)
public void merge(Vector4 pt)
Merge current bounding box with given point
Parameters:
Parameter | Type | Description |
---|---|---|
pt | Vector4 |
merge(double x, double y, double z)
public void merge(double x, double y, double z)
Merge current bounding box with given point
Parameters:
Parameter | Type | Description |
---|---|---|
x | double | |
y | double | |
z | double |
mul(BoundingBox bbox, Matrix4 mat)
public static BoundingBox mul(BoundingBox bbox, Matrix4 mat)
Operator overloading for multiply
Parameters:
Parameter | Type | Description |
---|---|---|
bbox | BoundingBox | |
mat | Matrix4 |
Returns: BoundingBox
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
overlapsWith(BoundingBox box)
public boolean overlapsWith(BoundingBox box)
Check if current bounding box overlaps with specified bounding box.
Parameters:
Parameter | Type | Description |
---|---|---|
box | BoundingBox | The other bounding box to test |
Returns: boolean
scale()
public double scale()
Calculates the absolute largest coordinate value of any contained point.
Returns: double
toString()
public String toString()
Gets the string representation of the bounding box.
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |