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);
144 [[nodiscard]]
size_t read_grid_count()
const;
161 [[nodiscard]] std::string grid_metadata(
size_t index, std::string_view key)
const;
188 bool read_dense_scalar(
190 const glm::ivec3& region_min,
191 const glm::uvec3& resolution,
193 std::vector<float>& out,
194 bool* precision_lost =
nullptr)
const;
207 bool read_dense_vector(
209 const glm::ivec3& region_min,
210 const glm::uvec3& resolution,
211 const glm::vec3& background,
212 std::vector<glm::vec3>& out,
213 bool* precision_lost =
nullptr)
const;
229 inline constexpr uint32_t
None = 0x0;
230 inline constexpr uint32_t
Zip = 0x1;
232 inline constexpr uint32_t
Blosc = 0x4;
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_view last_error() const
std::string m_last_error
Set from the const read-path accessors too.
std::unique_ptr< State > m_state
VDBArchive(const VDBArchive &)=delete
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
VDBArchive & operator=(VDBArchive &&)=delete
constexpr uint32_t ActiveMask
constexpr uint32_t Default
Compression flags, mirroring tinyvdb's without exposing its header.
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.