Go to the documentation of this file.
9 #ifndef OPENVDB_HOUDINI_SOP_VDBVERBUTILS_HAS_BEEN_INCLUDED
10 #define OPENVDB_HOUDINI_SOP_VDBVERBUTILS_HAS_BEEN_INCLUDED
12 #include <GOP/GOP_Manager.h>
13 #include <SOP/SOP_NodeParmsOptions.h>
31 static_cast<float>(evalFloat(
name, 1, time)),
32 static_cast<float>(evalFloat(
name, 2, time)));
37 evalFloat(
name, 1, time),
38 evalFloat(
name, 2, time));
42 using IntT = openvdb::Vec3i::ValueType;
44 static_cast<IntT
>(evalInt(
name, 1, time)),
45 static_cast<IntT
>(evalInt(
name, 2, time)));
50 evalFloat(
name, 1, time));
54 using IntT = openvdb::Vec2i::ValueType;
56 static_cast<IntT
>(evalInt(
name, 1, time)));
62 evalString(str,
name, index, time);
63 return str.toStdString();
66 const GA_PrimitiveGroup *
matchGroup(
const GU_Detail &gdp,
const UT_StringRef &groupname)
68 const GA_PrimitiveGroup *group = 0;
69 if (groupname.isstring())
72 group =
gop.parseOrderedPrimitiveDetached(groupname, &gdp,
false, success);
75 UT_StringHolder error;
76 error =
"Invalid group (";
79 throw std::runtime_error(error.c_str());
85 const GA_PrimitiveGroup *
88 return gop.parsePrimitiveGroups(maskStr, maskGeo);
94 return gop.parsePrimitiveGroupsCopy(maskStr, maskGeo);
100 return gop.parsePointGroups(maskStr, maskGeo);
103 const GA_PointGroup *
110 OP_ERROR
cook(OP_Context &context)
override final
113 gop.destroyAdhocGroups();
124 #endif // OPENVDB_HOUDINI_SOP_VDBVERBUTILS_HAS_BEEN_INCLUDED
GOP_Manager gop
Definition: SOP_VDBVerbUtils.h:121
math::Vec3< float > Vec3f
Definition: Types.h:51
openvdb::Vec3i evalVec3i(const char *name, fpreal time) const
Definition: SOP_VDBVerbUtils.h:40
virtual OP_ERROR cookVDBSop(OP_Context &)=0
math::Vec2< Real > Vec2R
Definition: Types.h:40
Vec3< int32_t > Vec3i
Definition: Vec3.h:659
const GA_PointGroup * parsePointGroups(const UT_StringRef &maskStr, const GroupCreator &maskGeo)
Definition: SOP_VDBVerbUtils.h:98
const GA_PrimitiveGroup * parsePrimitiveGroups(const UT_StringRef &maskStr, const GroupCreator &maskGeo)
Definition: SOP_VDBVerbUtils.h:86
const GA_PointGroup * parsePointGroups(const UT_StringRef &maskStr, const GU_Detail *gdp)
Definition: SOP_VDBVerbUtils.h:104
openvdb::Vec2R evalVec2R(const char *name, fpreal time) const
Definition: SOP_VDBVerbUtils.h:47
Vec2< int32_t > Vec2i
Definition: Vec2.h:529
SOP_NodeCacheOptions subclass that adds methods specific to SOP_NodeVDB.
Definition: SOP_VDBVerbUtils.h:23
const GA_PrimitiveGroup * matchGroup(const GU_Detail &gdp, const UT_StringRef &groupname)
Definition: SOP_VDBVerbUtils.h:66
math::Vec3< Real > Vec3R
Definition: Types.h:49
SOP_VDBCacheOptions()
Definition: SOP_VDBVerbUtils.h:25
GA_PrimitiveGroup * parsePrimitiveGroupsCopy(const UT_StringRef &maskStr, const GroupCreator &maskGeo)
Definition: SOP_VDBVerbUtils.h:92
std::string evalStdString(const char *name, fpreal time, int index=0) const
Definition: SOP_VDBVerbUtils.h:59
~SOP_VDBCacheOptions() override
Definition: SOP_VDBVerbUtils.h:26
openvdb::Vec3R evalVec3R(const char *name, fpreal time) const
Definition: SOP_VDBVerbUtils.h:34
openvdb::Vec2i evalVec2i(const char *name, fpreal time) const
Definition: SOP_VDBVerbUtils.h:52
const Name & name
Definition: PointAttribute.h:544
openvdb::Vec3f evalVec3f(const char *name, fpreal time) const
Definition: SOP_VDBVerbUtils.h:28
OP_ERROR cookMySop(OP_Context &context)
Definition: SOP_VDBVerbUtils.h:118
OP_ERROR cook(OP_Context &context) override final
Definition: SOP_VDBVerbUtils.h:110