OpenVDB  11.0.0
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
openvdb_houdini Namespace Reference

Namespaces

 node_info_text
 Namespace to hold functionality for registering info text callbacks. Whenever getNodeSpecificInfoText() is called, the default info text is added to MMB output unless a valid callback has been registered for the grid type.
 

Classes

struct  AttributeCopy
 
struct  AttributeCopyBase
 
class  AttributeDetail
 
class  AttributeDetailBase
 
class  GenAdaptivityMaskOp
 TBB body object for threaded sharp feature construction. More...
 
class  GridResampleOp
 GridResampleOp is a functor class for use with UTvdbProcessTypedGrid() that samples an input grid into an output grid of the same type through a given transform. More...
 
class  GridResampleToMatchOp
 GridResampleToMatchOp is a functor class for use with GridBase::apply() that samples an input grid into an output grid of the same type such that, after resampling, the input and output grids coincide, but the output grid's transform is unchanged. More...
 
class  GridTransformOp
 GridTransformOp is a functor class for use with GridBase::apply() that samples an input grid into an output grid of the same type through a given affine transform. More...
 
class  GT_GEOPrimCollectVDB
 
class  HoudiniInterrupter
 Wrapper class that adapts a Houdini UT_Interrupt object for use with OpenVDB library routines. More...
 
class  Interrupter
 Deprecated wrapper class with the same interface as HoudiniInterrupter, however it does not derive from openvdb::util::NullInterrupter. Intended for backwards-compatibility only. More...
 
class  MeshAttrTransfer
 
class  OpenVDBOpFactory
 Use this class to register a new OpenVDB operator (SOP, POP, etc.) More...
 
class  PointAttrTransfer
 
class  PrimCpyOp
 TBB body object for threaded primitive copy. More...
 
class  SharpenFeaturesOp
 TBB body object for threaded sharp feature construction. More...
 
class  SOP_NodeVDB
 Base class from which to derive OpenVDB-related Houdini SOPs. More...
 
struct  StrAttributeCopy
 
class  TransferPointAttributesOp
 
class  TransferPrimitiveAttributesOp
 
class  TransformOp
 TBB body object for threaded world to voxel space transformation and copy of points. More...
 
class  VdbPrimCIterator
 Iterator over const VDB primitives on a geometry detail. More...
 
class  VdbPrimIterator
 Iterator over non-const VDB primitives on a geometry detail. More...
 
class  VertexNormalOp
 TBB body object for threaded vertex normal generation. More...
 

Typedefs

using AttributeDetailList = std::vector< AttributeDetailBase::Ptr >
 
using OffsetList = std::vector< GA_Offset >
 
using OffsetListPtr = std::shared_ptr< OffsetList >
 
using OffsetPair = std::pair< GA_Offset, GA_Offset >
 
using OffsetPairList = std::vector< OffsetPair >
 
using OffsetPairListPtr = std::shared_ptr< OffsetPairList >
 
using AttributeInfoMap = std::map< openvdb::Name, std::pair< int, bool >>
 
using WarnFunc = std::function< void(const std::string &)>
 
using Grid = openvdb::GridBase
 
using GridPtr = openvdb::GridBase::Ptr
 
using GridCPtr = openvdb::GridBase::ConstPtr
 
using GridRef = openvdb::GridBase &
 
using GridCRef = const openvdb::GridBase &
 
using ScalarGridTypes = openvdb::TypeList< openvdb::BoolGrid, openvdb::FloatGrid, openvdb::DoubleGrid, openvdb::Int32Grid, openvdb::Int64Grid >
 
using NumericGridTypes = openvdb::TypeList< openvdb::FloatGrid, openvdb::DoubleGrid, openvdb::Int32Grid, openvdb::Int64Grid >
 
using RealGridTypes = openvdb::TypeList< openvdb::FloatGrid, openvdb::DoubleGrid >
 
using Vec3GridTypes = openvdb::TypeList< openvdb::Vec3SGrid, openvdb::Vec3DGrid, openvdb::Vec3IGrid >
 
using PointGridTypes = openvdb::TypeList< openvdb::points::PointDataGrid >
 
using VolumeGridTypes = ScalarGridTypes::Append< Vec3GridTypes >
 
using AllGridTypes = VolumeGridTypes::Append< PointGridTypes >
 

Enumerations

