Documentation - v20.0.0-dev
    Preparing search index...

    Buffers of one geometry, in its local frame, in the .mgeom formats. Several InputMesh can share one: the MeshController copies it once, into a GeometryContainer.

    Only the lengths are checked, not the index values: scanning every index would cost as much as the copy itself.

    Index

    Constructors

    Properties

    boundingBox: Box3

    Local bounds; computed from the positions when not given.

    edges: IndexArray | null

    Sharp edges of the triangles, 2 indices each, local to the geometry; null when none.

    id: string

    Identifies the geometry: two GeometryBuffers with the same id are the same geometry.

    indices: IndexArray

    Triangles, 3 indices each, or segments of lines, 2 each; local to the geometry.

    normals: Int8Array<ArrayBufferLike> | null

    xyz snorm8, 3 bytes per vertex; (0, 0, 0) on the flat triangles, shaded with their face normal. Null when the geometry has none: every triangle is flat.

    positions: Float32Array

    xyz, 3 floats per vertex.

    Triangles (drawn with their sharp edges) or lines.

    Accessors

    • get edgeCount(): number

      Segment indices (2 per segment), stored in a Container's segments: the triangles' sharp edges, or the lines.

      Returns number

    • get indexCount(): number

      Triangle indices (3 per triangle), stored in a Container's indices; 0 for lines.

      Returns number

    • get vertexCount(): number

      Vertices (positions / 3).

      Returns number