Class PipelineTrianglePicking

Source
Expand description

PipelineTrianglePicking is a rendering pipeline for picking triangles in 2D space. It uses WebGPU to render triangles and allows for picking by encoding object IDs in vertex colors.

Constructors§

Source§

new PipelineTrianglePicking(renderer: Renderer): PipelineTrianglePicking

Constructor for PipelineTrianglePicking

Properties§

Source§

protected _cameraBindGroup: GPUBindGroup

Camera bind group

Source§

protected _cameraBindGroupLayout: GPUBindGroupLayout

Camera bind group layout

Source§

protected _cMapTexture: GPUTexture

Color map texture

Source§

protected _colorBuffer: GPUBuffer

Color uniform buffer

Source§

protected _fragModule: GPUShaderModule

Fragment shader module.

Source§

protected _highlightColorBuffer: GPUBuffer

Highlight color uniform buffer

Source§

protected _mviewBuffer: GPUBuffer

ModelView matrix uniform buffer

Source§

protected _opacity: GPUBuffer

Opacity uniform buffer

Source§

protected _projcBuffer: GPUBuffer

Projection matrix uniform buffer

Source§

protected _renderer: Renderer

Renderer reference

Source§

protected _renderInfoBindGroup: GPUBindGroup

Render information bind group

Source§

protected _renderInfoBindGroupLayout: GPUBindGroupLayout

Render information bind group layout

Source§

protected _useColorMap: GPUBuffer

Use color map uniform buffer

Source§

protected _useHighlight: GPUBuffer

Use highlight uniform buffer

Source§

protected _vertModule: GPUShaderModule

Vertex shader module.

Methods§

Source§

build(mesh: VectorLayer): void

Builds the pipeline with the provided mesh data.

Source§

createCameraUniformBindGroup(): void

Creates the camera uniform bind group.

Source§

createColorUniformBindGroup(): void

Creates the color uniform bind group.

Source§

createShaders(): void

Creates the vertex and fragment shaders for the pipeline.

Source§

createVertexBuffers(mesh: VectorLayer): void

Creates the vertex buffers for the pipeline.

Source§

readPickedId(x: number, y: number): Promise<number>

Reads the picked object ID from the picking texture.

Source§

renderPass(camera: Camera): void

Renders the picking pass for the pipeline.

Source§

updateCameraUniforms(camera: Camera): void

Updates the camera uniform buffers with the current camera state.

Source§

updateColorUniforms(layer: Layer): void

Updates the color uniform buffers with the current layer state.

Source§

updateVertexBuffers(layer: VectorLayer): void

Updates the vertex buffers with the provided mesh data.