autk-map / PipelineTrianglePicking
Class: PipelineTrianglePicking
Defined in: pipeline-triangle-picking.ts:15
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.
Extends
Constructors
Constructor
new PipelineTrianglePicking(
renderer):PipelineTrianglePicking
Defined in: pipeline-triangle-picking.ts:56
Constructor for PipelineTrianglePicking
Parameters
renderer
The renderer instance
Returns
PipelineTrianglePicking
Overrides
Properties
_cameraBindGroup
protected_cameraBindGroup:GPUBindGroup
Defined in: pipeline.ts:39
Camera bind group
Inherited from
_cameraBindGroupLayout
protected_cameraBindGroupLayout:GPUBindGroupLayout
Defined in: pipeline.ts:44
Camera bind group layout
Inherited from
Pipeline._cameraBindGroupLayout
_cMapTexture
protected_cMapTexture:GPUTexture
Defined in: pipeline.ts:61
Color map texture
Inherited from
_colorBuffer
protected_colorBuffer:GPUBuffer
Defined in: pipeline.ts:51
Color uniform buffer
Inherited from
_fragModule
protected_fragModule:GPUShaderModule
Defined in: pipeline-triangle-picking.ts:50
Fragment shader module.
_highlightColorBuffer
protected_highlightColorBuffer:GPUBuffer
Defined in: pipeline.ts:56
Highlight color uniform buffer
Inherited from
Pipeline._highlightColorBuffer
_mviewBuffer
protected_mviewBuffer:GPUBuffer
Defined in: pipeline.ts:27
ModelView matrix uniform buffer
Inherited from
_opacity
protected_opacity:GPUBuffer
Defined in: pipeline.ts:79
Opacity uniform buffer
Inherited from
_projcBuffer
protected_projcBuffer:GPUBuffer
Defined in: pipeline.ts:32
Projection matrix uniform buffer
Inherited from
_renderer
protected_renderer:Renderer
Defined in: pipeline.ts:21
Renderer reference
Inherited from
_renderInfoBindGroup
protected_renderInfoBindGroup:GPUBindGroup
Defined in: pipeline.ts:87
Render information bind group
Inherited from
_renderInfoBindGroupLayout
protected_renderInfoBindGroupLayout:GPUBindGroupLayout
Defined in: pipeline.ts:92
Render information bind group layout
Inherited from
Pipeline._renderInfoBindGroupLayout
_useColorMap
protected_useColorMap:GPUBuffer
Defined in: pipeline.ts:69
Use color map uniform buffer
Inherited from
_useHighlight
protected_useHighlight:GPUBuffer
Defined in: pipeline.ts:74
Use highlight uniform buffer
Inherited from
_vertModule
protected_vertModule:GPUShaderModule
Defined in: pipeline-triangle-picking.ts:44
Vertex shader module.
Methods
build()
build(
mesh):void
Defined in: pipeline-triangle-picking.ts:64
Builds the pipeline with the provided mesh data.
Parameters
mesh
The mesh data containing positions, thematic, and indices
Returns
void
Overrides
createCameraUniformBindGroup()
createCameraUniformBindGroup():
void
Defined in: pipeline.ts:110
Creates the camera uniform bind group.
Returns
void
Inherited from
Pipeline.createCameraUniformBindGroup
createColorUniformBindGroup()
createColorUniformBindGroup():
void
Defined in: pipeline.ts:170
Creates the color uniform bind group.
Returns
void
Inherited from
Pipeline.createColorUniformBindGroup
createShaders()
createShaders():
void
Defined in: pipeline-triangle-picking.ts:77
Creates the vertex and fragment shaders for the pipeline.
Returns
void
createVertexBuffers()
createVertexBuffers(
mesh):void
Defined in: pipeline-triangle-picking.ts:95
Creates the vertex buffers for the pipeline.
Parameters
mesh
The mesh data containing positions, thematic, and indices
Returns
void
Overrides
readPickedId()
readPickedId(
x,y):Promise<number>
Defined in: pipeline-triangle-picking.ts:152
Reads the picked object ID from the picking texture.
Parameters
x
number
The x-coordinate of the pick location
y
number
The y-coordinate of the pick location
Returns
Promise<number>
The picked object ID
renderPass()
renderPass(
camera):void
Defined in: pipeline-triangle-picking.ts:291
Renders the picking pass for the pipeline.
Parameters
camera
The camera instance
Returns
void
Overrides
updateCameraUniforms()
updateCameraUniforms(
camera):void
Defined in: pipeline.ts:157
Updates the camera uniform buffers with the current camera state.
Parameters
camera
The camera instance
Returns
void
Inherited from
updateColorUniforms()
updateColorUniforms(
layer):void
Defined in: pipeline.ts:295
Updates the color uniform buffers with the current layer state.
Parameters
layer
The layer instance
Returns
void
Inherited from
updateVertexBuffers()
updateVertexBuffers(
layer):void
Defined in: pipeline-triangle-picking.ts:119
Updates the vertex buffers with the provided mesh data.
Parameters
layer
The mesh data containing positions, thematic, and indices
Returns
void