@JsType(isNative=true, namespace="Cesium", name="AxisAlignedBoundingBox") public class AxisAlignedBoundingBox extends Object
Modifier and Type | Field and Description |
---|---|
Cartesian3 |
center
The center point of the bounding box.
|
Cartesian3 |
maximum
The maximum point defining the bounding box.
|
Cartesian3 |
minimum
The minimum point defining the bounding box.
|
Constructor and Description |
---|
AxisAlignedBoundingBox()
Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
|
AxisAlignedBoundingBox(Cartesian3 minimum)
Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
|
AxisAlignedBoundingBox(Cartesian3 minimum,
Cartesian3 maximum)
Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
|
AxisAlignedBoundingBox(Cartesian3 minimum,
Cartesian3 maximum,
Cartesian3 center)
Creates an instance of an AxisAlignedBoundingBox from the minimum and maximum points along the x, y, and z axes.
|
Modifier and Type | Method and Description |
---|---|
static AxisAlignedBoundingBox |
clone(AxisAlignedBoundingBox box)
Duplicates a AxisAlignedBoundingBox instance.
|
static AxisAlignedBoundingBox |
clone(AxisAlignedBoundingBox box,
AxisAlignedBoundingBox result)
Duplicates a AxisAlignedBoundingBox instance.
|
static boolean |
equals(AxisAlignedBoundingBox left)
Compares the provided AxisAlignedBoundingBox componentwise and returns true if they are equal, false otherwise.
|
static boolean |
equals(AxisAlignedBoundingBox left,
AxisAlignedBoundingBox right)
Compares the provided AxisAlignedBoundingBox componentwise and returns true if they are equal, false otherwise.
|
static AxisAlignedBoundingBox |
fromPoints(Cartesian3[] positions,
AxisAlignedBoundingBox result)
Computes an instance of an AxisAlignedBoundingBox.
|
static Integer |
intersectPlane(AxisAlignedBoundingBox box,
Plane plane)
Determines which side of a plane a box is located.
|
int |
intersectPlane(Plane plane)
Determines which side of a plane this box is located.
|
@JsProperty public Cartesian3 center
@JsProperty public Cartesian3 maximum
Cartesian3.ZERO()
@JsProperty public Cartesian3 minimum
Cartesian3.ZERO()
@JsConstructor public AxisAlignedBoundingBox()
BoundingSphere
,
BoundingRectangle
@JsConstructor public AxisAlignedBoundingBox(Cartesian3 minimum)
minimum
- The minimum point along the x, y, and z axes.BoundingSphere
,
BoundingRectangle
@JsConstructor public AxisAlignedBoundingBox(Cartesian3 minimum, Cartesian3 maximum)
minimum
- The minimum point along the x, y, and z axes.maximum
- The maximum point along the x, y, and z axes.BoundingSphere
,
BoundingRectangle
@JsConstructor public AxisAlignedBoundingBox(Cartesian3 minimum, Cartesian3 maximum, Cartesian3 center)
minimum
- The minimum point along the x, y, and z axes.maximum
- The maximum point along the x, y, and z axes.center
- The center of the box; automatically computed if not supplied.BoundingSphere
,
BoundingRectangle
@JsMethod public static AxisAlignedBoundingBox clone(AxisAlignedBoundingBox box)
box
- The bounding box to duplicate.@JsMethod public static AxisAlignedBoundingBox clone(AxisAlignedBoundingBox box, AxisAlignedBoundingBox result)
box
- The bounding box to duplicate.result
- The object onto which to store the result.@JsMethod public static boolean equals(AxisAlignedBoundingBox left)
left
- The first AxisAlignedBoundingBox.@JsMethod public static boolean equals(AxisAlignedBoundingBox left, AxisAlignedBoundingBox right)
left
- The first AxisAlignedBoundingBox.right
- The second AxisAlignedBoundingBox.@JsMethod public static AxisAlignedBoundingBox fromPoints(Cartesian3[] positions, AxisAlignedBoundingBox result)
positions
- List of points that the bounding box will enclose. Each point must have a x, y, and z properties.result
- The object onto which to store the result.@JsMethod public static Integer intersectPlane(AxisAlignedBoundingBox box, Plane plane)
box
- The bounding box to test.plane
- The plane to test against.Intersect.INSIDE()
if the entire box is on the side of the plane the
normal is pointing, Intersect.OUTSIDE()
if the entire box is on the opposite side, and Intersect.INTERSECTING()
if the box intersects the plane.@JsMethod public int intersectPlane(Plane plane)
plane
- The plane to test against.Intersect.INSIDE()
if the entire box is on the side of the plane the
normal is pointing, Intersect.OUTSIDE()
if the entire box is on the opposite side, and Intersect.INTERSECTING()
if the box intersects the plane.Copyright © 2019. All rights reserved.