@cognite/reveal 4.25.3 → 4.25.4-dev.20250820

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,6 +78,7 @@ export declare class Overlay3DCollection<MetadataType = DefaultOverlay3DContentT
78
78
  private rebuildOctree;
79
79
  private updatePointsObject;
80
80
  private initializeOverlay3DIcons;
81
+ private updatePointScale;
81
82
  /**
82
83
  * Dispose this collection and icons with all associated resources
83
84
  */
@@ -16,7 +16,6 @@ export declare const DEFAULT_OVERLAY_FRONT_OPACITY = 1;
16
16
  export declare const DEFAULT_OVERLAY_BACK_OPACITY = 0.5;
17
17
  export declare class OverlayPointsObject extends Group {
18
18
  private readonly _geometry;
19
- private readonly _frontMaterial;
20
19
  private readonly _positionBuffer;
21
20
  private readonly _positionAttribute;
22
21
  private readonly _colorBuffer;
@@ -73,6 +73,18 @@ export declare class CognitePointCloudModel<T extends DataSourceType = ClassicDa
73
73
  * @param out Preallocated `THREE.Matrix4` (optional)
74
74
  */
75
75
  getCdfToDefaultModelTransformation(out?: THREE.Matrix4): THREE.Matrix4;
76
+ /**
77
+ * Retrieves all points from the point cloud that are contained within the specified bounding box.
78
+ * @param box The THREE.Box3 bounding box used to filter points, defined in local model coordinates.
79
+ * @returns Array of THREE.Vector3 points that are located within the provided bounding box in local model coordinates.
80
+ * @example
81
+ * ```js
82
+ * const boundingBox = new THREE.Box3(new THREE.Vector3(-10, -10, -10), new THREE.Vector3(10, 10, 10));
83
+ * const pointsInBox = model.getPointsByBoundingBox(boundingBox);
84
+ * console.log(`Found ${pointsInBox.length} points in the bounding box`);
85
+ * ```
86
+ */
87
+ getPointsByBoundingBox(box: THREE.Box3): THREE.Vector3[];
76
88
  /**
77
89
  * Map point from CDF to model space, taking the model's custom transformation into account
78
90
  * @param point Point to compute transformation from
@@ -7,7 +7,7 @@ import { WellKnownAsprsPointClassCodes } from './types';
7
7
  import { PointColorType, PointShape, PointSizeType } from '../../rendering';
8
8
  import { DataSourceType, PointCloudObject, PointCloudObjectMetadata } from '../../data-providers';
9
9
  import { CompletePointCloudAppearance } from '../../pointcloud-styling';
10
- import { Matrix4, Group, Box3, Color, type Camera, type Plane, type Ray, type WebGLRenderer } from 'three';
10
+ import { Matrix4, Group, Box3, Color, Vector3, type Camera, type Plane, type Ray, type WebGLRenderer } from 'three';
11
11
  import { StyledPointCloudVolumeCollection } from '../../pointcloud-styling';
12
12
  export declare class PointCloudNode<T extends DataSourceType = DataSourceType> extends Group {
13
13
  private readonly _cameraConfiguration?;
@@ -79,6 +79,7 @@ export declare class PointCloudNode<T extends DataSourceType = DataSourceType> e
79
79
  setModelTransformation(matrix: Matrix4): void;
80
80
  getModelTransformation(out?: Matrix4): Matrix4;
81
81
  getCdfToDefaultModelTransformation(out?: Matrix4): Matrix4;
82
+ getSubtreePointsByBox(box: Box3): Vector3[];
82
83
  get stylableVolumeMetadata(): Iterable<PointCloudObjectMetadata<T>>;
83
84
  getStylableObjectMetadata(objectId: number): PointCloudObjectMetadata<T> | undefined;
84
85
  get stylableObjectCount(): number;
@@ -14,6 +14,7 @@ export declare class PointCloudOctreeNode extends EventDispatcher implements IPo
14
14
  dispose(): void;
15
15
  disposeSceneNode(): void;
16
16
  traverse(cb: (node: IPointCloudTreeNodeBase) => void, includeSelf?: boolean): void;
17
+ traverseOctreeNodes(callback: (node: PointCloudOctreeNode) => void, includeSelf?: boolean, shouldCullSubTree?: (node: PointCloudOctreeNode) => boolean): void;
17
18
  get id(): number;
18
19
  get name(): string;
19
20
  get level(): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cognite/reveal",
3
- "version": "4.25.3",
3
+ "version": "4.25.4-dev.20250820",
4
4
  "description": "WebGL based 3D viewer for CAD and point clouds processed in Cognite Data Fusion.",
5
5
  "homepage": "https://github.com/cognitedata/reveal/tree/master/viewer",
6
6
  "repository": {