enum  POINT_COMPRESSION_TYPE {
  COMPRESSION_NONE = 0, COMPRESSION_TRUNCATE, COMPRESSION_UNIT_VECTOR, COMPRESSION_UNIT_FIXED_POINT_8,
  COMPRESSION_UNIT_FIXED_POINT_16
}
 Enum to store available compression types for point grids. More...
 

Functions

template<typename ValueType >
ValueType evalAttr (const GA_Attribute *atr, const GA_AIFTuple *aif, GA_Offset off, int idx)
 
template<>
float evalAttr< float > (const GA_Attribute *atr, const GA_AIFTuple *aif, GA_Offset off, int idx)
 
template<>
openvdb::Int32 evalAttr< openvdb::Int32 > (const GA_Attribute *atr, const GA_AIFTuple *aif, GA_Offset off, int idx)
 
template<>
openvdb::Int64 evalAttr< openvdb::Int64 > (const GA_Attribute *atr, const GA_AIFTuple *aif, GA_Offset off, int idx)
 
template<>
openvdb::Vec3i evalAttr< openvdb::Vec3i > (const GA_Attribute *atr, const GA_AIFTuple *aif, GA_Offset off, int)
 
template<>
openvdb::Vec3s evalAttr< openvdb::Vec3s > (const GA_Attribute *atr, const GA_AIFTuple *aif, GA_Offset off, int)
 
template<>
openvdb::Vec3d evalAttr< openvdb::Vec3d > (const GA_Attribute *atr, const GA_AIFTuple *aif, GA_Offset off, int)
 
template<typename ValueType >
ValueType combine (const ValueType &v0, const ValueType &v1, const ValueType &v2, const openvdb::Vec3d &w)
 Combine different value types. More...
 
template<>
openvdb::Int32 combine (const openvdb::Int32 &v0, const openvdb::Int32 &v1, const openvdb::Int32 &v2, const openvdb::Vec3d &w)
 
template<>
openvdb::Int64 combine (const openvdb::Int64 &v0, const openvdb::Int64 &v1, const openvdb::Int64 &v2, const openvdb::Vec3d &w)
 
template<>
openvdb::Vec3i combine (const openvdb::Vec3i &v0, const openvdb::Vec3i &v1, const openvdb::Vec3i &v2, const openvdb::Vec3d &w)
 
template<>
openvdb::Vec3s combine (const openvdb::Vec3s &v0, const openvdb::Vec3s &v1, const openvdb::Vec3s &v2, const openvdb::Vec3d &w)
 
template<>
openvdb::Vec3d combine (const openvdb::Vec3d &v0, const openvdb::Vec3d &v1, const openvdb::Vec3d &v2, const openvdb::Vec3d &w)
 
template<typename ValueType >
ValueType evalAttrDefault (const GA_Defaults &defaults, int idx)
 Get an OpenVDB-specific value by evaluating GA_Default::get() with appropriate arguments. More...
 
template<>
float evalAttrDefault< float > (const GA_Defaults &defaults, int)
 
template<>
openvdb::Int32 evalAttrDefault< openvdb::Int32 > (const GA_Defaults &defaults, int idx)
 
template<>
openvdb::Int64 evalAttrDefault< openvdb::Int64 > (const GA_Defaults &defaults, int idx)
 
template<>
openvdb::Vec3i evalAttrDefault< openvdb::Vec3i > (const GA_Defaults &defaults, int)
 
template<>
openvdb::Vec3s evalAttrDefault< openvdb::Vec3s > (const GA_Defaults &defaults, int)
 
template<>
openvdb::Vec3d evalAttrDefault< openvdb::Vec3d > (const GA_Defaults &defaults, int)
 
template<>
openvdb::math::Quat< float > evalAttrDefault< openvdb::math::Quat< float > > (const GA_Defaults &defaults, int)
 
template<>
openvdb::math::Quat< double > evalAttrDefault< openvdb::math::Quat< double > > (const GA_Defaults &defaults, int)
 
template<>
openvdb::math::Mat3< float > evalAttrDefault< openvdb::math::Mat3< float > > (const GA_Defaults &defaults, int)
 
template<>
openvdb::math::Mat3< double > evalAttrDefault< openvdb::math::Mat3< double > > (const GA_Defaults &defaults, int)
 
template<>
openvdb::math::Mat4< float > evalAttrDefault< openvdb::math::Mat4< float > > (const GA_Defaults &defaults, int)
 
