OpenVDB  9.0.1
Namespaces | Typedefs | Enumerations | Functions | Variables
PointUtils.h File Reference

Utility classes and functions for OpenVDB Points Houdini plugins. More...

#include <openvdb/math/Vec3.h>
#include <openvdb/Types.h>
#include <openvdb/util/NullInterrupter.h>
#include <openvdb/points/PointDataGrid.h>
#include <GA/GA_Attribute.h>
#include <GU/GU_Detail.h>
#include <PRM/PRM_ChoiceList.h>
#include <iosfwd>
#include <map>
#include <memory>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

 openvdb_houdini
 

Typedefs

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 &)>
 

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

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...
 

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
 

Detailed Description

Utility classes and functions for OpenVDB Points Houdini plugins.

Authors
Dan Bailey, Nick Avramoussis, Richard Kwok