import { Mesh, Ray, Vector3 } from 'three/webgpu'; import { type FieldEvaluation4, type HyperplaneSlice4, type ImplicitField4, type Vec4f64 } from '@holotope/core'; import type { ImplicitFieldNode4, RaymarchedFieldStyle3D } from './implicit-field-node4.js'; export interface RaymarchedField3DOptions { /** Half-width of the marched cube in slice coordinates. Default 1.65. */ extent?: number; /** Maximum sphere-tracing steps per fragment. Default 112. */ maxSteps?: number; /** Surface hit threshold in slice coordinates. Default 0.0015. */ surfaceEpsilon?: number; /** Finite-difference step for field-gradient normals. Default 0.004. */ normalEpsilon?: number; /** Safety factor applied to the field's distance estimate. */ stepSafety?: number; /** Record-driven presentation. A neutral diagnostic style is used by default. */ style?: RaymarchedFieldStyle3D; /** Write the marched hit depth into the scene depth buffer. Default true. */ writeDepth?: boolean; } export interface RaymarchedFieldIntersection { /** Distance from the supplied world-space ray origin. */ readonly distance: number; readonly point: Vector3; readonly pointLocal: Vector3; readonly point4: Vec4f64; readonly normal: Vector3; readonly normalLocal: Vector3; readonly steps: number; readonly startedInside: boolean; readonly record: Record; } /** * Generic adaptive rendering product for an R4 implicit field restricted to * an affine 3-flat. The field supplies a packed TSL evaluator, the product * owns ray transport and slice uniforms, and a style maps records to color. * * The proxy cube only supplies fragments and a ray interval. No voxel grid or * extracted triangle surface participates in the rendering. */ export declare class RaymarchedField3D = ImplicitField4> { /** The R4 implicit field being restricted to the slice and marched. */ readonly field: Field; /** The field's packed TSL evaluator, as compiled for the shader. */ readonly fieldNode: ImplicitFieldNode4; /** Affine 3-flat the field is restricted to; its offset drives the uniform. */ readonly slice: HyperplaneSlice4; /** Half-width of the proxy cube supplying fragments and the ray interval. */ readonly extent: number; /** Maximum sphere-tracing steps per fragment. */ readonly maxSteps: number; /** Surface hit threshold in slice coordinates. */ readonly surfaceEpsilon: number; /** Finite-difference step for field-gradient normals. */ readonly normalEpsilon: number; /** Safety factor applied to the field's distance estimate. */ readonly stepSafety: number; /** Record-driven presentation mapping evaluation records to color. */ readonly style: RaymarchedFieldStyle3D; /** Whether the marched hit depth is written into the scene depth buffer. */ readonly writeDepth: boolean; /** The proxy mesh to add to a scene; it carries fragments, not a surface. */ readonly object: Mesh; private _revision; private readonly basisValues; private readonly normalValue; private readonly offsetUniform; constructor(fieldNode: ImplicitFieldNode4, slice: HyperplaneSlice4, options?: RaymarchedField3DOptions); /** Refresh affine-slice uniforms after changing the live slice. */ update(): void; /** Monotonic invalidation key for temporal or progressive render pipelines. */ get revision(): number; /** * CPU-golden intersection for picking and inspection. The supplied ray and * returned point/normal are in world space; `pointLocal` and `point4` retain * the renderer-local and ambient-field coordinates. */ intersectRay(ray: Ray): RaymarchedFieldIntersection | null; dispose(): void; } //# sourceMappingURL=raymarched-field.d.ts.map