OpenVDB: openvdb::v3_1_0 Namespace Reference

OpenVDB 3.1.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
openvdb::v3_1_0 Namespace Reference

## Namespaces
| io
| math
| tools
| tree
| util

## Classes
class | ArithmeticError
struct | CanConvertType
| CanConvertType<FromType, ToType>::value is `true` if a value of type ToType can be constructed from a value of type FromType. More...
struct | CanConvertType< math::Vec2< T >, math::Vec2< T > >
struct | CanConvertType< math::Vec3< T >, math::Vec3< T > >
struct | CanConvertType< math::Vec4< T >, math::Vec4< T > >
struct | CanConvertType< PointDataIndex32, PointIndex32 >
struct | CanConvertType< PointIndex32, PointDataIndex32 >
struct | CanConvertType< T, math::Vec2< T > >
struct | CanConvertType< T, math::Vec3< T > >
struct | CanConvertType< T, math::Vec4< T > >
struct | CanConvertType< T0, math::Vec2< T1 > >
struct | CanConvertType< T0, math::Vec3< T1 > >
struct | CanConvertType< T0, math::Vec4< T1 > >
class | CombineArgs
| This struct collects both input and output arguments to "grid combiner" functors used with the tree::TypedGrid::combineExtended() and combine2Extended() methods. AValueType and BValueType are the value types of the two grids being combined. More...
class | Exception
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...
class | IllegalValueException
class | IndexError
class | IoError
class | KeyError
class | LookupError
class | Metadata
| Base class for storing metadata information in a grid. More...
class | MetaMap
| Container that maps names (strings) to values of arbitrary types. More...
class | NotImplementedError
class | PartialCreate
struct | PointIndex
| Integer wrapper, required to distinguish PointIndexGrid and PointDataGrid from Int32Grid and Int64Grid. More...
class | ReferenceError
class | RuntimeError
class | ShallowCopy
struct | SwappedCombineOp
class | TopologyCopy
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...
class | TypedMetadata
| Templated metadata class to hold specific types. More...
class | TypeError
class | UnknownMetadata
| Subclass to read (and ignore) data of an unregistered type. More...
class | ValueError
struct | VecTraits
struct | VecTraits< math::Vec2< T > >
struct | VecTraits< math::Vec3< T > >
struct | VecTraits< math::Vec4< T > >
struct | VersionId

## 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< 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< 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::Quat< Real > | QuatR
typedef PointIndex< Index32, 0 > | PointIndex32
typedef PointIndex< Index64, 0 > | PointIndex64
typedef PointIndex< Index32, 1 > | PointDataIndex32
typedef PointIndex< Index64, 1 > | PointDataIndex64
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

## Enumerations
enum | GridClass { GRID_UNKNOWN = 0, GRID_LEVEL_SET, GRID_FOG_VOLUME, GRID_STAGGERED }
enum | { NUM_GRID_CLASSES = GRID_STAGGERED + 1 }
enum | VecType { VEC_INVARIANT = 0, VEC_COVARIANT, VEC_COVARIANT_NORMALIZE, VEC_CONTRAVARIANT_RELATIVE, VEC_CONTRAVARIANT_ABSOLUTE }
enum | { NUM_VEC_TYPES = VEC_CONTRAVARIANT_ABSOLUTE + 1 }
enum | MergePolicy { MERGE_ACTIVE_STATES = 0, MERGE_NODES, MERGE_ACTIVE_STATES_AND_NODES }
enum | CopyPolicy { CP_NEW, CP_SHARE, CP_COPY }
enum | { OPENVDB_FILE_VERSION_ROOTNODE_MAP = 213, OPENVDB_FILE_VERSION_INTERNALNODE_COMPRESSION = 214, OPENVDB_FILE_VERSION_SIMPLIFIED_GRID_TYPENAME = 215, OPENVDB_FILE_VERSION_GRID_INSTANCING = 216, OPENVDB_FILE_VERSION_BOOL_LEAF_OPTIMIZATION = 217, OPENVDB_FILE_VERSION_BOOST_UUID = 218, OPENVDB_FILE_VERSION_NO_GRIDMAP = 219, OPENVDB_FILE_VERSION_NEW_TRANSFORM = 219, OPENVDB_FILE_VERSION_SELECTIVE_COMPRESSION = 220, OPENVDB_FILE_VERSION_FLOAT_FRUSTUM_BBOX = 221, OPENVDB_FILE_VERSION_NODE_MASK_COMPRESSION = 222, OPENVDB_FILE_VERSION_BLOSC_COMPRESSION = 223, OPENVDB_FILE_VERSION_POINT_INDEX_GRID = 223 }
| Notable file format version numbers. More...

