@twinfinity/core
    Preparing search index...

    Interface TextureObject

    Represents a single object (hence a single pixel) in the GPU picking texture. Should be created by calling to Materials.createGpuTextureObject instead of using constructor directly.

    interface TextureObject {
        id: number;
        get color(): Color4;
        assignGpuPickingMaterial(mesh: Mesh): void;
        assignUVKind(mesh: Mesh): void;
        buildGpuPickable(mesh: Mesh): void;
        dispose(): void;
    }
    Index

    Properties

    id: number

    Unique object identifier (represents location in GPU picking texture).

    Accessors

    • get color(): Color4

      Gets the color of the texture object (pixel).

      Returns Color4

    Methods

    • Replaces the material on the mesh with a GPU picking material. Combined with a call to assignUVKind this will ensure that the mesh is rendered with a unique color.

      Parameters

      • mesh: Mesh

        Mesh to relace material on.

      Returns void

    • Replaces the UV coordiates on the specified mesh. Combined with a call to assignGpuPickingMaterial this will make sure that the mesh is rendered with a unique color.

      Parameters

      • mesh: Mesh

        Mesh to replace UV coordinates on.

      Returns void

    • Replaces both material and UV coordinates on the specified mesh. Ensures that the mesh is rendered with a unique color.

      Parameters

      • mesh: Mesh

        Mesh to render with a unique color.

      Returns void