template<>
openvdb::math::Mat4< double > evalAttrDefault< openvdb::math::Mat4< double > > (const GA_Defaults &defaults, int)
 
AttributeCopyBase::Ptr createAttributeCopier (const GA_Attribute &sourceAttr, GA_Attribute &targetAttr)
 
GA_Offset findClosestPrimitiveToPoint (const GU_Detail &geo, const std::set< GA_Index > &primitives, const openvdb::Vec3d &p, GA_Offset &vert0, GA_Offset &vert1, GA_Offset &vert2, openvdb::Vec3d &uvw)
 
GA_Offset findClosestPrimitiveToPoint (const GU_Detail &geo, std::vector< GA_Index > &primitives, const openvdb::Vec3d &p, GA_Offset &vert0, GA_Offset &vert1, GA_Offset &vert2, openvdb::Vec3d &uvw)
 
template<class GridType >
void transferPrimitiveAttributes (const GU_Detail &sourceGeo, GU_Detail &targetGeo, GridType &indexGrid, openvdb::util::NullInterrupter &boss, const GA_PrimitiveGroup *primitives=nullptr)
 
template<class GridType >
void transferPrimitiveAttributes (const GU_Detail &sourceGeo, GU_Detail &targetGeo, GridType &indexGrid, Interrupter &boss, const GA_PrimitiveGroup *primitives=nullptr)
 
OPENVDB_HOUDINI_API void drawFrustum (GU_Detail &, const openvdb::math::Transform &, const UT_Vector3 *boxColor, const UT_Vector3 *tickColor, bool shaded, bool drawTicks=true)
 Add geometry to the given detail to indicate the extents of a frustum transform. More...
 
OPENVDB_HOUDINI_API openvdb::math::Transform::Ptr frustumTransformFromCamera (OP_Node &, OP_Context &, OBJ_Camera &, float offset, float nearPlaneDist, float farPlaneDist, float voxelDepthSize=1.0, int voxelCountX=100)
 Construct a frustum transform from a Houdini camera. More...
 
OPENVDB_HOUDINI_API bool pointInPrimGroup (GA_Offset ptnOffset, GU_Detail &, const GA_PrimitiveGroup &)
 Return true if the point at the given offset is referenced by primitives from a certain primitive group. More...
 
OPENVDB_HOUDINI_API std::unique_ptr< GU_Detail > convertGeometry (const GU_Detail &, std::string &warning, openvdb::util::NullInterrupter *)
 Convert geometry to quads and triangles. More...
 
OPENVDB_HOUDINI_API std::unique_ptr< GU_Detail > convertGeometry (const GU_Detail &detail, std::string &warning, Interrupter *boss)
 
OPENVDB_HOUDINI_API float computeVoxelSizeFromHoudini (const GU_Detail &detail, const openvdb::Index pointsPerVoxel, const openvdb::math::Mat4d &matrix, const openvdb::Index decimalPlaces, openvdb::util::NullInterrupter &interrupter)
 Compute a voxel size from a Houdini detail. More...
 
OPENVDB_HOUDINI_API float computeVoxelSizeFromHoudini (const GU_Detail &detail, const openvdb::Index pointsPerVoxel, const openvdb::math::Mat4d &matrix, const openvdb::Index decimalPlaces, Interrupter &interrupter)
 
OPENVDB_HOUDINI_API openvdb::points::PointDataGrid::Ptr convertHoudiniToPointDataGrid (const GU_Detail &detail, const int compression, const AttributeInfoMap &attributes, const openvdb::math::Transform &transform, const WarnFunc &warnings=[](const std::string &){})
 Convert a Houdini detail into a VDB Points grid. More...
 
OPENVDB_HOUDINI_API void convertPointDataGridToHoudini (GU_Detail &detail, const openvdb::points::PointDataGrid &grid, const std::vector< std::string > &attributes={}, const std::vector< std::string > &includeGroups={}, const std::vector< std::string > &excludeGroups={}, const bool inCoreOnly=false)
 Convert a VDB Points grid into Houdini points and append them to a Houdini Detail. More...
 
OPENVDB_HOUDINI_API void populateMetadataFromHoudini (openvdb::points::PointDataGrid &grid, const GU_Detail &detail, const WarnFunc &warnings=[](const std::string &){})
 Populate VDB Points grid metadata from Houdini detail attributes. More...
 
