Class VectorLayer

Source
Expand description

Vector layer class extends Layer to handle vector data. It manages the positions, thematic data, indices, and components of the layer, as well as the rendering pipelines.

Constructors§

Source§

new VectorLayer(
    layerInfo: ILayerInfo,
    layerRenderInfo: ILayerRenderInfo,
    layerData: ILayerData,
    dimension?: number,
): VectorLayer

Constructor for Triangles2DLayer

Properties§

Source§

protected _components: ILayerComponent[] = []

Components of the layer.

Source§

protected _dataIsDirty: boolean = false

Indicates if the layer's data is dirty. This is used to determine if VOBs need to be reconstructed.

Source§

protected _dimension: number

Dimension of the layer.

Source§

protected _highlightedIds: Set<number>

Highlighted IDs of the layer. This is a set to ensure uniqueness of highlighted IDs.

Source§

protected _highlightedVertices: number[]

Highlighted vertices of the layer.

Source§

protected _indices: number[]

Indices of the triangles.

Source§

protected _layerInfo: ILayerInfo

Layer information.

Source§

protected _layerRenderInfo: ILayerRenderInfo

Layer rendering information.

Source§

protected _pipeline: Pipeline

Rendering pipeline for the layer.

Source§

protected _pipelinePicking: PipelineTrianglePicking

Pipeline for picking triangles.

Source§

protected _position: number[]

Positions of the triangles.

Source§

protected _renderInfoIsDirty: boolean = false

Indicates if the layer's rendering information is dirty. This is used to determine if uniforms need to be reloaded.

Source§

protected _skippedIds: Set<number>

Skipped IDs of the layer. This is a set to ensure uniqueness of skipped IDs.

Source§

protected _skippedVertices: number[]

Skipped vertices of the layer.

Source§

protected _thematic: number[]

Thematic data for the layer.

Accessors§

Source§

get components(): ILayerComponent[]

Get the components of the layer.

Source§

get highlightedIds(): number[]

Gets the IDs of the highlighted components in the layer.

Source§

get highlightedVertices(): number[]

Gets the highlighted vertices of the layer.

Source§

get indices(): number[]

Get the indices of the triangles.

Source§

get layerInfo(): ILayerInfo

Gets the information of the layer.

Source§

set layerInfo(layerInfo: ILayerInfo): void

Sets the information of the layer.

Source§

get layerRenderInfo(): ILayerRenderInfo

Gets the rendering information of the layer.

Source§

set layerRenderInfo(layerRenderInfo: ILayerRenderInfo): void

Sets the rendering information of the layer.

Source§

get position(): number[]

Get the positions of the triangles.

Source§

get skippedIds(): number[]

Gets the IDs of the skipped components in the layer.

Source§

get skippedVertices(): number[]

Gets the skipped vertices of the layer.

Source§

get thematic(): number[]

Get the thematic data of the layer.

Methods§

Source§

clearHighlightedIds(): void

Clears the highlighted components of the layer.

Source§

clearSkippedIds(): void

Clears the skipped components of the layer.

Source§

createPipeline(renderer: Renderer): void

Create the rendering pipeline for the layer.

Source§

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

Get the picked ID at the specified screen coordinates.

Source§

loadComponent(layerComponents: ILayerComponent[]): void

Load the components of the layer.

Source§

loadGeometry(layerGeometry: ILayerGeometry[]): void

Load the geometry data for the layer.

Source§

loadLayerData(layerData: ILayerData): void

Load the layer data, including geometry and components.

Source§

loadThematic(layerThematic: ILayerThematic[]): void

Load the thematic data for the layer.

Source§

makeLayerDataDirty(): void

Marks the layer's data as dirty, indicating that VOBs need to be reconstructed.

Source§

makeLayerRenderInfoDirty(): void

Marks the layer's rendering information as dirty, indicating uniforms need to be reloaded.

Source§

renderPass(camera: Camera): void

Render the layer for the current pass.

Source§

renderPickingPass(camera: Camera): void

Render the picking pass for the layer.

Source§

setHighlightedIds(ids: number[]): void

Set highlighted IDs for the layer.

Source§

setSkippedIds(ids: number[]): void

Set skipped IDs for the layer.