29 std::span<const std::pair<std::string, std::string>>
metadata;
125 bool save(
const std::string& path, uint32_t compression,
int level);
141 bool open(
const std::string& path);
191 const glm::uvec3& resolution,
193 std::vector<float>&
out,
210 const glm::uvec3& resolution,
211 const glm::vec3& background,
212 std::vector<glm::vec3>&
out,
228namespace VDBCompression {
229 inline constexpr uint32_t
None = 0x0;
230 inline constexpr uint32_t
Zip = 0x1;
232 inline constexpr uint32_t
Blosc = 0x4;
std::vector< float > * out
bool save(const std::string &path, uint32_t compression, int level)
Write every added grid to one file.
VDBArchive & operator=(const VDBArchive &)=delete
std::string grid_metadata(size_t index, std::string_view key) const
Look up a string-typed metadata entry on a grid.
bool read_dense_scalar(size_t index, const glm::ivec3 ®ion_min, const glm::uvec3 &resolution, float background, std::vector< float > &out, bool *precision_lost=nullptr) const
Materialize a scalar grid's cells over an explicit region.
std::string_view last_error() const
std::string m_last_error
Set from the const read-path accessors too.
std::unique_ptr< State > m_state
bool read_dense_vector(size_t index, const glm::ivec3 ®ion_min, const glm::uvec3 &resolution, const glm::vec3 &background, std::vector< glm::vec3 > &out, bool *precision_lost=nullptr) const
Materialize a vector grid's cells over an explicit region.
VDBArchive(const VDBArchive &)=delete
VDBGridSummary grid_summary(size_t index) const
Summarize one grid: name, value kind, transform, active bounds.
size_t grid_count() const
bool add_grid(const Kinesis::Lattice3D &lattice, const VDBGridSpec &spec)
Build one grid from active cells and retain it for saving.
VDBArchive(VDBArchive &&)=delete
bool open(const std::string &path)
Open a .vdb and read every grid's tree into memory.
VDBArchive & operator=(VDBArchive &&)=delete
size_t read_grid_count() const
Number of grids in the opened file, or 0 if none is open.
RAII boundary around tinyvdb's C read and write paths.
constexpr uint32_t ActiveMask
constexpr uint32_t Default
std::span< const std::byte > values
std::span< const glm::ivec3 > coords
std::span< const std::byte > background
std::span< const std::pair< std::string, std::string > > metadata
One grid's worth of input to VDBArchive::add_grid.
glm::vec3 background_vector
glm::ivec3 active_max
Exclusive.
What a reader needs to know about one grid in an opened file, before deciding how to materialize it.
A regular subdivision of an AABB3D into a cell count per axis.