OPENVDB_HOUDINI_API void convertMetadataToHoudini (GU_Detail &detail, const openvdb::MetaMap &metaMap, const WarnFunc &warnings=[](const std::string &){})
 Convert VDB Points grid metadata into Houdini detail attributes. More...
 
OPENVDB_HOUDINI_API int16_t attributeTupleSize (const GA_Attribute *const attribute)
 Returns supported tuple sizes for conversion from GA_Attribute. More...
 
OPENVDB_HOUDINI_API GA_Storage attributeStorageType (const GA_Attribute *const attribute)
 Returns supported Storage types for conversion from GA_Attribute. More...
 
OPENVDB_HOUDINI_API void pointDataGridSpecificInfoText (std::ostream &, const openvdb::GridBase &)
 If the given grid is a PointDataGrid, add node specific info text to the stream provided. This is used to populate the MMB window in Houdini versions 15 and earlier, as well as the Operator Information Window. More...
 
OPENVDB_HOUDINI_API void collectPointInfo (const openvdb::points::PointDataGrid &grid, std::string &countStr, std::string &groupStr, std::string &attributeStr)
 Populates string data with information about the provided OpenVDB Points grid. More...
 
OPENVDB_HOUDINI_API GU_PrimVDB * createVdbPrimitive (GU_Detail &gdp, GridPtr grid, const char *name=nullptr)
 Store a VDB grid in a new VDB primitive and add the primitive to a geometry detail. More...
 
OPENVDB_HOUDINI_API GU_PrimVDB * replaceVdbPrimitive (GU_Detail &gdp, GridPtr grid, GEO_PrimVDB &src, const bool copyAttrs=true, const char *name=nullptr)
 Replace an existing VDB primitive with a new primitive that contains the given grid. More...
 
OPENVDB_HOUDINI_API bool evalGridBBox (GridCRef grid, UT_Vector3 corners[8], bool expandHalfVoxel=false)
 Return in corners the corners of the given grid's active voxel bounding box. More...
 
OPENVDB_HOUDINI_API openvdb::CoordBBox makeCoordBBox (const UT_BoundingBox &, const openvdb::math::Transform &)
 Construct an index-space CoordBBox from a UT_BoundingBox. More...
 
template<typename GridTypeListT , typename OpT >
bool GEOvdbApply (const GEO_PrimVDB &vdb, OpT &op)
 If the given primitive's grid resolves to one of the listed grid types, invoke the functor op on the resolved grid. More...
 
template<typename GridTypeListT , typename OpT >
bool GEOvdbApply (GEO_PrimVDB &vdb, OpT &op, bool makeUnique=true)
 If the given primitive's grid resolves to one of the listed grid types, invoke the functor op on the resolved grid. More...
 
OPENVDB_HOUDINI_API void startLogForwarding (OP_OpTypeId)
 Start forwarding OpenVDB log messages to the Houdini error manager for all operators of the given type. More...
 
OPENVDB_HOUDINI_API void stopLogForwarding (OP_OpTypeId)
 Stop forwarding OpenVDB log messages to the Houdini error manager for all operators of the given type. More...
 
OPENVDB_HOUDINI_API bool isLogForwarding (OP_OpTypeId)
 Return true if OpenVDB messages logged by operators of the given type are forwarded to the Houdini error manager. More...
 

Variables

const std::string META_GROUP_VIEWPORT = "group_viewport"
 Metadata name for viewport groups. More...
 
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput1
 
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput2
 
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput3
 
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput4
 
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenu
 

Typedef Documentation

using AllGridTypes = VolumeGridTypes::Append<PointGridTypes>
using AttributeInfoMap = std::map<openvdb::Name, std::pair<int, bool>>
using GridCRef = const openvdb::GridBase&
using OffsetList = std::vector<GA_Offset>
using OffsetListPtr = std::shared_ptr<OffsetList>
using OffsetPair = std::pair<GA_Offset, GA_Offset>
using OffsetPairList = std::vector<OffsetPair>
using OffsetPairListPtr = std::shared_ptr<OffsetPairList>
using PointGridTypes = openvdb::TypeList< openvdb::points::PointDataGrid>
using WarnFunc = std::function<void (const std::string&)>

Enumeration Type Documentation

Enum to store available compression types for point grids.

Enumerator
COMPRESSION_NONE 
COMPRESSION_TRUNCATE 
COMPRESSION_UNIT_VECTOR 
COMPRESSION_UNIT_FIXED_POINT_8 
COMPRESSION_UNIT_FIXED_POINT_16 

