new BoxGeometry
A Geometry that represents vertices and indices for 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:
- 
DeveloperError : options.minimumCorner is required.
- 
DeveloperError : options.maximumCorner is required.
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)
});
    
	
	
Source:
Members
- 
    attributes :GeometryAttributes
- 
    
    An object containing GeometryAttribute properties named after each of thetruevalues of the VertexFormat option.See:
- 
    boundingSphere :BoundingSphere
- 
    
    A tight-fitting bounding sphere that encloses the vertices of the geometry.
- 
    indices :Array
- 
    
    Index data that, along with Geometry#primitiveType, determines the primitives in the geometry.
- 
    primitiveType :PrimitiveType
- 
    
    The type of primitives in the geometry. For this geometry, it is PrimitiveType.TRIANGLES.
Methods
- 
    <static> fromDimensions
- 
    
    
    Creates vertices and indices for a cube centered at the origin given its dimensions. Parameters:Name Type Argument Default Description options.dimensionsCartesian3 The width, depth, and height of the box stored in the x, y, and z coordinates of the Cartesian3, respectively.options.vertexFormatVertexFormat <optional> 
 VertexFormat.DEFAULT The vertex attributes to be computed. Throws:- 
DeveloperError : options.dimensions is required.
- 
DeveloperError : All dimensions components must be greater than or equal to zero.
 Examplevar box = BoxGeometry.fromDimensions({ vertexFormat : VertexFormat.POSITION_ONLY, dimensions : new Cartesian3(500000.0, 500000.0, 500000.0) });
- 
