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>
30 return openvdb::Vec3f(
static_cast<float>(evalFloat(name, 0, time)),
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)));
59 std::string
evalStdString(
const char* name, fpreal time,
int index = 0)
const
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