Interface GeometryView

The getSceneObjectGeometry passes an instance of GeometryView to its callback for each SceneGeometry it visits.

The GeometryView provides the SceneObject, SceneMesh and SceneGeometry at the current state of iteration, along with accessors through which the caller can get various resources that the GeometryView lazy-computes on-demand, such as decompressed vertex positions, World-space vertex positons, and decompressed vertex UV coordinates.

interface GeometryView {
    geometry: SceneGeometry;
    mesh: SceneMesh;
    meshIndex: number;
    numPrimitives: number;
    object: SceneObject;
    positionsDecompressed: FloatArrayParam;
    positionsWorld: FloatArrayParam;
    uvsDecompressed: FloatArrayParam;
}

Properties

geometry: SceneGeometry

The current SceneGeometry.

mesh: SceneMesh

The current SceneMesh.

meshIndex: number

The current SceneMesh's position in SceneObject.meshes.

numPrimitives: number

The number of primitives in the current SceneGeometry.

object: SceneObject

The current SceneObject.

positionsDecompressed: FloatArrayParam

The current 3D vertex positions, dequantized, as 32-bit floats.

positionsWorld: FloatArrayParam

The current 3D World-space vertex positions, dequantized and world-transformed, as 64-bit floats.

uvsDecompressed: FloatArrayParam

The current vertex UV coordinates, if any, dequantized to 32-bit floats.