MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::IO::Detail::VDBGridSummary Struct Reference

What a reader needs to know about one grid in an opened file, before deciding how to materialize it. More...

#include <VDBArchive.hpp>

+ Collaboration diagram for MayaFlux::IO::Detail::VDBGridSummary:

Public Attributes

glm::ivec3 active_max { 0 }
 Exclusive.
 
glm::ivec3 active_min { 0 }
 
float background_scalar { 0.0F }
 
glm::vec3 background_vector { 0.0F }
 
bool has_active { false }
 
bool is_vector { false }
 
std::string name
 
bool narrowed { false }
 
glm::vec3 translation { 0.0F }
 
glm::vec3 voxel_size { 1.0F }
 

Detailed Description

What a reader needs to know about one grid in an opened file, before deciding how to materialize it.

voxel_size and translation come from the grid's own transform, read per-axis for SCALE_TRANSLATE (what VDBArchive::add_grid writes) and approximated for the rarer transform kinds a foreign file may carry — see the .cpp for the per-type fallback. active_min/active_max are the voxel- index bounding box of every leaf the tree holds, max exclusive, matching tinyvdb's own tvdb_grid_active_bbox convention. has_active is false, and the bbox members are unset, for a grid with no leaves at all.

narrowed is true when the grid's leaf value type is something other than float (scalar) or vec3f (vector) — double, int32, int64, bool, vec3d, vec3i, or half — meaning VDBArchive::read_dense_scalar/read_dense_vector will convert every value to the representable type rather than reject it.

background_scalar/background_vector are the root tile's fill value, narrowed the same way leaf values are. Only the one matching is_vector is meaningful; the other holds its default. This is the value every cell outside the tree takes — pass it to read_dense_scalar/read_dense_vector as the background argument to reproduce that.

Definition at line 56 of file VDBArchive.hpp.


The documentation for this struct was generated from the following file: