import { BufferGeometry, Mesh, type Material } from 'three'; import { type FieldEvaluation4, type HyperplaneSlice4, type ImplicitField4, type Vec4f64 } from '@holotope/core'; /** * Which of a slice's three basis directions a relief axis uses. A relief * spans two of them and displaces along the scalar, so the pair names the * plane the height field is built over. */ export type SliceAxis3 = 0 | 1 | 2; export interface FieldReliefSample { readonly record: Record; readonly point: Vec4f64; readonly u: number; readonly v: number; } export interface FieldRelief3DOptions { /** Vertices along each side of the square grid. */ resolution: number; /** Half-width of the sampled square in slice coordinates. */ extent: number; /** Two in-slice basis axes spanning the sampled plane. Default [0, 1]. */ planeAxes?: readonly [SliceAxis3, SliceAxis3]; /** Coordinate along the remaining in-slice basis axis. Default 0. */ planeOffset?: number; /** Maps a retained field record to rendered height. */ heightFor: (sample: FieldReliefSample) => number; /** Optional packed RGB color for each retained field record. */ colorFor?: (sample: FieldReliefSample) => number; material?: Material; } /** * Inspectable 2D field relief inside an affine 3-flat. It evaluates a declared * plane in R4 on the CPU, retains every source point and record, and presents * one scalar as height. This is a field encoding, not a geometric section of * the field's zero set. */ export declare class FieldRelief3D { readonly field: ImplicitField4; readonly slice: HyperplaneSlice4; readonly geometry: BufferGeometry; readonly object: Mesh; readonly approximate = true; records: Record[]; sourcePoints: Float64Array; heights: Float32Array; private options; /** * Builds a height field over a plane of the slice, displacing a grid by a * scalar read from each sample's record. Where a section shows where a * field is, a relief shows how it varies there. * * @param field - Field to evaluate across the plane. * @param slice - The hyperplane the plane is taken from. Retained, so * moving its offset moves the relief. * @param options - The two slice axes spanning the plane, grid extent and * resolution, the scalar read from each record, and its displacement scale. */ constructor(field: ImplicitField4, slice: HyperplaneSlice4, options: FieldRelief3DOptions); update(options?: Partial>): void; get triangleCount(): number; dispose(): void; } //# sourceMappingURL=field-relief.d.ts.map