Crate building_blocks_storage

Source
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 or CompressibleChunkStorage implementations

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:

Re-exports§

pub use dot_vox;
pub use image;
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::*;

Modules§

access_traits
Traits defining different ways to access data from generic lattice maps.
array
N-dimensional arrays, where N is 2 or 3.
caching
chunk
compression
func
Lattice map access traits implemented for functions and closures.
multi_ptr
octree
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.
prelude
raw_bytes
signed_distance
transform_map
A lattice map that overlays a transformation on top of a delegate lattice map.

Enums§

VoxColor

Traits§

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

Functions§

encode_image
encode_vox

Type Aliases§

SmallKeyBuildHasher
SmallKeyHashMap
SmallKeyHashSet
OSZAR »