new BoxOutlineGeometry(options)
A description of the outline of a cube centered at the origin.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Object with the following properties:
Properties
|
- Source:
- See:
Example
var box = new Cesium.BoxOutlineGeometry({
maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
minimum : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0)
});
var geometry = Cesium.BoxOutlineGeometry.createGeometry(box);
Members
(static) packedLength :Number
The number of elements used to pack the object into an array.
Type:
- Number
- Source:
Methods
(static) createGeometry(boxGeometry) → {Geometry|undefined}
Computes the geometric representation of an outline of a box, including its vertices, indices, and a bounding sphere.
Parameters:
Name | Type | Description |
---|---|---|
boxGeometry |
BoxOutlineGeometry | A description of the box outline. |
- Source:
Returns:
The computed vertices and indices.
- Type
- Geometry | undefined
(static) fromAxisAlignedBoundingBox(boundingBox) → {BoxOutlineGeometry}
Creates an outline of a cube from the dimensions of an AxisAlignedBoundingBox.
Parameters:
Name | Type | Description |
---|---|---|
boundingBox |
AxisAlignedBoundingBox | A description of the AxisAlignedBoundingBox. |
Returns:
- Type
- BoxOutlineGeometry
Example
var aabb = Cesium.AxisAlignedBoundingBox.fromPoints(Cesium.Cartesian3.fromDegreesArray([
-72.0, 40.0,
-70.0, 35.0,
-75.0, 30.0,
-70.0, 30.0,
-68.0, 40.0
]));
var box = Cesium.BoxOutlineGeometry.fromAxisAlignedBoundingBox(aabb);
(static) fromDimensions(options) → {BoxOutlineGeometry}
Creates an outline of a cube centered at the origin given its dimensions.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
options |
Object | Object with the following properties:
Properties
|
Throws:
-
All dimensions components must be greater than or equal to zero.
- Type
- DeveloperError
Returns:
- Type
- BoxOutlineGeometry
Example
var box = Cesium.BoxOutlineGeometry.fromDimensions({
dimensions : new Cesium.Cartesian3(500000.0, 500000.0, 500000.0)
});
var geometry = Cesium.BoxOutlineGeometry.createGeometry(box);
(static) pack(value, array, startingIndexopt) → {Array.<Number>}
Stores the provided instance into the provided array.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
value |
BoxOutlineGeometry | The value to pack. | ||
array |
Array.<Number> | The array to pack into. | ||
startingIndex |
Number |
<optional> |
0 | The index into the array at which to start packing the elements. |
- Source:
Returns:
The array that was packed into
- Type
- Array.<Number>
(static) unpack(array, startingIndexopt, resultopt) → {BoxOutlineGeometry}
Retrieves an instance from a packed array.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
array |
Array.<Number> | The packed array. | ||
startingIndex |
Number |
<optional> |
0 | The starting index of the element to be unpacked. |
result |
BoxOutlineGeometry |
<optional> |
The object into which to store the result. |
- Source:
Returns:
The modified result parameter or a new BoxOutlineGeometry instance if one was not provided.
- Type
- BoxOutlineGeometry