-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add getters for aabb min and max #44
Conversation
src/data_structure.rs
Outdated
match self.grid_descriptor.meta_data.0["file_bbox_max"] { | ||
MetadataValue::Vec3i(v) => Ok(v), | ||
_ => Err(MetadataError::FieldNotPresent("file_bbox_max".to_string())), | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there more occurrences of this pattern, which could be reworked behind a single (private) helper function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only somewhat similar pattern is https://github.com/Traverse-Research/vdb-rs/pull/43/files but we are keeping that out of the library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a pattern that could present itself in the near future again, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm this will get pretty messy as we are actively working around the type system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added all fields from https://github.com/AcademySoftwareFoundation/openvdb/blob/master/openvdb/openvdb/Grid.cc#L387 maybe in a followup PR we can make a more generic way of accessing these metadata values.
Adds getters for aabb information. These fields should always be present as seen here https://github.com/AcademySoftwareFoundation/openvdb/blob/master/openvdb/openvdb/Grid.cc#L380