Umang Raj
Umang_Raj
About Me
EXPERTISE
Hobbyist
Houdini Skills
Availability
Not Specified
My Tutorials
Recent Forum Posts
Houdini 22 June 8, 2026, 9:16 a.m.
confirmed!!
Houdini 22 May 30, 2026, 11:02 a.m.
probably they are building the .5 and the major release at the same time
Access primitive in HDK May 16, 2026, noon
HDK uses cpp's object oriented programming alot. All of the upper level primitive classes do contain a ga_primitive interface.

For the primoff you get from the first macro, you can easily use the getPrimitive function on the detail, and then use the function it provides or cast it to other upper level classes you know it has using implicit casting or explicit static_cast, or if you are not sure, use dynamic_cast which returns nullptr if it doesn't have that class object like this-
or you can just use getPrimitivesOfType function.
and for your second question, you can use getMapOffset function on the primitive you get from that macro, to get it's offset.
For the primoff you get from the first macro, you can easily use the getPrimitive function on the detail, and then use the function it provides or cast it to other upper level classes you know it has using implicit casting or explicit static_cast, or if you are not sure, use dynamic_cast which returns nullptr if it doesn't have that class object like this-
GA_Primitive *primPtr = gdp->getPrimitive(primOffset); // static cast, if prim isn't polygon then it will give undefined behaviour // GEO_PrimPoly *geoPrimPtr = static_cast<GEO_PrimPoly*>(primPtr); // dynamic cast for verification GEO_PrimPoly *geoPrimPtr = static_cast<GEO_PrimPoly*>(primPtr); if (!geoPrimPtr) // return error, and/or do your quitting logic
and for your second question, you can use getMapOffset function on the primitive you get from that macro, to get it's offset.