Function Documentation

OPENVDB_HOUDINI_API GA_Storage openvdb_houdini::attributeStorageType ( const GA_Attribute *const  attribute)

Returns supported Storage types for conversion from GA_Attribute.

OPENVDB_HOUDINI_API int16_t openvdb_houdini::attributeTupleSize ( const GA_Attribute *const  attribute)

Returns supported tuple sizes for conversion from GA_Attribute.

OPENVDB_HOUDINI_API void openvdb_houdini::collectPointInfo ( const openvdb::points::PointDataGrid &  grid,
std::string &  countStr,
std::string &  groupStr,
std::string &  attributeStr 
)

Populates string data with information about the provided OpenVDB Points grid.

Parameters
gridThe OpenVDB Points grid to retrieve information from.
countStrThe total point count as a formatted integer.
groupStrThe list of comma separated groups (or "none" if no groups exist). Enclosed by parentheses.
attributeStrThe list of comma separated attributes (or "none" if no attributes exist). Enclosed by parentheses. Each attribute takes the form "name [type] [code] [stride]" where code and stride are added for non default attributes.
ValueType openvdb_houdini::combine ( const ValueType &  v0,
const ValueType &  v1,
const ValueType &  v2,
const openvdb::Vec3d &  w 
)
inline

Combine different value types.

openvdb::Int32 openvdb_houdini::combine ( const openvdb::Int32 v0,
const openvdb::Int32 v1,
const openvdb::Int32 v2,
const openvdb::Vec3d &  w 
)
inline
openvdb::Int64 openvdb_houdini::combine ( const openvdb::Int64 v0,
const openvdb::Int64 v1,
const openvdb::Int64 v2,
const openvdb::Vec3d &  w 
)
inline
openvdb::Vec3i openvdb_houdini::combine ( const openvdb::Vec3i &  v0,
const openvdb::Vec3i &  v1,
const openvdb::Vec3i &  v2,
const openvdb::Vec3d &  w 
)
inline
openvdb::Vec3s openvdb_houdini::combine ( const openvdb::Vec3s &  v0,
const openvdb::Vec3s &  v1,
const openvdb::Vec3s &  v2,
const openvdb::Vec3d &  w 
)
inline
openvdb::Vec3d openvdb_houdini::combine ( const openvdb::Vec3d &  v0,
const openvdb::Vec3d &  v1,
const openvdb::Vec3d &  v2,
const openvdb::Vec3d &  w 
)
inline
OPENVDB_HOUDINI_API float openvdb_houdini::computeVoxelSizeFromHoudini ( const GU_Detail &  detail,
const openvdb::Index  pointsPerVoxel,
const openvdb::math::Mat4d &  matrix,
const openvdb::Index  decimalPlaces,
openvdb::util::NullInterrupter &  interrupter 
)

Compute a voxel size from a Houdini detail.

Parameters
detailGU_Detail to compute the voxel size from
pointsPerVoxelthe target number of points per voxel, must be positive and non-zero
matrixvoxel size will be computed using this transform
decimalPlacesfor readability, truncate voxel size to this number of decimals
interruptera Houdini interrupter
OPENVDB_HOUDINI_API float openvdb_houdini::computeVoxelSizeFromHoudini ( const GU_Detail &  detail,
const openvdb::Index  pointsPerVoxel,
const openvdb::math::Mat4d &  matrix,
const openvdb::Index  decimalPlaces,
Interrupter interrupter 
)
Deprecated:
"openvdb_houdini::Interrupter has been deprecated, use openvdb_houdini::HoudiniInterrupter"
OPENVDB_HOUDINI_API std::unique_ptr<GU_Detail> openvdb_houdini::convertGeometry ( const GU_Detail &  ,
std::string &  warning,
openvdb::util::NullInterrupter *   
)

Convert geometry to quads and triangles.

Returns
a pointer to a new GU_Detail object if the geometry was converted or subdivided, otherwise a null pointer
OPENVDB_HOUDINI_API std::unique_ptr<GU_Detail> openvdb_houdini::convertGeometry ( const GU_Detail &  detail,
std::string &  warning,
Interrupter boss 
)
Deprecated:
"openvdb_houdini::Interrupter has been deprecated, use openvdb_houdini::HoudiniInterrupter"
OPENVDB_HOUDINI_API openvdb::points::PointDataGrid::Ptr openvdb_houdini::convertHoudiniToPointDataGrid ( const GU_Detail &  detail,
const int  compression,
const AttributeInfoMap attributes,
const openvdb::math::Transform &  transform,
const WarnFunc warnings = [](const std::string &){} 
)

