Documentation - v19.16.0-dev
    Preparing search index...

    An object of a MeshController, as addMeshes returns it and its hits give it back (MeshHit.mesh): reads and changes its object's state in the controller, which holds it (no state of its own). Removed (removeMeshes, clear), it is no longer isValid: its setters do nothing, its getters throw.

    The changes are as fast one object at a time as many at once: the tree's commands of a task are merged (see BoxTree).

    Index

    Properties

    owner: unknown = null

    The application's object for this one, free (e.g. the viewer's mesh): set it when the object is added, read it back from a hit. Cleared when the object is removed.

    Accessors

    • get ignoreCuttingPlanes(): boolean

      Whether it is left whole whatever the scene's cutting planes (see CuttingPlanesController): every part drawn, culled and picked as without planes.

      Returns boolean

    • set ignoreCuttingPlanes(ignore: boolean): void

      Parameters

      • ignore: boolean

      Returns void

    • get isValid(): boolean

      Whether its object is still in the controller.

      Returns boolean

    • get layer(): MeshLayer

      Its own layer (see MeshLayer), whether it is drawn in it or over the others (selected with the controller's selectionOverlay).

      Returns MeshLayer

    • set layer(layer: MeshLayer): void

      Parameters

      Returns void

    • get partCount(): number

      How many parts its object has.

      Returns number

    • get selected(): boolean

      Whether it is selected: every part drawn in the selection colours, and in the top layer with the controller's selectionOverlay.

      Returns boolean

    • set selected(selected: boolean): void

      Parameters

      • selected: boolean

      Returns void

    • get visible(): boolean

      Whether it is shown: every part.

      Returns boolean

    • set visible(visible: boolean): void

      Parameters

      • visible: boolean

      Returns void

    • get xRay(): boolean

      Whether it is seen through: the opacity of every part and its edges' multiplied by the controller's xRayOpacity, its own opacity kept.

      Returns boolean

    • set xRay(xRay: boolean): void

      Parameters

      • xRay: boolean

      Returns void

    Methods

    • Moves it: applies transform (affine) to the world matrix of every part.

      Parameters

      • transform: Matrix4

      Returns void

    • World bounds: the union of its parts' boxes, written to target.

      Parameters

      • target: Box3

      Returns Box3

    • Diffuse colour of its part at rank part (its first by default), written to target.

      Parameters

      • target: Color
      • part: number = 0

      Returns Color

    • Colour of the sharp edges of its part at rank part (its first by default), written to target.

      Parameters

      • target: Color
      • part: number = 0

      Returns Color

    • Emissive colour of its part at rank part (its first by default), written to target.

      Parameters

      • target: Color
      • part: number = 0

      Returns Color

    • World matrix of its part at rank part (its first by default), 4x4 column-major, written to target.

      Parameters

      • target: Float32Array
      • part: number = 0

      Returns Float32Array

    • Metalness, in 0..1, of its part at rank part (its first by default).

      Parameters

      • part: number = 0

      Returns number

    • Opacity, in 0..1, of its part at rank part (its first by default).

      Parameters

      • part: number = 0

      Returns number

    • Roughness, in 0..1, of its part at rank part (its first by default).

      Parameters

      • part: number = 0

      Returns number

    • Sets the diffuse colour (stored as 8-bit sRGB) of every part, or of its part at part.

      Parameters

      • color: Color
      • Optionalpart: number

      Returns void

    • Sets the colour of the sharp edges (8-bit sRGB) of every part, or of its part at part.

      Parameters

      • color: Color
      • Optionalpart: number

      Returns void

    • Sets the emissive colour (stored as 8-bit sRGB) of every part, or of its part at part.

      Parameters

      • color: Color
      • Optionalpart: number

      Returns void

    • Sets the metalness, in 0..1, of every part, or of its part at rank part.

      Parameters

      • metalness: number
      • Optionalpart: number

      Returns void

    • Sets the opacity, in 0..1, of every part, or of its part at rank part.

      Parameters

      • opacity: number
      • Optionalpart: number

      Returns void

    • Sets the roughness, in 0..1, of every part, or of its part at rank part.

      Parameters

      • roughness: number
      • Optionalpart: number

      Returns void