## 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< 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<>
const char * | typeNameAsString< PointIndex32 > ()
template<>
const char * | typeNameAsString< PointIndex64 > ()
template<>
const char * | typeNameAsString< PointDataIndex32 > ()
template<>
const char * | typeNameAsString< PointDataIndex64 > ()
const char * | getLibraryVersionString ()
| Return a library version number string of the form "<major>.<minor>.<patch>". More...
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 = 3
const uint32_t | OPENVDB_LIBRARY_MINOR_VERSION = 1
const uint32_t | OPENVDB_LIBRARY_PATCH_VERSION = 0
const uint32_t | OPENVDB_LIBRARY_VERSION = (( 3 << 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 = 223
| The current version number of the VDB file format. More...

## Typedef Documentation

typedef math::BBox<Vec3d> BBoxd

typedef Grid<BoolTree> BoolGrid

Common grid types.

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 Grid<FloatTree> FloatGrid

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 Index32 Index

typedef uint32_t Index32

typedef uint64_t Index64

typedef Int32 Int

typedef int16_t Int16

typedef int32_t Int32

typedef Grid<Int32Tree> Int32Grid

typedef TypedMetadata<boost::int32_t> Int32Metadata

typedef tree::Tree4<int32_t, 5, 4, 3>::Type Int32Tree

typedef int64_t Int64

typedef Grid<Int64Tree> Int64Grid

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 PointIndex<Index32, 1> PointDataIndex32

typedef PointIndex<Index64, 1> PointDataIndex64

typedef PointIndex<Index32, 0> PointIndex32

typedef PointIndex<Index64, 0> PointIndex64

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 Grid<Vec3DTree> Vec3DGrid

typedef Vec3DGrid Vec3dGrid

typedef TypedMetadata<Vec3d> Vec3DMetadata

typedef tree::Tree4<Vec3d, 5, 4, 3>::Type Vec3DTree

typedef Vec3DTree Vec3dTree

typedef math::Vec3<float> Vec3f

typedef Vec3SGrid Vec3fGrid

typedef Vec3STree Vec3fTree

typedef math::Vec3<half> Vec3H

typedef math::Vec3<Index32> Vec3I

typedef Grid<Vec3ITree> Vec3IGrid

typedef TypedMetadata<Vec3i> Vec3IMetadata

typedef tree::Tree4<Vec3i, 5, 4, 3>::Type Vec3ITree

typedef math::Vec3<Real> Vec3R

typedef Grid<Vec3STree> Vec3SGrid

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

## Enumeration Type Documentation

anonymous enum

Enumerator
NUM_GRID_CLASSES |

anonymous enum

Enumerator
NUM_VEC_TYPES |

anonymous enum

Notable file format version numbers.

Enumerator
OPENVDB_FILE_VERSION_ROOTNODE_MAP |
OPENVDB_FILE_VERSION_INTERNALNODE_COMPRESSION |
OPENVDB_FILE_VERSION_SIMPLIFIED_GRID_TYPENAME |
OPENVDB_FILE_VERSION_GRID_INSTANCING |
OPENVDB_FILE_VERSION_BOOL_LEAF_OPTIMIZATION |
OPENVDB_FILE_VERSION_BOOST_UUID |
OPENVDB_FILE_VERSION_NO_GRIDMAP |
OPENVDB_FILE_VERSION_NEW_TRANSFORM |
OPENVDB_FILE_VERSION_SELECTIVE_COMPRESSION |
OPENVDB_FILE_VERSION_FLOAT_FRUSTUM_BBOX |
OPENVDB_FILE_VERSION_NODE_MASK_COMPRESSION |
OPENVDB_FILE_VERSION_BLOSC_COMPRESSION |
OPENVDB_FILE_VERSION_POINT_INDEX_GRID |

enum CopyPolicy

In copy constructors, members stored as shared pointers can be handled in several ways:

CP_NEW

  Don't copy the member; default construct a new member object instead.

CP_SHARE

  Copy the shared pointer, so that the original and new objects share the same member.

CP_COPY
  Create a deep copy of the member.

Enumerator
CP_NEW |
CP_SHARE |
CP_COPY |

enum GridClass

Enumerator
GRID_UNKNOWN |
GRID_LEVEL_SET |
GRID_FOG_VOLUME |
GRID_STAGGERED |

enum MergePolicy

Specify how grids should be merged during certain (typically multithreaded) operations.

MERGE_ACTIVE_STATES

  The output grid is active wherever any of the input grids is active.

MERGE_NODES

  The output grid's tree has a node wherever any of the input grids' trees has a node, regardless of any active states.

MERGE_ACTIVE_STATES_AND_NODES
  The output grid is active wherever any of the input grids is active, and its tree has a node wherever any of the input grids' trees has a node.

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:

Invariant

  Does not transform (e.g., tuple, uvw, color)

Covariant

  Apply inverse-transpose transformation: w = 0, ignores translation (e.g., gradient/normal)

Covariant Normalize

  Apply inverse-transpose transformation: w = 0, ignores translation, vectors are renormalized (e.g., unit normal)

Contravariant Relative

  Apply "regular" transformation: w = 0, ignores translation (e.g., displacement, velocity, acceleration)

Contravariant Absolute
  Apply "regular" transformation: w = 1, vector translates (e.g., position)

Enumerator
VEC_INVARIANT |
VEC_COVARIANT |
VEC_COVARIANT_NORMALIZE |
VEC_CONTRAVARIANT_RELATIVE |
VEC_CONTRAVARIANT_ABSOLUTE |

## Function Documentation

GridType::Ptr createGrid | ( | const typename GridType::ValueType & | background | ) |
| inline

Create a new grid of type `GridType` with a given background value.

Note
  Calling createGrid<GridType>(background) is equivalent to calling GridType::create(background).

GridType::Ptr createGrid | ( |  | ) |
| inline

Create a new grid of type `GridType` with background value zero.

Note
  Calling createGrid<GridType>() is equivalent to calling GridType::create().

Grid< typename TreePtrType::element_type >::Ptr createGrid | ( | TreePtrType | tree | ) |
| inline

Create a new grid of the appropriate type that wraps the given tree.

Note
  This function can be called without specifying the template argument, i.e., as createGrid(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.

Note
  `GridType::ValueType` must be a floating-point scalar.

Parameters

  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.

Note
  It is generally advisable to specify a half-width of the narrow band that is larger than one voxel unit, otherwise zero crossings are not guaranteed.

GridType::Ptr openvdb::v3_1_0::deepCopyTypedGrid | ( | const GridBase::ConstPtr & | grid | ) |
| 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`.

GridType::Ptr openvdb::v3_1_0::deepCopyTypedGrid | ( | const GridBase & | grid | ) |
| 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`.

GridPtrContainerT::value_type openvdb::v3_1_0::findGridByName | ( | const GridPtrContainerT & | container,
|  | const Name & | name
| ) |  |
| inline

Return the first grid in the given container whose name is name.

GridPtrT openvdb::v3_1_0::findGridByName | ( | const std::map< KeyT, GridPtrT > & | container,
|  | const Name & | name
| ) |  |
| inline

Return the first grid in the given map whose name is name.

const char* openvdb::v3_1_0::getLibraryVersionString | ( |  | ) |
| inline

Return a library version number string of the form "<major>.<minor>.<patch>".

GridType::ConstPtr openvdb::v3_1_0::gridConstPtrCast | ( | const GridBase::ConstPtr & | grid | ) |
| 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`.

Note
  Calling gridConstPtrCast<GridType>(grid) is equivalent to calling GridBase::constGrid<GridType>(grid).

GridType::Ptr openvdb::v3_1_0::gridPtrCast | ( | const GridBase::Ptr & | grid | ) |
| 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`.

Note
  Calling gridPtrCast<GridType>(grid) is equivalent to calling GridBase::grid<GridType>(grid).

OPENVDB_IMPORT void openvdb::v3_1_0::initialize | ( |  | ) |

Global registration of basic types.

std::string openvdb::v3_1_0::operator+ | ( | const std::string & | s,
|  | bool |
| ) |  |
| inline

Needed to support the `(zeroVal<ValueType>() + val)` idiom when `ValueType` is `std::string`.

std::string openvdb::v3_1_0::operator+ | ( | const std::string & | s,
|  | int |
| ) |  |
| inline

Needed to support the `(zeroVal<ValueType>() + val)` idiom when `ValueType` is `std::string`.

std::string openvdb::v3_1_0::operator+ | ( | const std::string & | s,
|  | float |
| ) |  |
| inline

Needed to support the `(zeroVal<ValueType>() + val)` idiom when `ValueType` is `std::string`.

std::string openvdb::v3_1_0::operator+ | ( | const std::string & | s,
|  | double |
| ) |  |
| inline

Needed to support the `(zeroVal<ValueType>() + val)` idiom when `ValueType` is `std::string`.

std::ostream& openvdb::v3_1_0::operator<< | ( | std::ostream & | ,
|  | const MetaMap & |
| ) |  |

Write a MetaMap to an output stream.

std::ostream & operator<< | ( | std::ostream & | ostr,
|  | const Metadata & | metadata
| ) |  |
| inline

Write a Metadata to an output stream.

Name openvdb::v3_1_0::readString | ( | std::istream & | is | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString | ( |  | ) |

const char* openvdb::v3_1_0::typeNameAsString< bool > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< double > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< float > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< int32_t > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< int64_t > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< Mat4d > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< Mat4s > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< PointDataIndex32 > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< PointDataIndex64 > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< PointIndex32 > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< PointIndex64 > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< std::string > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< uint32_t > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< Vec2d > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< Vec2i > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< Vec2s > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< Vec3d > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< Vec3f > | ( |  | ) |
| inline

const char* openvdb::v3_1_0::typeNameAsString< Vec3i > | ( |  | ) |
| inline

OPENVDB_IMPORT void openvdb::v3_1_0::uninitialize | ( |  | ) |

Global deregistration of basic types.

void openvdb::v3_1_0::writeString | ( | std::ostream & | os,
|  | const Name & | name
| ) |  |
| inline

T openvdb::v3_1_0::zeroVal | ( |  | ) |
| inline

Return the value of type T that corresponds to zero.

Note
  A zeroVal<T>() specialization must be defined for each `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`.

bool openvdb::v3_1_0::zeroVal< bool > | ( |  | ) |
| inline

Return the `bool` value that corresponds to zero.

math::Mat4d openvdb::v3_1_0::zeroVal< math::Mat4d > | ( |  | ) |
| inline

math::Mat4s openvdb::v3_1_0::zeroVal< math::Mat4s > | ( |  | ) |
| inline

std::string openvdb::v3_1_0::zeroVal< std::string > | ( |  | ) |
| inline

Return the `std::string` value that corresponds to zero.

## Variable Documentation

const Real LEVEL_SET_HALF_WIDTH = 3
| static

const uint32_t OPENVDB_FILE_VERSION = 223

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 = 3

const uint32_t OPENVDB_LIBRARY_MINOR_VERSION = 1

const uint32_t OPENVDB_LIBRARY_PATCH_VERSION = 0

const uint32_t OPENVDB_LIBRARY_VERSION = (( 3 << 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.