import { ThreeElements } from '@react-three/fiber'; import { LoDLevel, PointCloudSource } from './DepthPointCloudManager'; import { TransformProps } from '../../three_transforms/interfaces'; import { VuerProps } from '../../vuer/interfaces'; import * as THREE from "three"; /** * Visual configuration for point cloud rendering */ export interface PointCloudVisualConfig { /** * Point size in pixels (screen-space) or world units * @dial visualization * @dial-dtype number * @dial-min 0.1 * @dial-max 20 * @dial-step 0.1 */ pointSize: number; /** * Screen-space sizing: true = constant pixel size, false = size scales with distance * @dial visualization * @dial-dtype boolean */ screenSpaceSizing: boolean; /** * Colormap name for false-color rendering * @dial visualization * @dial-dtype string * @dial-options ["turbo", "viridis", "inferno", "jet"] */ cmap?: string; /** * Color mode for visualization * @dial visualization * @dial-dtype string * @dial-options ["depth", "camZ", "camDist", "localY", "worldY"] */ colorMode: string; /** * Minimum depth value for visualization mapping * @dial visualization * @dial-dtype number * @dial-step 0.1 */ depthMin: number; /** * Maximum depth value for visualization mapping * @dial visualization * @dial-dtype number * @dial-step 0.1 */ depthMax: number; /** * Minimum height value for visualization mapping * @dial visualization * @dial-dtype number * @dial-step 0.1 */ heightMin: number; /** * Maximum height value for visualization mapping * @dial visualization * @dial-dtype number * @dial-step 0.1 */ heightMax: number; /** * Minimum world Y for filtering - points below this are discarded (default: -Infinity) * @dial filtering * @dial-dtype number * @dial-step 0.1 */ minY: number; /** * Maximum world Y for filtering - points above this are discarded (default: Infinity) * @dial filtering * @dial-dtype number * @dial-step 0.1 */ maxY: number; } export interface DepthPointCloudRegistration { id: string; groupRef: THREE.Group | null; lodLevels: LoDLevel[]; boundingSphere: THREE.Sphere; source?: PointCloudSource; visible: boolean; currentLod: number; isInFrustum: boolean; visualConfig: PointCloudVisualConfig; material?: THREE.ShaderMaterial; } export interface LodConfig { strides: number[]; distances: number[]; } export interface BakeConfig { depthUnit: number; depthOffset: number; invertDepth: boolean; depthMin: number; depthMax: number; edgeFilter: boolean; edgeThreshold: number; /** Horizontal field of view in radians (default: 87° for RealSense D435) */ hfov: number; /** Vertical field of view in radians (default: 58° for RealSense D435) */ vfov: number; /** Principal point X in pixels (default: image center = width/2) */ cx?: number; /** Principal point Y in pixels (default: image center = height/2) */ cy?: number; } export interface ProviderConfig { lod: LodConfig; bake: BakeConfig; frustumCulling: boolean; cullingMargin: number; } export interface DepthPointCloudProviderProps extends VuerProps { /** * LoD configuration * @dial-ignore */ lod?: Partial; /** * Bake configuration (depthUnit, edgeFilter, etc.) * @dial-ignore */ bake?: Partial; /** * Enable frustum culling * @dial performance * @dial-dtype boolean * @dial-default true */ frustumCulling?: boolean; /** * Culling margin multiplier * @dial performance * @dial-dtype number * @dial-min 1 * @dial-max 5 * @dial-step 0.1 * @dial-default 2.0 */ cullingMargin?: number; } export declare function DepthPointCloudProvider({ children, lod, bake, frustumCulling, cullingMargin, }: DepthPointCloudProviderProps): import("react/jsx-runtime").JSX.Element; export interface DepthPointCloudProps extends Omit, TransformProps, VuerProps { /** * Depth image URL (16-bit PNG) * @dial data * @dial-dtype string */ depth: string; /** * RGB image URL (optional - uses depth for grayscale if not provided) * @dial data * @dial-dtype string */ rgb?: string; /** * Unique ID (auto-generated if not provided) * @dial-ignore */ id?: string; /** * Hide this cloud * @dial visibility * @dial-dtype boolean * @dial-default false */ hide?: boolean; /** * Vertical field of view in degrees (default: 58° for RealSense D435) * @dial config * @dial-dtype number * @dial-min 10 * @dial-max 180 * @dial-step 1 * @dial-default 58 */ fov?: number; /** * Depth scale factor - converts raw depth values to meters (default: 0.001 for millimeter depth) * @dial config * @dial-dtype number * @dial-min 0.0001 * @dial-max 1 * @dial-step 0.0001 * @dial-default 0.001 */ depthUnit?: number; /** * Point size (default: 2.0) * @dial visualization * @dial-dtype number * @dial-min 0.1 * @dial-max 20 * @dial-step 0.1 * @dial-default 2.0 */ pointSize?: number; /** * Screen-space sizing: true = constant pixel size, false = size scales with distance (default: true) * @dial visualization * @dial-dtype boolean * @dial-default true */ screenSpaceSizing?: boolean; /** * Colormap name: "turbo", "viridis", "inferno", "jet", or undefined for RGB * @dial visualization * @dial-dtype string */ cmap?: string; /** * Color mode for visualization (default: "depth") * @dial visualization * @dial-dtype string * @dial-options ["depth", "camZ", "camDist", "localY", "worldY"] * @dial-default "depth" */ colorMode?: string; /** * Depth min for visualization (default: 0.1) * @dial visualization * @dial-dtype number * @dial-step 0.1 * @dial-default 0.1 */ depthMin?: number; /** * Depth max for visualization (default: 50) * @dial visualization * @dial-dtype number * @dial-step 0.1 * @dial-default 50 */ depthMax?: number; /** * Height min for visualization (default: -2) * @dial visualization * @dial-dtype number * @dial-step 0.1 * @dial-default -2 */ heightMin?: number; /** * Height max for visualization (default: 2) * @dial visualization * @dial-dtype number * @dial-step 0.1 * @dial-default 2 */ heightMax?: number; /** * Minimum world Y for filtering - points below this are discarded (default: -Infinity) * @dial filtering * @dial-dtype number * @dial-step 0.1 */ minY?: number; /** * Maximum world Y for filtering - points above this are discarded (default: Infinity) * @dial filtering * @dial-dtype number * @dial-step 0.1 */ maxY?: number; /** * Principal point X in pixels (default: image center = width/2) * @dial config * @dial-dtype number * @dial-step 1 */ cx?: number; /** * Principal point Y in pixels (default: image center = height/2) * @dial config * @dial-dtype number * @dial-step 1 */ cy?: number; } export declare function DepthPointCloud({ depth, rgb, id: providedId, position, rotation, scale, hide, fov, depthUnit, pointSize, screenSpaceSizing, cmap, colorMode, depthMin, depthMax, heightMin, heightMax, minY, maxY, cx, cy, ...rest }: DepthPointCloudProps): import("react/jsx-runtime").JSX.Element; export { loadDepthImage, loadDepthPNG, loadColorImage, DEFAULT_LOD_CONFIGS } from './DepthPointCloudManager'; export type { LoDConfig, BakeOptions } from './DepthPointCloudManager';