[][src]Module building_blocks::prelude

Structs

ArrayN

A map from lattice location PointN<N> to data T, stored as a flat array on the heap.

ExtentN

An N-dimensional extent. This is mathematically the Cartesian product of a half-closed interval [a, b) in each dimension. You can also just think of it as an axis-aligned box with some shape and a minimum point. When doing queries against lattice maps, this is the primary structure used to determine the bounds of your query.

FastLz4

A compression algorithm that decompresses quickly, but only on the same platform where it was compressed.

Local

Map-local coordinates.

PointN

An N-dimensional point (where N=2 or N=3), which is usually just a primitive array like [i32; 2] or [i32; 3]. It is most convenient to construct points of any dimension as:

Stride

The most efficient coordinates for slice-backed lattice maps. A single number that translates directly to a slice offset.

TransformMap

A lattice map that delegates look-ups to a different lattice map, then transforms the result using some Fn(T) -> S.

Traits

Array

When a lattice map implements Array, that means there is some underlying array with the location and shape dictated by the extent.

Bounded
Compressible

A type that's compressible using algorithm A.

Decompressible

A type that's decompressible using the inverse of algorithm A.

Distance
DotProduct
Extent

A trait for methods that all ExtentN<N> should have, but only those which are implemented specially for each ExtentN<N>. The goal is only to generalize over the number of dimensions.

ForEach
ForEachMut
Get
GetMut
IntegerExtent

The methods that all ExtentN<N> should have when the scalar type is an integer, but only those which are implemented specially for each ExtentN<N>. This enables us to assume that any finite extent contains only a finite number of points.

IntegerPoint
IsEmpty

Used in many generic algorithms to check if a voxel is considered empty.

Norm
NormSquared
Ones
Point

A trait that bundles op traits that all PointN<N> (and its components) should have.

ReadExtent

A trait to facilitate the generic implementation of copy_extent.

SmallZero
WriteExtent

A trait to facilitate the generic implementation of copy_extent.

Functions

copy_extent

Copy all points in extent from the src map to the dst map.

Type Definitions

Array2
Array3
Chunk2
Chunk3
ChunkMap2
ChunkMap3
ChunkMapReader2
ChunkMapReader3
Extent2

A 2-dimensional extent with scalar type T.

Extent2f

A 2-dimensional extent with scalar type f32.

Extent2i

A 2-dimensional extent with scalar type i32.

Extent3

A 3-dimensional extent with scalar type T.

Extent3f

A 3-dimensional extent with scalar type f32.

Extent3i

A 3-dimensional extent with scalar type i32.

LocalChunkCache2
LocalChunkCache3
Point2

A 2-dimensional point with scalar type T.

Point2f

A 2-dimensional point with scalar type f32.

Point2i

A 2-dimensional point with scalar type i32.

Point3

A 3-dimensional point with scalar type T.

Point3f

A 3-dimensional point with scalar type f32.

Point3i

A 3-dimensional point with scalar type i32.