Convert a Houdini detail into a VDB Points grid.

Parameters
detailGU_Detail to convert the points and attributes from
compressionposition compression to use
attributesa vector of VDB Points attributes to be included (empty vector defaults to all)
transformtransform to use for the new point grid
warningslist of warnings to be added to the SOP
OPENVDB_HOUDINI_API void openvdb_houdini::convertMetadataToHoudini ( GU_Detail &  detail,
const openvdb::MetaMap metaMap,
const WarnFunc warnings = [](const std::string &){} 
)

Convert VDB Points grid metadata into Houdini detail attributes.

Parameters
detailGU_Detail to add the Houdini detail attributes
metaMapthe metamap to create the Houdini detail attributes from
warningslist of warnings to be added to the SOP
OPENVDB_HOUDINI_API void openvdb_houdini::convertPointDataGridToHoudini ( GU_Detail &  detail,
const openvdb::points::PointDataGrid &  grid,
const std::vector< std::string > &  attributes = {},
const std::vector< std::string > &  includeGroups = {},
const std::vector< std::string > &  excludeGroups = {},
const bool  inCoreOnly = false 
)

Convert a VDB Points grid into Houdini points and append them to a Houdini Detail.

Parameters
detailGU_Detail to append the converted points and attributes to
gridgrid containing the points that will be converted
attributesa vector of VDB Points attributes to be included (empty vector defaults to all)
includeGroupsa vector of VDB Points groups to be included (empty vector defaults to all)
excludeGroupsa vector of VDB Points groups to be excluded (empty vector defaults to none)
inCoreOnlytrue if out-of-core leaf nodes are to be ignored
AttributeCopyBase::Ptr openvdb_houdini::createAttributeCopier ( const GA_Attribute &  sourceAttr,
GA_Attribute &  targetAttr 
)
inline
OPENVDB_HOUDINI_API GU_PrimVDB* openvdb_houdini::createVdbPrimitive ( GU_Detail &  gdp,
GridPtr  grid,
const char *  name = nullptr 
)

Store a VDB grid in a new VDB primitive and add the primitive to a geometry detail.

Returns
the newly-created VDB primitive.
Parameters
gdpthe detail to which to add the primitive
gridthe VDB grid to be added
nameif non-null, set the new primitive's name attribute to this string
Note
This operation clears the input grid's metadata.
OPENVDB_HOUDINI_API void openvdb_houdini::drawFrustum ( GU_Detail &  ,
const openvdb::math::Transform &  ,
const UT_Vector3 *  boxColor,
const UT_Vector3 *  tickColor,
bool  shaded,
bool  drawTicks = true 
)

Add geometry to the given detail to indicate the extents of a frustum transform.

ValueType openvdb_houdini::evalAttr ( const GA_Attribute *  atr,
const GA_AIFTuple *  aif,
GA_Offset  off,
int  idx 
)
inline

Get OpenVDB specific value, by calling GA_AIFTuple::get() with appropriate arguments.

float openvdb_houdini::evalAttr< float > ( const GA_Attribute *  atr,
const GA_AIFTuple *  aif,
GA_Offset  off,
int  idx 
)
inline
openvdb::Int32 openvdb_houdini::evalAttr< openvdb::Int32 > ( const GA_Attribute *  atr,
const GA_AIFTuple *  aif,
GA_Offset  off,
int  idx 
)
inline
openvdb::Int64 openvdb_houdini::evalAttr< openvdb::Int64 > ( const GA_Attribute *  atr,
const GA_AIFTuple *  aif,
GA_Offset  off,
int  idx 
)
inline
openvdb::Vec3d openvdb_houdini::evalAttr< openvdb::Vec3d > ( const GA_Attribute *  atr,
const GA_AIFTuple *  aif,
GA_Offset  off,
int   
)
inline
openvdb::Vec3i openvdb_houdini::evalAttr< openvdb::Vec3i > ( const GA_Attribute *  atr,
const GA_AIFTuple *  aif,
GA_Offset  off,
int   
)
inline
openvdb::Vec3s openvdb_houdini::evalAttr< openvdb::Vec3s > ( const GA_Attribute *  atr,
const GA_AIFTuple *  aif,
GA_Offset  off,
int   
)
inline
ValueType openvdb_houdini::evalAttrDefault ( const GA_Defaults &  defaults,
int  idx 
)
inline

