@tolokoban/tgd
Version:
ToloGameDev library for WebGL2
29 lines • 1.17 kB
TypeScript
import { TgdVec3 } from "../../../math";
import { ArrayNumber3 } from "../../../types";
import { TgdGeometry } from "../../geometry";
export interface MakeGeometryFromVolumeOptions {
bboxCorner: ArrayNumber3 | TgdVec3;
bboxSize: ArrayNumber3 | TgdVec3;
/**
* Size of the side of the voxel we use to mesh the volume.
*/
voxelSize: number;
/**
* Signed distance function that defines the volume.
* @returns A Negative number if `point` is inside the volume.
*/
sdfPoint(x: number, y: number, z: number): number;
/**
* By default the name of the attribute position is "POSITION".
*/
attPosition?: string;
/**
* Marching cubes make blocky meshes.
* One level of smoothing can improve this.
* If it's not enough, just increase the level of smoothing.
*/
smoothingLevel?: number;
}
export declare function tgdMakePointsCloudFromVolume(options: MakeGeometryFromVolumeOptions, radiusMultiplier?: number): Float32Array<ArrayBufferLike>;
export declare function tgdMakeGeometryFromVolume(options: MakeGeometryFromVolumeOptions): TgdGeometry;
//# sourceMappingURL=marching-cubes.d.ts.map