import { Vec3Array, Vector3Like } from "@amodx/math"; import { BoundingBox } from "@amodx/math/Geometry/Bounds/BoundingBox"; import { DivineVoxelEngineRender } from "../Contexts/Render"; import { VoxelPathData } from "../Templates/Path/VoxelPath.types"; import { IVoxelTemplateData } from "../Templates/VoxelTemplates.types"; import { PaintVoxelData } from "../Voxels"; import { VoxelPickResult } from "../Voxels/Interaction/VoxelPickResult"; import { RayProvider } from "./RayProvider"; import { FullVoxelTemplate } from "../Templates/Full/FullVoxelTemplate"; import { BoundsMinMaxData } from "@amodx/math/Geometry/Bounds/BoundsInterface"; import type { VoxelSurfaceSelectionData } from "../Templates/Selection/VoxelSurfaceSelection"; import type { VoxelBFSSelectionData } from "../Templates/Selection/VoxelBFSSelection"; import { IVoxelSelectionData } from "../Templates/Selection/VoxelSelection"; import "../Templates/VoxelTemplateRegister"; type VoxelSpaceBaseUpdateData = { type: Type; remote?: true; } & Data; export type VoxelSpaceUpdateData = VoxelSpaceBaseUpdateData<"paint-voxel", { position: Vec3Array; voxel: PaintVoxelData; }> | VoxelSpaceBaseUpdateData<"erase-voxel", { position: Vec3Array; }> | VoxelSpaceBaseUpdateData<"paint-voxel-template", { position: Vec3Array; template: IVoxelTemplateData; }> | VoxelSpaceBaseUpdateData<"erase-voxel-template", { position: Vec3Array; template: IVoxelTemplateData; }> | VoxelSpaceBaseUpdateData<"erase-voxel-selection", { selection: IVoxelSelectionData; }> | VoxelSpaceBaseUpdateData<"paint-voxel-path", { position: Vec3Array; path: VoxelPathData; }> | VoxelSpaceBaseUpdateData<"erase-voxel-path", { position: Vec3Array; path: VoxelPathData; }>; export declare class VoxelBuildSpace { DVER: DivineVoxelEngineRender; /**Callback that is called before the update is ran. */ beforeUpdate: ((data: VoxelSpaceUpdateData) => Promise | void) | null; /**Callback that is called durning the update call using Promise.all. */ duringUpdate: ((data: VoxelSpaceUpdateData) => Promise | void) | null; /**Callback that is called after the update is ran. */ afterUpdate: ((data: VoxelSpaceUpdateData) => Promise | void) | null; bounds: BoundingBox; private _rayProviders; get rayProvider(): RayProvider; constructor(DVER: DivineVoxelEngineRender, rayProvider: RayProvider, min?: Vector3Like, max?: Vector3Like); addRayProvider(index: number, provider: RayProvider): void; getRayProvider(index: number): RayProvider | null; removeRayProvider(index: number): void; /**Pick the current voxel space. Defaults to the rayProvider values. */ pick(rayOrigin?: Vector3Like, rayDirection?: Vector3Like, length?: number): Promise; pickWithProvider(index: number): Promise; createTemplate(bounds: BoundsMinMaxData): Promise; getSurfaceSelection(position: Vector3Like, normal: Vector3Like, extrusion: number, maxSize?: number): Promise; getBFSSelection(position: Vector3Like, maxSize?: number): Promise; getExtrudedSelectionTemplate(selection: IVoxelSelectionData, nomral: Vector3Like): Promise; getPlaceState(data: PaintVoxelData, picked: VoxelPickResult, alt?: number | null): PaintVoxelData | undefined; clear(): Promise; private _updateFunctions; update(data: T): Promise; paintVoxel(position: Vec3Array | Vector3Like, voxel: PaintVoxelData): Promise; eraseVoxel(position: Vec3Array | Vector3Like): Promise; paintTemplate(position: Vec3Array | Vector3Like | Vector3Like, template: IVoxelTemplateData): Promise; eraseTemplate(position: Vec3Array | Vector3Like, template: IVoxelTemplateData): Promise; eraseSelection(selection: IVoxelSelectionData): Promise; paintPath(position: Vec3Array | Vector3Like, path: VoxelPathData): Promise; erasePath(position: Vec3Array | Vector3Like, path: VoxelPathData): Promise; } export {};