Get an OpenVDB-specific value by evaluating GA_Default::get() with appropriate arguments.

float openvdb_houdini::evalAttrDefault< float > ( const GA_Defaults &  defaults,
int   
)
inline
openvdb::Int32 openvdb_houdini::evalAttrDefault< openvdb::Int32 > ( const GA_Defaults &  defaults,
int  idx 
)
inline
openvdb::Int64 openvdb_houdini::evalAttrDefault< openvdb::Int64 > ( const GA_Defaults &  defaults,
int  idx 
)
inline
openvdb::math::Mat3<double> openvdb_houdini::evalAttrDefault< openvdb::math::Mat3< double > > ( const GA_Defaults &  defaults,
int   
)
inline
openvdb::math::Mat3<float> openvdb_houdini::evalAttrDefault< openvdb::math::Mat3< float > > ( const GA_Defaults &  defaults,
int   
)
inline
openvdb::math::Mat4<double> openvdb_houdini::evalAttrDefault< openvdb::math::Mat4< double > > ( const GA_Defaults &  defaults,
int   
)
inline
openvdb::math::Mat4<float> openvdb_houdini::evalAttrDefault< openvdb::math::Mat4< float > > ( const GA_Defaults &  defaults,
int   
)
inline
openvdb::math::Quat<double> openvdb_houdini::evalAttrDefault< openvdb::math::Quat< double > > ( const GA_Defaults &  defaults,
int   
)
inline
openvdb::math::Quat<float> openvdb_houdini::evalAttrDefault< openvdb::math::Quat< float > > ( const GA_Defaults &  defaults,
int   
)
inline
openvdb::Vec3d openvdb_houdini::evalAttrDefault< openvdb::Vec3d > ( const GA_Defaults &  defaults,
int   
)
inline
openvdb::Vec3i openvdb_houdini::evalAttrDefault< openvdb::Vec3i > ( const GA_Defaults &  defaults,
int   
)
inline
openvdb::Vec3s openvdb_houdini::evalAttrDefault< openvdb::Vec3s > ( const GA_Defaults &  defaults,
int   
)
inline
OPENVDB_HOUDINI_API bool openvdb_houdini::evalGridBBox ( GridCRef  grid,
UT_Vector3  corners[8],
bool  expandHalfVoxel = false 
)

Return in corners the corners of the given grid's active voxel bounding box.

Returns
false if the grid has no active voxels.
GA_Offset openvdb_houdini::findClosestPrimitiveToPoint ( const GU_Detail &  geo,
const std::set< GA_Index > &  primitives,
const openvdb::Vec3d &  p,
GA_Offset &  vert0,
GA_Offset &  vert1,
GA_Offset &  vert2,
openvdb::Vec3d &  uvw 
)
inline
GA_Offset openvdb_houdini::findClosestPrimitiveToPoint ( const GU_Detail &  geo,
std::vector< GA_Index > &  primitives,
const openvdb::Vec3d &  p,
GA_Offset &  vert0,
GA_Offset &  vert1,
GA_Offset &  vert2,
openvdb::Vec3d &  uvw 
)
inline
OPENVDB_HOUDINI_API openvdb::math::Transform::Ptr openvdb_houdini::frustumTransformFromCamera ( OP_Node &  ,
OP_Context &  ,
OBJ_Camera &  ,
float  offset,
float  nearPlaneDist,
float  farPlaneDist,
float  voxelDepthSize = 1.0,
int  voxelCountX = 100 
)

Construct a frustum transform from a Houdini camera.

bool openvdb_houdini::GEOvdbApply ( const GEO_PrimVDB &  vdb,
OpT &  op 
)
inline

If the given primitive's grid resolves to one of the listed grid types, invoke the functor op on the resolved grid.

Returns
true if the functor was invoked, false otherwise
bool openvdb_houdini::GEOvdbApply ( GEO_PrimVDB &  vdb,
OpT &  op,
bool  makeUnique = true 
)
inline

If the given primitive's grid resolves to one of the listed grid types, invoke the functor op on the resolved grid.

