Crate building_blocks_storage[−][src]
Expand description
Various types of storage and indexing for voxels in 2 or 3 dimensions.
If you need to store signed distance values in your voxels, consider using the Sd8
and Sd16
fixed-precision types which
implement the SignedDistance
trait required for smooth meshing.
The core storage types are:
- Array: N-dimensional, single resolution, bounded, dense array
- ChunkMap: N-dimensional, multiple resolution, unbounded, sparse array
- Backed by generic chunk storage, with
HashMap
orCompressibleChunkStorage
implementations
- Backed by generic chunk storage, with
Then there are “meta” lattice maps that provide some extra utility:
- TransformMap: a wrapper of any kind of lattice map that performs an arbitrary transformation
- Func: some lattice map traits are implemented for closures (like SDFs)
For hierarchical indexing and level of detail:
- OctreeSet: bounded bitset of points
- ChunkedOctreeSet: unbounded bitset of points
- OctreeChunkIndex: just a
ChunkedOctreeSet
that tracks chunks and provides clipmap functionality
Re-exports
pub use access_traits::*;
pub use array::*;
pub use caching::*;
pub use chunk::*;
pub use compression::*;
pub use func::*;
pub use multi_ptr::*;
pub use octree::*;
pub use raw_bytes::*;
pub use signed_distance::*;
pub use transform_map::*;
pub use dot_vox;
pub use image;
Modules
Traits defining different ways to access data from generic lattice maps.
N-dimensional arrays, where N is 2 or 3.
Lattice map access traits implemented for functions and closures.
This module contains octrees in various forms. The most fundamental of these is the OctreeSet
, which is used to implement
everything else. Because the OctreeSet
has a bounded domain, it is extended to being unbounded by storing multiple
OctreeSets
in a hash map. This is known as the ChunkOctreeSet
.
A lattice map that overlays a transformation on top of a delegate lattice map.
Enums
Traits
Used in many generic algorithms to check if a voxel is considered empty.