10 #ifndef OPENVDB_HOUDINI_POINT_UTILS_HAS_BEEN_INCLUDED 11 #define OPENVDB_HOUDINI_POINT_UTILS_HAS_BEEN_INCLUDED 18 #include <GA/GA_Attribute.h> 19 #include <GU/GU_Detail.h> 20 #include <PRM/PRM_ChoiceList.h> 30 #ifdef OPENVDB_HOUDINI_API 31 #undef OPENVDB_HOUDINI_API 32 #define OPENVDB_HOUDINI_API 49 using WarnFunc = std::function<void (const std::string&)>;
84 openvdb::util::NullInterrupter& interrupter);
108 const GU_Detail& detail,
109 const
int compression,
111 const
openvdb::math::Transform& transform,
112 const
WarnFunc& warnings = [](const
std::
string&){});
131 const std::vector<std::string>& attributes = {},
132 const std::vector<std::string>& includeGroups = {},
133 const std::vector<std::string>& excludeGroups = {},
134 const bool inCoreOnly =
false);
146 const GU_Detail& detail,
147 const WarnFunc& warnings = [](
const std::string&){});
160 const WarnFunc& warnings = [](
const std::string&){});
199 std::string& countStr,
200 std::string& groupStr,
201 std::string& attributeStr);
221 #endif // OPENVDB_HOUDINI_POINT_UTILS_HAS_BEEN_INCLUDED std::function< void(const std::string &)> WarnFunc
Definition: PointUtils.h:49
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.
Grid< PointDataTree > PointDataGrid
Point data grid.
Definition: PointDataGrid.h:194
Mat4< double > Mat4d
Definition: Mat4.h:1368
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput2
POINT_COMPRESSION_TYPE
Enum to store available compression types for point grids.
Definition: PointUtils.h:56
Abstract base class for typed grids.
Definition: Grid.h:77
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.
std::vector< GA_Offset > OffsetList
Definition: PointUtils.h:39
std::pair< GA_Offset, GA_Offset > OffsetPair
Definition: PointUtils.h:42
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.
Definition: PointUtils.h:59
std::shared_ptr< OffsetList > OffsetListPtr
Definition: PointUtils.h:40
std::map< openvdb::Name, std::pair< int, bool >> AttributeInfoMap
Definition: PointUtils.h:47
Definition: PointUtils.h:60
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.
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.
std::vector< OffsetPair > OffsetPairList
Definition: PointUtils.h:43
Definition: VoxToNanoVDB.h:14
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput4
const std::string META_GROUP_VIEWPORT
Metadata name for viewport groups.
Definition: PointUtils.h:52
Definition: Exceptions.h:13
std::shared_ptr< OffsetPairList > OffsetPairListPtr
Definition: PointUtils.h:44
Definition: PointUtils.h:61
Definition: PointUtils.h:62
Index32 Index
Definition: Types.h:54
OPENVDB_HOUDINI_API GA_Storage attributeStorageType(const GA_Attribute *const attribute)
Returns supported Storage types for conversion from GA_Attribute.
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput1
Deprecated wrapper class with the same interface as HoudiniInterrupter, however it does not derive fr...
Definition: Utils.h:208
Definition: AttributeTransferUtil.h:34
Attribute-owned data structure for points. Point attributes are stored in leaf nodes and ordered by v...
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenuInput3
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.
OPENVDB_HOUDINI_API int16_t attributeTupleSize(const GA_Attribute *const attribute)
Returns supported tuple sizes for conversion from GA_Attribute.
OPENVDB_HOUDINI_API const PRM_ChoiceList VDBPointsGroupMenu
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.
Definition: PointUtils.h:58