Skip to main content

Module: Math/VoxelMath

Type Aliases

VoxelMath

Ƭ VoxelMath: typeof VoxelMath

Defined in

divinevoxel/core/src/Math/VoxelMath.ts:12

divinevoxel/core/src/Math/VoxelMath.ts:65

Variables

VoxelMath

Const VoxelMath: Object

Voxel Math


Can be used in any thread that needs it. Has functions for collision detection, finding voxels in a direction, and path finding.

Type declaration

NameType
visitAll(startPoint: Position3Matrix, endPoint: Position3Matrix, visitor: (x: number, y: number, z: number) => boolean) => number[]
convertToOriginGridSpace(position: number[]) => number[]
distance2D(x1: number, x2: number, y1: number, y2: number) => number
distance3D(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number) => number
getBoundingBox(data: BoundingBoxData) => BoundingBox
getPlane(pv1: Vector3, pv2: Vector3, pv3: Vector3, pv4: Vector3) => Plane
getSimpleBoundingBox(origin: Vector3, dimensions: DimensionsVector3) => SimpleBoundingBox
getVector3(x: number, y: number, z: number) => Vector3

Defined in

divinevoxel/core/src/Math/VoxelMath.ts:12

divinevoxel/core/src/Math/VoxelMath.ts:65