Interface ShellGeneratorResult

Complete shell generation result.

Coordinate contract:

A runtime shell should therefore create geometry from positions and place the mesh at center. Do not add center to the positions before upload, or the shell will be translated twice.

interface ShellGeneratorResult {
    aabb: [number, number, number, number, number, number];
    center: [number, number, number];
    indices: number[];
    positions: number[];
    radius: number;
    stats: ShellGenerationStats;
}

Properties

aabb: [number, number, number, number, number, number]

Shell-local axis-aligned bounding box, in the same coordinate space as positions, as [xmin, ymin, zmin, xmax, ymax, zmax].

center: [number, number, number]

World/model-space center used as the shell mesh origin.

indices: number[]

Triangle index array for positions.

positions: number[]

Flat XYZ position array for the generated shell.

Coordinates are relative to center. Add center only when converting a vertex to world/model coordinates for inspection.

radius: number

Bounding-sphere radius for projected-size LOD decisions.

Generation metrics.