import { BufferGeometry, Camera, Color, Material, RawShaderMaterial, Scene, Texture, Vector3, Vector4, WebGLRenderer } from 'three'; import { PointCloudOctree } from '../point-cloud-octree'; import { PointCloudOctreeNode } from '../point-cloud-octree-node'; import { ClipMode, IClipBox } from './clipping'; import { PointCloudMixingMode, PointColorType, PointOpacityType, PointShape, PointSizeType, TreeType } from './enums'; import { IClassification, IGradient, IUniform } from './types'; export interface IPointCloudMaterialParameters { size: number; minSize: number; maxSize: number; treeType: TreeType; colorRgba: boolean; } export interface IPointCloudMaterialUniforms { bbSize: IUniform<[number, number, number]>; blendDepthSupplement: IUniform; blendHardness: IUniform; classificationLUT: IUniform; clipBoxCount: IUniform; clipBoxes: IUniform; clipExtent: IUniform<[number, number, number, number]>; depthMap: IUniform; diffuse: IUniform<[number, number, number]>; fov: IUniform; gradient: IUniform; heightMax: IUniform; heightMin: IUniform; intensityBrightness: IUniform; intensityContrast: IUniform; intensityGamma: IUniform; intensityRange: IUniform<[number, number]>; level: IUniform; maxSize: IUniform; minSize: IUniform; octreeSize: IUniform; opacity: IUniform; pcIndex: IUniform; rgbBrightness: IUniform; rgbContrast: IUniform; rgbGamma: IUniform; screenHeight: IUniform; screenWidth: IUniform; size: IUniform; spacing: IUniform; toModel: IUniform; transition: IUniform; uColor: IUniform; visibleNodes: IUniform; vnStart: IUniform; wClassification: IUniform; wElevation: IUniform; wIntensity: IUniform; wReturnNumber: IUniform; wRGB: IUniform; wSourceID: IUniform; opacityAttenuation: IUniform; filterByNormalThreshold: IUniform; classificationFilter: IUniform; highlightedPointCoordinate: IUniform; highlightedPointColor: IUniform; enablePointHighlighting: IUniform; highlightedPointScale: IUniform; normalFilteringMode: IUniform; backgroundMap: IUniform; pointCloudID: IUniform; pointCloudMixAngle: IUniform; stripeDistanceX: IUniform; stripeDistanceY: IUniform; stripeDivisorX: IUniform; stripeDivisorY: IUniform; pointCloudMixingMode: IUniform; renderDepth: IUniform; } export declare class PointCloudMaterial extends RawShaderMaterial { private static helperVec3; private static helperVec2; /** * Use the drawing buffer size instead of the dom client width and height when passing the screen height and screen width uniforms to the * shader. This is useful if you have offscreen canvases (which in some browsers return 0 as client width and client height). */ useDrawingBufferSize: boolean; lights: boolean; fog: boolean; colorRgba: boolean; numClipBoxes: number; clipBoxes: IClipBox[]; visibleNodesTexture: Texture | undefined; visibleNodeTextureOffsets: Map; private _gradient; private gradientTexture; private _classification; private classificationTexture; uniforms: IPointCloudMaterialUniforms & Record>; bbSize: [number, number, number]; clipExtent: [number, number, number, number]; depthMap: Texture | undefined; fov: number; heightMax: number; heightMin: number; intensityBrightness: number; intensityContrast: number; intensityGamma: number; intensityRange: [number, number]; maxSize: number; minSize: number; octreeSize: number; opacity: number; rgbBrightness: number; rgbContrast: number; rgbGamma: number; screenHeight: number; screenWidth: number; size: number; spacing: number; transition: number; color: Color; weightClassification: number; weightElevation: number; weightIntensity: number; weightReturnNumber: number; weightRGB: number; weightSourceID: number; opacityAttenuation: number; filterByNormalThreshold: number; classificationFilter: boolean[]; highlightedPointCoordinate: Vector3; highlightedPointColor: Vector4; enablePointHighlighting: boolean; highlightedPointScale: number; normalFilteringMode: number; backgroundMap: Texture | undefined; pointCloudID: number; pointCloudMixingMode: number; stripeDistanceX: number; stripeDistanceY: number; stripeDivisorX: number; stripeDivisorY: number; pointCloudMixAngle: number; renderDepth: boolean; useClipBox: boolean; weighted: boolean; pointColorType: PointColorType; pointSizeType: PointSizeType; clipMode: ClipMode; useEDL: boolean; shape: PointShape; treeType: TreeType; pointOpacityType: PointOpacityType; useFilterByNormal: boolean; useFilterByClassification: boolean; useTextureBlending: boolean; usePointCloudMixing: boolean; highlightPoint: boolean; attributes: { position: { type: string; value: never[]; }; color: { type: string; value: never[]; }; normal: { type: string; value: never[]; }; intensity: { type: string; value: never[]; }; classification: { type: string; value: never[]; }; returnNumber: { type: string; value: never[]; }; numberOfReturns: { type: string; value: never[]; }; pointSourceID: { type: string; value: never[]; }; indices: { type: string; value: never[]; }; }; constructor(parameters?: Partial); dispose(): void; clearVisibleNodeTextureOffsets(): void; updateShaderSource(): void; applyDefines(shaderSrc: string): string; setPointCloudMixingMode(mode: PointCloudMixingMode): void; getPointCloudMixingMode(): PointCloudMixingMode; setClipBoxes(clipBoxes: IClipBox[]): void; get gradient(): IGradient; set gradient(value: IGradient); get classification(): IClassification; set classification(value: IClassification); private recomputeClassification; get elevationRange(): [number, number]; set elevationRange(value: [number, number]); getUniform(name: K): IPointCloudMaterialUniforms[K]['value']; setUniform(name: K, value: IPointCloudMaterialUniforms[K]['value']): void; updateMaterial(octree: PointCloudOctree, visibleNodes: PointCloudOctreeNode[], camera: Camera, renderer: WebGLRenderer): void; private updateVisibilityTextureData; static makeOnBeforeRender(octree: PointCloudOctree, node: PointCloudOctreeNode, pcIndex?: number): (_renderer: WebGLRenderer, _scene: Scene, _camera: Camera, _geometry: BufferGeometry, material: Material) => void; }