OpenVDB
2.1.0
|
Namespaces | |
io | |
math | |
tools | |
tree | |
util | |
Classes | |
class | Exception |
class | ArithmeticError |
class | IllegalValueException |
class | IndexError |
class | IoError |
class | KeyError |
class | LookupError |
class | NotImplementedError |
class | ReferenceError |
class | RuntimeError |
class | TypeError |
class | ValueError |
class | Grid |
Container class that associates a tree with a transform and metadata. More... | |
class | GridBase |
Abstract base class for typed grids. More... | |
struct | GridNamePred |
Predicate functor that returns true for grids that have a specified name. More... | |
struct | TreeAdapter |
This adapter allows code that is templated on a Tree type to accept either a Tree type or a Grid type. More... | |
struct | TreeAdapter< Grid< _TreeType > > |
Partial specialization for Grid types. More... | |
struct | TreeAdapter< tree::ValueAccessor< _TreeType > > |
Partial specialization for ValueAccessor types. More... | |
struct | VecTraits |
struct | VecTraits< math::Vec2< T > > |
struct | VecTraits< math::Vec3< T > > |
struct | VecTraits< math::Vec4< T > > |
class | CombineArgs |
This struct collects both input and output arguments to "grid combiner" functors used with the tree::TypedGrid::combineExtended() and combine2Extended() methods. ValueType is the value type of the two grids being combined. More... | |
struct | SwappedCombineOp |
class | ShallowCopy |
class | TopologyCopy |
struct | VersionId |
class | Metadata |
Base class for storing metadata information in a grid. More... | |
class | UnknownMetadata |
Subclass to read (and ignore) data of an unregistered type. More... | |
class | TypedMetadata |
Templated metadata class to hold specific types. More... | |
class | MetaMap |
Provides functionality storing type agnostic metadata information. Grids and other structures can inherit from this to attain metadata functionality. More... | |
Typedefs | |
typedef tree::TreeBase | TreeBase |
typedef std::vector < GridBase::Ptr > | GridPtrVec |
typedef GridPtrVec::iterator | GridPtrVecIter |
typedef GridPtrVec::const_iterator | GridPtrVecCIter |
typedef boost::shared_ptr < GridPtrVec > | GridPtrVecPtr |
typedef std::vector < GridBase::ConstPtr > | GridCPtrVec |
typedef GridCPtrVec::iterator | GridCPtrVecIter |
typedef GridCPtrVec::const_iterator | GridCPtrVecCIter |
typedef boost::shared_ptr < GridCPtrVec > | GridCPtrVecPtr |
typedef std::set< GridBase::Ptr > | GridPtrSet |
typedef GridPtrSet::iterator | GridPtrSetIter |
typedef GridPtrSet::const_iterator | GridPtrSetCIter |
typedef boost::shared_ptr < GridPtrSet > | GridPtrSetPtr |
typedef std::set < GridBase::ConstPtr > | GridCPtrSet |
typedef GridCPtrSet::iterator | GridCPtrSetIter |
typedef GridCPtrSet::const_iterator | GridCPtrSetCIter |
typedef boost::shared_ptr < GridCPtrSet > | GridCPtrSetPtr |
typedef tree::Tree4< bool, 5, 4, 3 > ::Type | BoolTree |
Common tree types. More... | |
typedef tree::Tree4< float, 5, 4, 3 > ::Type | FloatTree |
typedef tree::Tree4< double, 5, 4, 3 > ::Type | DoubleTree |
typedef tree::Tree4< int32_t, 5, 4, 3 > ::Type | Int32Tree |
typedef tree::Tree4< uint32_t, 5, 4, 3 > ::Type | UInt32Tree |
typedef tree::Tree4< int64_t, 5, 4, 3 > ::Type | Int64Tree |
typedef tree::Tree4< Hermite, 5, 4, 3 > ::Type | HermiteTree |
typedef tree::Tree4< Vec2i, 5, 4, 3 > ::Type | Vec2ITree |
typedef tree::Tree4< Vec2s, 5, 4, 3 > ::Type | Vec2STree |
typedef tree::Tree4< Vec2d, 5, 4, 3 > ::Type | Vec2DTree |
typedef tree::Tree4< Vec3i, 5, 4, 3 > ::Type | Vec3ITree |
typedef tree::Tree4< Vec3f, 5, 4, 3 > ::Type | Vec3STree |
typedef tree::Tree4< Vec3d, 5, 4, 3 > ::Type | Vec3DTree |
typedef tree::Tree4 < std::string, 5, 4, 3 >::Type | StringTree |
typedef Vec3STree | Vec3fTree |
typedef Vec3DTree | Vec3dTree |
typedef FloatTree | ScalarTree |
typedef Vec3fTree | VectorTree |
typedef Grid< BoolTree > | BoolGrid |
Common grid types. More... | |
typedef Grid< FloatTree > | FloatGrid |
typedef Grid< DoubleTree > | DoubleGrid |
typedef Grid< Int32Tree > | Int32Grid |
typedef Grid< Int64Tree > | Int64Grid |
typedef Grid< HermiteTree > | HermiteGrid |
typedef Grid< Vec3ITree > | Vec3IGrid |
typedef Grid< Vec3STree > | Vec3SGrid |
typedef Grid< Vec3DTree > | Vec3DGrid |
typedef Grid< StringTree > | StringGrid |
typedef Vec3SGrid | Vec3fGrid |
typedef Vec3DGrid | Vec3dGrid |
typedef FloatGrid | ScalarGrid |
typedef Vec3fGrid | VectorGrid |
typedef uint32_t | Index32 |
typedef uint64_t | Index64 |
typedef Index32 | Index |
typedef int16_t | Int16 |
typedef int32_t | Int32 |
typedef int64_t | Int64 |
typedef Int32 | Int |
typedef unsigned char | Byte |
typedef double | Real |
typedef math::Vec2< Real > | Vec2R |
typedef math::Vec2< Index32 > | Vec2I |
typedef math::Vec2< float > | Vec2f |
typedef math::Vec2< half > | Vec2H |
typedef math::Vec3< Real > | Vec3R |
typedef math::Vec3< Index32 > | Vec3I |
typedef math::Vec3< float > | Vec3f |
typedef math::Vec3< half > | Vec3H |
typedef math::BBox< Vec3d > | BBoxd |
typedef math::Vec4< Real > | Vec4R |
typedef math::Vec4< Index32 > | Vec4I |
typedef math::Vec4< float > | Vec4f |
typedef math::Vec4< half > | Vec4H |
typedef math::Mat3< Real > | Mat3R |
typedef math::Mat4< Real > | Mat4R |
typedef math::Mat4< double > | Mat4d |
typedef math::Mat4< float > | Mat4s |
typedef math::Hermite | Hermite |
typedef math::Quat< Real > | QuatR |
typedef TypedMetadata< bool > | BoolMetadata |
typedef TypedMetadata< double > | DoubleMetadata |
typedef TypedMetadata< float > | FloatMetadata |
typedef TypedMetadata < boost::int32_t > | Int32Metadata |
typedef TypedMetadata < boost::int64_t > | Int64Metadata |
typedef TypedMetadata< Vec2d > | Vec2DMetadata |
typedef TypedMetadata< Vec2i > | Vec2IMetadata |
typedef TypedMetadata< Vec2s > | Vec2SMetadata |
typedef TypedMetadata< Vec3d > | Vec3DMetadata |
typedef TypedMetadata< Vec3i > | Vec3IMetadata |
typedef TypedMetadata< Vec3s > | Vec3SMetadata |
typedef TypedMetadata< Mat4s > | Mat4SMetadata |
typedef TypedMetadata< Mat4d > | Mat4DMetadata |
typedef TypedMetadata < std::string > | StringMetadata |
typedef std::string | Name |
Functions | |
template<typename GridType > | |
GridType::Ptr | createGrid (const typename GridType::ValueType &background) |
Create a new grid of type GridType with a given background value. More... | |
template<typename GridType > | |
GridType::Ptr | createGrid () |
Create a new grid of type GridType with background value zero. More... | |
template<typename TreePtrType > | |
Grid< typename TreePtrType::element_type > ::Ptr | createGrid (TreePtrType) |
Create a new grid of the appropriate type that wraps the given tree. More... | |
template<typename GridType > | |
GridType::Ptr | createLevelSet (Real voxelSize=1.0, Real halfWidth=LEVEL_SET_HALF_WIDTH) |
Create a new grid of type GridType classified as a "Level Set", i.e., a narrow-band level set. More... | |
template<typename GridPtrContainerT > | |
GridPtrContainerT::value_type | findGridByName (const GridPtrContainerT &container, const Name &name) |
Return the first grid in the given container whose name is name. More... | |
template<typename KeyT , typename GridPtrT > | |
GridPtrT | findGridByName (const std::map< KeyT, GridPtrT > &container, const Name &name) |
Return the first grid in the given map whose name is name. More... | |
template<typename GridType > | |
GridType::Ptr | gridPtrCast (const GridBase::Ptr &grid) |
Cast a generic grid pointer to a pointer to a grid of a concrete class. More... | |
template<typename GridType > | |
GridType::ConstPtr | gridConstPtrCast (const GridBase::ConstPtr &grid) |
Cast a generic const grid pointer to a const pointer to a grid of a concrete class. More... | |
OPENVDB_IMPORT void | initialize () |
Global registration of basic types. More... | |
OPENVDB_IMPORT void | uninitialize () |
Global deregistration of basic types. More... | |
template<typename T > | |
const char * | typeNameAsString () |
template<> | |
const char * | typeNameAsString< bool > () |
template<> | |
const char * | typeNameAsString< float > () |
template<> | |
const char * | typeNameAsString< double > () |
template<> | |
const char * | typeNameAsString< int32_t > () |
template<> | |
const char * | typeNameAsString< uint32_t > () |
template<> | |
const char * | typeNameAsString< int64_t > () |
template<> | |
const char * | typeNameAsString< Hermite > () |
template<> | |
const char * | typeNameAsString< Vec2i > () |
template<> | |
const char * | typeNameAsString< Vec2s > () |
template<> | |
const char * | typeNameAsString< Vec2d > () |
template<> | |
const char * | typeNameAsString< Vec3i > () |
template<> | |
const char * | typeNameAsString< Vec3f > () |
template<> | |
const char * | typeNameAsString< Vec3d > () |
template<> | |
const char * | typeNameAsString< std::string > () |
template<> | |
const char * | typeNameAsString< Mat4s > () |
template<> | |
const char * | typeNameAsString< Mat4d > () |
template<> | |
math::Hermite | zeroVal< math::Hermite > () |
template<> | |
math::Mat4s | zeroVal< math::Mat4s > () |
template<> | |
math::Mat4d | zeroVal< math::Mat4d > () |
template<typename T > | |
T | zeroVal () |
Return the value of type T that corresponds to zero. More... | |
template<> | |
std::string | zeroVal< std::string > () |
Return the std::string value that corresponds to zero. More... | |
template<> | |
bool | zeroVal< bool > () |
Return the bool value that corresponds to zero. More... | |
std::ostream & | operator<< (std::ostream &ostr, const Metadata &metadata) |
Write a Metadata to an output stream. More... | |
std::ostream & | operator<< (std::ostream &, const MetaMap &) |
Write a MetaMap to an output stream. More... | |
Name | readString (std::istream &is) |
void | writeString (std::ostream &os, const Name &name) |
template<typename GridType > | |
GridType::Ptr | deepCopyTypedGrid (const GridBase::ConstPtr &grid) |
Return a pointer to a deep copy of the given grid, provided that the grid's concrete type is GridType . More... | |
template<typename GridType > | |
GridType::Ptr | deepCopyTypedGrid (const GridBase &grid) |
Return a pointer to a deep copy of the given grid, provided that the grid's concrete type is GridType . More... | |
std::string | operator+ (const std::string &s, bool) |
Needed to support the (zeroVal<ValueType>() + val) idiom when ValueType is std::string . More... | |
std::string | operator+ (const std::string &s, int) |
Needed to support the (zeroVal<ValueType>() + val) idiom when ValueType is std::string . More... | |
std::string | operator+ (const std::string &s, float) |
Needed to support the (zeroVal<ValueType>() + val) idiom when ValueType is std::string . More... | |
std::string | operator+ (const std::string &s, double) |
Needed to support the (zeroVal<ValueType>() + val) idiom when ValueType is std::string . More... | |
Variables | |
static const Real | LEVEL_SET_HALF_WIDTH = 3 |
const int32_t | OPENVDB_MAGIC = 0x56444220 |
The magic number is stored in the first four bytes of every VDB file. More... | |
const uint32_t | OPENVDB_LIBRARY_MAJOR_VERSION = 2 |
const uint32_t | OPENVDB_LIBRARY_MINOR_VERSION = 1 |
const uint32_t | OPENVDB_LIBRARY_PATCH_VERSION = 0 |
const uint32_t | OPENVDB_LIBRARY_VERSION = (( 2 << 24) | (( 1 & 0xFF) << 16) | ( 0 & 0xFFFF)) |
Library version number as a packed integer ("%02x%02x%04x", major, minor, patch) More... | |
const uint32_t | OPENVDB_FILE_VERSION = 222 |
The current version number of the VDB file format. More... | |
typedef math::BBox<Vec3d> BBoxd |
typedef TypedMetadata<bool> BoolMetadata |
typedef tree::Tree4<bool, 5, 4, 3>::Type BoolTree |
Common tree types.
typedef unsigned char Byte |
typedef Grid<DoubleTree> DoubleGrid |
typedef TypedMetadata<double> DoubleMetadata |
typedef tree::Tree4<double, 5, 4, 3>::Type DoubleTree |
typedef TypedMetadata<float> FloatMetadata |
typedef tree::Tree4<float, 5, 4, 3>::Type FloatTree |
typedef std::set<GridBase::ConstPtr> GridCPtrSet |
typedef GridCPtrSet::const_iterator GridCPtrSetCIter |
typedef GridCPtrSet::iterator GridCPtrSetIter |
typedef boost::shared_ptr<GridCPtrSet> GridCPtrSetPtr |
typedef std::vector<GridBase::ConstPtr> GridCPtrVec |
typedef GridCPtrVec::const_iterator GridCPtrVecCIter |
typedef GridCPtrVec::iterator GridCPtrVecIter |
typedef boost::shared_ptr<GridCPtrVec> GridCPtrVecPtr |
typedef std::set<GridBase::Ptr> GridPtrSet |
typedef GridPtrSet::const_iterator GridPtrSetCIter |
typedef GridPtrSet::iterator GridPtrSetIter |
typedef boost::shared_ptr<GridPtrSet> GridPtrSetPtr |
typedef std::vector<GridBase::Ptr> GridPtrVec |
typedef GridPtrVec::const_iterator GridPtrVecCIter |
typedef GridPtrVec::iterator GridPtrVecIter |
typedef boost::shared_ptr<GridPtrVec> GridPtrVecPtr |
typedef math::Hermite Hermite |
typedef Grid<HermiteTree> HermiteGrid |
typedef tree::Tree4<Hermite, 5, 4, 3>::Type HermiteTree |
typedef uint32_t Index32 |
typedef uint64_t Index64 |
typedef int16_t Int16 |
typedef int32_t Int32 |
typedef TypedMetadata<boost::int32_t> Int32Metadata |
typedef tree::Tree4<int32_t, 5, 4, 3>::Type Int32Tree |
typedef int64_t Int64 |
typedef TypedMetadata<boost::int64_t> Int64Metadata |
typedef tree::Tree4<int64_t, 5, 4, 3>::Type Int64Tree |
typedef math::Mat3<Real> Mat3R |
typedef math::Mat4<double> Mat4d |
typedef TypedMetadata<Mat4d> Mat4DMetadata |
typedef math::Mat4<Real> Mat4R |
typedef math::Mat4<float> Mat4s |
typedef TypedMetadata<Mat4s> Mat4SMetadata |
typedef std::string Name |
typedef math::Quat<Real> QuatR |
typedef double Real |
typedef FloatGrid ScalarGrid |
typedef FloatTree ScalarTree |
typedef Grid<StringTree> StringGrid |
typedef TypedMetadata<std::string> StringMetadata |
typedef tree::Tree4<std::string, 5, 4, 3>::Type StringTree |
typedef tree::TreeBase TreeBase |
typedef tree::Tree4<uint32_t, 5, 4, 3>::Type UInt32Tree |
typedef TypedMetadata<Vec2d> Vec2DMetadata |
typedef tree::Tree4<Vec2d, 5, 4, 3>::Type Vec2DTree |
typedef math::Vec2<float> Vec2f |
typedef math::Vec2<half> Vec2H |
typedef math::Vec2<Index32> Vec2I |
typedef TypedMetadata<Vec2i> Vec2IMetadata |
typedef tree::Tree4<Vec2i, 5, 4, 3>::Type Vec2ITree |
typedef math::Vec2<Real> Vec2R |
typedef TypedMetadata<Vec2s> Vec2SMetadata |
typedef tree::Tree4<Vec2s, 5, 4, 3>::Type Vec2STree |
typedef TypedMetadata<Vec3d> Vec3DMetadata |
typedef tree::Tree4<Vec3d, 5, 4, 3>::Type Vec3DTree |
typedef math::Vec3<float> Vec3f |
typedef math::Vec3<half> Vec3H |
typedef math::Vec3<Index32> Vec3I |
typedef TypedMetadata<Vec3i> Vec3IMetadata |
typedef tree::Tree4<Vec3i, 5, 4, 3>::Type Vec3ITree |
typedef math::Vec3<Real> Vec3R |
typedef TypedMetadata<Vec3s> Vec3SMetadata |
typedef tree::Tree4<Vec3f, 5, 4, 3>::Type Vec3STree |
typedef math::Vec4<float> Vec4f |
typedef math::Vec4<half> Vec4H |
typedef math::Vec4<Index32> Vec4I |
typedef math::Vec4<Real> Vec4R |
typedef Vec3fGrid VectorGrid |
typedef Vec3fTree VectorTree |
anonymous enum |
Notable file format version numbers.
enum CopyPolicy |
In copy constructors, members stored as shared pointers can be handled in several ways:
Don't copy the member; default construct a new member object instead.
Copy the shared pointer, so that the original and new objects share the same member.
Enumerator | |
---|---|
CP_NEW | |
CP_SHARE | |
CP_COPY |
enum GridClass |
enum MergePolicy |
Specify how grids should be merged during certain (typically multithreaded) operations.
The output grid is active wherever any of the input grids is active.
The output grid's tree has a node wherever any of the input grids' trees has a node, regardless of any active states.
Enumerator | |
---|---|
MERGE_ACTIVE_STATES | |
MERGE_NODES | |
MERGE_ACTIVE_STATES_AND_NODES |
enum VecType |
The type of a vector determines how transforms are applied to it:
Does not transform (e.g., tuple, uvw, color)
Apply inverse-transpose transformation: w = 0, ignores translation (e.g., gradient/normal)
Apply inverse-transpose transformation: w = 0, ignores translation, vectors are renormalized (e.g., unit normal)
Apply "regular" transformation: w = 0, ignores translation (e.g., displacement, velocity, acceleration)
Enumerator | |
---|---|
VEC_INVARIANT | |
VEC_COVARIANT | |
VEC_COVARIANT_NORMALIZE | |
VEC_CONTRAVARIANT_RELATIVE | |
VEC_CONTRAVARIANT_ABSOLUTE |
|
inline |
Create a new grid of type GridType
with a given background value.
|
inline |
Create a new grid of type GridType
with background value zero.
|
inline |
Create a new grid of the appropriate type that wraps the given tree.
GridType::Ptr createLevelSet | ( | Real | voxelSize = 1.0 , |
Real | halfWidth = LEVEL_SET_HALF_WIDTH |
||
) |
Create a new grid of type GridType
classified as a "Level Set", i.e., a narrow-band level set.
GridType::ValueType
must be a floating-point scalar.voxelSize | the size of a voxel in world units |
halfWidth | the half width of the narrow band in voxel units |
The voxel size and the narrow band half width define the grid's background value as halfWidth*voxelWidth. The transform is linear with a uniform scaling only corresponding to the specified voxel size.
|
inline |
Return a pointer to a deep copy of the given grid, provided that the grid's concrete type is GridType
.
Return a null pointer if the input pointer is null or if it points to a grid that is not of type GridType
.
|
inline |
Return a pointer to a deep copy of the given grid, provided that the grid's concrete type is GridType
.
Return a null pointer if the input pointer is null or if it points to a grid that is not of type GridType
.
|
inline |
Return the first grid in the given container whose name is name.
|
inline |
Return the first grid in the given map whose name is name.
|
inline |
Cast a generic const grid pointer to a const pointer to a grid of a concrete class.
Return a null pointer if the input pointer is null or if it points to a grid that is not of type GridType
.
|
inline |
Cast a generic grid pointer to a pointer to a grid of a concrete class.
Return a null pointer if the input pointer is null or if it points to a grid that is not of type GridType
.
OPENVDB_IMPORT void openvdb::v2_1_0::initialize | ( | ) |
Global registration of basic types.
|
inline |
Needed to support the (zeroVal<ValueType>() + val)
idiom when ValueType
is std::string
.
|
inline |
Needed to support the (zeroVal<ValueType>() + val)
idiom when ValueType
is std::string
.
|
inline |
Needed to support the (zeroVal<ValueType>() + val)
idiom when ValueType
is std::string
.
|
inline |
Needed to support the (zeroVal<ValueType>() + val)
idiom when ValueType
is std::string
.
std::ostream& openvdb::v2_1_0::operator<< | ( | std::ostream & | , |
const MetaMap & | |||
) |
Write a MetaMap to an output stream.
|
inline |
Write a Metadata to an output stream.
|
inline |
const char* openvdb::v2_1_0::typeNameAsString | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
OPENVDB_IMPORT void openvdb::v2_1_0::uninitialize | ( | ) |
Global deregistration of basic types.
|
inline |
|
inline |
Return the value of type T that corresponds to zero.
ValueType
T that cannot be constructed using the form T(0)
. For example, std::string(0)
treats 0 as NULL
and throws a std::logic_error
.
|
inline |
Return the bool
value that corresponds to zero.
|
inline |
|
inline |
|
inline |
|
inline |
Return the std::string
value that corresponds to zero.
|
static |
const uint32_t OPENVDB_FILE_VERSION = 222 |
The current version number of the VDB file format.
This can be used to enable various backwards compatability switches or to reject files that cannot be read.
const uint32_t OPENVDB_LIBRARY_MAJOR_VERSION = 2 |
const uint32_t OPENVDB_LIBRARY_MINOR_VERSION = 1 |
const uint32_t OPENVDB_LIBRARY_PATCH_VERSION = 0 |
const uint32_t OPENVDB_LIBRARY_VERSION = (( 2 << 24) | (( 1 & 0xFF) << 16) | ( 0 & 0xFFFF)) |
Library version number as a packed integer ("%02x%02x%04x", major, minor, patch)
const int32_t OPENVDB_MAGIC = 0x56444220 |
The magic number is stored in the first four bytes of every VDB file.
This can be used to quickly test whether we have a valid file or not.