Returns
true if the functor was invoked, false otherwise

If makeUnique is true, deep copy the grid's tree before invoking the functor if the tree is shared with other grids.

OPENVDB_HOUDINI_API bool openvdb_houdini::isLogForwarding ( OP_OpTypeId  )

Return true if OpenVDB messages logged by operators of the given type are forwarded to the Houdini error manager.

See also
startLogForwarding(), stopLogForwarding()
OPENVDB_HOUDINI_API openvdb::CoordBBox openvdb_houdini::makeCoordBBox ( const UT_BoundingBox &  ,
const openvdb::math::Transform &   
)

Construct an index-space CoordBBox from a UT_BoundingBox.

OPENVDB_HOUDINI_API void openvdb_houdini::pointDataGridSpecificInfoText ( std::ostream &  ,
const openvdb::GridBase  
)

If the given grid is a PointDataGrid, add node specific info text to the stream provided. This is used to populate the MMB window in Houdini versions 15 and earlier, as well as the Operator Information Window.

OPENVDB_HOUDINI_API bool openvdb_houdini::pointInPrimGroup ( GA_Offset  ptnOffset,
GU_Detail &  ,
const GA_PrimitiveGroup &   
)

Return true if the point at the given offset is referenced by primitives from a certain primitive group.

OPENVDB_HOUDINI_API void openvdb_houdini::populateMetadataFromHoudini ( openvdb::points::PointDataGrid &  grid,
const GU_Detail &  detail,
const WarnFunc warnings = [](const std::string &){} 
)

Populate VDB Points grid metadata from Houdini detail attributes.

Parameters
gridgrid to be populated with metadata
detailGU_Detail to extract the detail attributes from
warningslist of warnings to be added to the SOP
OPENVDB_HOUDINI_API GU_PrimVDB* openvdb_houdini::replaceVdbPrimitive ( GU_Detail &  gdp,
GridPtr  grid,
GEO_PrimVDB &  src,
const bool  copyAttrs = true,
const char *  name = nullptr 
)

Replace an existing VDB primitive with a new primitive that contains the given grid.

Returns
the newly-created VDB primitive.
Parameters
gdpthe detail to which to add the primitive
gridthe VDB grid to be added
srcreplace this primitive with the newly-created primitive
copyAttrsif true, copy attributes and group membership from the src primitive
nameif non-null, set the new primitive's name attribute to this string; otherwise, if copyAttrs is true, copy the name from src
Note
This operation clears the input grid's metadata.
OPENVDB_HOUDINI_API void openvdb_houdini::startLogForwarding ( OP_OpTypeId  )

Start forwarding OpenVDB log messages to the Houdini error manager for all operators of the given type.

Typically, log forwarding is enabled for specific operator types during initialization of the openvdb_houdini library, and there's no need for client code to call this function.

This function has no effect unless OpenVDB was built with log4cplus.

Note
OpenVDB messages are typically logged to the console as well. This function has no effect on console logging.
See also
stopLogForwarding(), isLogForwarding()
OPENVDB_HOUDINI_API void openvdb_houdini::stopLogForwarding ( OP_OpTypeId  )

Stop forwarding OpenVDB log messages to the Houdini error manager for all operators of the given type.

Typically, log forwarding is enabled for specific operator types during initialization of the openvdb_houdini library, and there's no need for client code to disable it.

This function has no effect unless OpenVDB was built with log4cplus.

Note
OpenVDB messages are typically logged to the console as well. This function has no effect on console logging.
See also
startLogForwarding(), isLogForwarding()
void openvdb_houdini::transferPrimitiveAttributes ( const GU_Detail &  sourceGeo,
GU_Detail &  targetGeo,
GridType &  indexGrid,
openvdb::util::NullInterrupter &  boss,
const GA_PrimitiveGroup *  primitives = nullptr 
)
inline
void openvdb_houdini::transferPrimitiveAttributes ( const GU_Detail &  sourceGeo,
GU_Detail &  targetGeo,
GridType &  indexGrid,
Interrupter boss,
const GA_PrimitiveGroup *  primitives = nullptr 
)

Variable Documentation

const std::string META_GROUP_VIEWPORT = "group_viewport"

Metadata name for viewport groups.

OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenu
Note
Use this if you have more than 4 inputs, otherwise use the input specific menus instead which automatically handle the appropriate spare data settings.
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput1
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput2
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput3
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput4