new EllipsoidGeometry()
Used to define classes of ellipsoidal geometric structures.
| Name | Type | Default | Description |
|---|---|---|---|
options.radii |
Cartesian3 | Cartesian3(1.0, 1.0, 1.0) |
optional
The radius of an ellipsoid in the x, y, and z directions. |
options.stackPartitions |
Number | 64 |
optional
The number of times an ellipsoid is divided into stacks. |
options.slicePartitions |
Number | 64 |
optional
The number of times the ellipsoid is divided into radial slices. |
options.vertexFormat |
VertexFormat | VertexFormat.DEFAULT |
optional
The vertex attributes to be calculated. |
- See:
-
- EllipsoidGeometry#createGeometry
Throws:
-
-
options.slicePartitions cannot be less than three.
- Type
- DeveloperError
-
-
-
options.stackPartitions cannot be less than three.
- Type
- DeveloperError
-
Example
var ellipsoid = new SuperMap3D.EllipsoidGeometry({
vertexFormat : SuperMap3D.VertexFormat.POSITION_ONLY,
radii : new SuperMap3D.Cartesian3(1000000.0, 500000.0, 500000.0)
});
var geometry = SuperMap3D.EllipsoidGeometry.createGeometry(ellipsoid);
Members
-
static packedLengthNumber
-
The number of elements used to package an object into an array.
Methods
-
static createGeometry(ellipsoidGeometry){Geometry|undefined}
-
Calculate the geometric representation of an ellipsoid, including its vertices, indices, and enclosing spheres.
Name Type Description ellipsoidGeometryEllipsoidGeometry A description of an ellipsoid.
Returns:
Type Description Geometry | undefined Compute vertices and indexes. -
static pack(value, array, startingIndex){Array.<Number>}
-
Store the provided instance in the provided array.
Name Type Default Description valueEllipsoidGeometry The value to be packaged.
arrayArray.<Number> The array to be packaged.
startingIndexNumber 0 optional Start packaging the array index of elements.
Returns:
Type Description Array.<Number> The loaded array. -
static unpack(array, startingIndex, result){EllipsoidGeometry}
-
Retrieve instances from the packaged array.
Name Type Default Description arrayArray.<Number> Packaged array.
startingIndexNumber 0 optional The starting index of the element to be unpacked.
resultEllipsoidGeometry optional The object that stores the results.
Returns:
Type Description EllipsoidGeometry The modified result parameters or a new EllipsoidGeometry instance (if not provided).