new SphereGeometry
A Geometry that represents vertices and indices for an ellipse on the ellipsoid. Creates vertices and indices for an sphere centered at the origin.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
options.radius |
Number |
<optional> |
1.0 | The radius of the sphere. |
options.numberOfPartitions |
Number |
<optional> |
32 | The number of times to partition the sphere in a plane formed by two radii in a single quadrant. |
options.vertexFormat |
VertexFormat |
<optional> |
VertexFormat.DEFAULT | The vertex attributes to be computed. |
Throws:
DeveloperError
: options.numberOfPartitions must be greater than zero.
Example
var sphere = new SphereGeometry({ radius : 100.0, vertexFormat : VertexFormat.POSITION_ONLY });
Source:
Members
-
attributes :Object
-
An object containing GeometryAttribute properties named after each of the
true
values 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.