Crate dl_openvdb_query[][src]

Expand description

Safe wrapper for 3Delight’s OpenVDB metadata query API.

This is a simple API to query:

  • The bounding box.
  • The names of the grids.
  • A simplified representation of a density grid as points.
let sphere_vdb =
    dl_openvdb_query::DlOpenVdbQuery::new(
         "tests/sphere_points.vdb",
    )
    .unwrap();

let min = -0.9416000247001648;
let max =  1.0593000277876854;
assert_eq!(
    sphere_vdb.bounding_box().unwrap(),
    [min, min, min, max, max, max]
);
assert_eq!(
    sphere_vdb.grid_names().unwrap(),
    vec!["points"]
);

The lib3delight dynamic library can be linked to or it can be loaded at runtime. The latter is the default.

Linking can be forced using the feature link_lib3delight.

Structs

DlOpenVdbQuery

An API to query an OpenVDB file for metadata.

Type Definitions

Bounds

Volume bounding box in the format xmin, ymin, zmin, xmax, ymax, zmax.