BoxGeometry

BoxGeometry

new

Describes a cube centered at the origin.

Parameters:
Name Type Argument Default Description
options.minimumCorner Cartesian3 The minimum x, y, and z coordinates of the box.
options.maximumCorner Cartesian3 The maximum x, y, and z coordinates of the box.
options.vertexFormat VertexFormat <optional>
VertexFormat.DEFAULT The vertex attributes to be computed.
Throws:
Example
var box = new BoxGeometry({
  vertexFormat : VertexFormat.POSITION_ONLY,
  maximumCorner : new Cartesian3(250000.0, 250000.0, 250000.0),
  minimumCorner : new Cartesian3(-250000.0, -250000.0, -250000.0)
});
var geometry = BoxGeometry.createGeometry(box);
See:
  • BoxGeometry#fromDimensions
  • BoxGeometry#createGeometry
Source:

Methods

<static>

Computes the geometric representation of a box, including its vertices, indices, and a bounding sphere.

Parameters:
Name Type Description
boxGeometry BoxGeometry A description of the box.
Returns:
Geometry The computed vertices and indices.

<static>

Creates a cube centered at the origin given its dimensions.

Parameters:
Name Type Argument Default Description
options.dimensions Cartesian3 The width, depth, and height of the box stored in the x, y, and z coordinates of the Cartesian3, respectively.
options.vertexFormat VertexFormat <optional>
VertexFormat.DEFAULT The vertex attributes to be computed.
Throws:
Example
var box = BoxGeometry.fromDimensions({
  vertexFormat : VertexFormat.POSITION_ONLY,
  dimensions : new Cartesian3(500000.0, 500000.0, 500000.0)
});
var geometry = BoxGeometry.createGeometry(box);
See:
  • BoxGeometry#createGeometry