potree-core
Version:
Potree wrapper for three.js applications
116 lines (115 loc) • 4.19 kB
TypeScript
import { Box3, Camera, Object3D, Ray, Sphere, WebGLRenderer } from 'three';
import { PointCloudMaterial, PointSizeType } from './materials';
import { PointCloudOctreeGeometryNode } from './point-cloud-octree-geometry-node';
import { PointCloudOctreeNode } from './point-cloud-octree-node';
import { PickParams } from './point-cloud-octree-picker';
import { PointCloudTree } from './point-cloud-tree';
import { IPointCloudTreeNode, IPotree, PickPoint, PCOGeometry } from './types';
export declare class PointCloudOctree extends PointCloudTree {
/**
* The name of the point cloud octree.
*/
potree: IPotree;
/**
* Indicates whether the point cloud octree has been disposed.
*
* This is set to true when the octree is disposed, and can be used to check if the octree is still valid.
*/
disposed: boolean;
/**
* The geometry of the point cloud octree.
*
* This contains the root node and other properties related to the point cloud geometry.
*/
pcoGeometry: PCOGeometry;
/**
* The bounding box of the point cloud octree.
*
* This is used to define the spatial extent of the point cloud.
*/
boundingBox: Box3;
/**
* The bounding sphere of the point cloud octree.
*
* This is used for spatial queries and to determine visibility.
*/
boundingSphere: Sphere;
/**
* The position of the point cloud octree in the 3D space.
*
* This is used to position the octree in the scene.
*/
level: number;
/**
* The maximum level of detail for the point cloud octree.
*
* This is used to limit the depth of the octree when rendering or processing.
*/
maxLevel: number;
/**
* The minimum radius of a node's bounding sphere on the screen in order to be displayed.
*/
minNodePixelSize: number;
/**
* The root node of the point cloud octree.
*/
root: IPointCloudTreeNode | null;
/**
* Bounding box nodes for visualization.
*/
boundingBoxNodes: Object3D[];
/**
* An array of visible nodes in the point cloud octree.
*
* These nodes are currently visible in the scene and can be rendered.
*/
visibleNodes: PointCloudOctreeNode[];
/**
* An array of visible geometry nodes in the point cloud octree.
*
* These nodes contain the geometry data for rendering and are currently visible.
*/
visibleGeometry: PointCloudOctreeGeometryNode[];
/**
* The number of visible points in the point cloud octree.
*
* This is used to keep track of how many points are currently visible in the scene.
*/
numVisiblePoints: number;
/**
* Indicates whether the bounding box should be shown in the scene.
*
* This can be toggled to visualize the spatial extent of the point cloud octree.
*/
showBoundingBox: boolean;
private _material;
/**
* The bounds of the visible area in the point cloud octree.
*
* This is used to determine which nodes are currently visible based on the camera's frustum.
*/
private visibleBounds;
/**
* The picker used for picking points in the point cloud octree.
*
* This is used to interact with the point cloud, such as selecting points or querying information.
*/
private picker;
constructor(potree: IPotree, pcoGeometry: PCOGeometry, material?: PointCloudMaterial);
dispose(): void;
get material(): PointCloudMaterial;
set material(material: PointCloudMaterial);
get pointSizeType(): PointSizeType;
set pointSizeType(value: PointSizeType);
toTreeNode(geometryNode: PointCloudOctreeGeometryNode, parent?: PointCloudOctreeNode | null): PointCloudOctreeNode;
updateVisibleBounds(): void;
updateBoundingBoxes(): void;
updateMatrixWorld(force: boolean): void;
hideDescendants(object: Object3D): void;
moveToOrigin(): void;
moveToGroundPlane(): void;
getBoundingBoxWorld(): Box3;
getVisibleExtent(): Box3;
pick(renderer: WebGLRenderer, camera: Camera, ray: Ray, params?: Partial<PickParams>): PickPoint | null;
get progress(): number;
}