agi.foundation.geometry.discrete
(agi.foundation.graphics-2024r2.jar)

## Class EllipsoidTriangulator

• ### Method Summary

All Methods
Modifier and Type Method and Description
`static SolidTriangulatorResult` `compute(Cartesian radii)`
Computes the triangulation for an ellipsoid with the specified `radii`, centered at the origin, using 32 slices and 16 stacks.
`static SolidTriangulatorResult` ```compute(Cartesian radii, int slices, int stacks)```
Computes the triangulation for an ellipsoid with the specified `radii`, centered at the origin.
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Method Detail

• #### compute

```public static final SolidTriangulatorResult compute(Cartesian radii,
int slices,
int stacks)```
Computes the triangulation for an ellipsoid with the specified `radii`, centered at the origin. `slices` and `stacks` are used to determine the detail of the triangulation. More `slices` and `stacks` result in a precise ellipsoid but use more memory. `slices` and `stacks` can also be tweaked based on the shape of the ellipsoid. For example if the z radius is much longer than the x and y radius, you may want to use more `stacks` than `slices`.
Parameters:
`radii` - The radii, in meters, of the ellipsoid along each of its axes.
`slices` - The number of slices around the z axis.
`stacks` - The number of stacks along the z axis.
Returns:
A `SolidTriangulatorResult` object representing the triangulation.
Throws:
`ArgumentOutOfRangeException` - `radii`.x, `radii`.y, and `radii`.z must all be greater than or equal to `0`.
`ArgumentOutOfRangeException` - `slices` must be greater than or equal to `3`.
`ArgumentOutOfRangeException` - `stacks` must be greater than or equal to `2`.