Search - User list
Full Version: hdk get prims by type
Root » Technical Discussion » hdk get prims by type
kahuna031
How do I get the number of polygons in a detail?

On a similar note, I can't get my code to run this: gdp->getPrimitivesOfType(GA_PRIMPOLY, prims);, saying the function is unknown. I can see Spinynormal uses it here: https://raw.githubusercontent.com/spinynormal/DEC-SOP/master/diff.cpp [raw.githubusercontent.com] but I don't get how he does it.

That example is even more confusing for me as the gdp isn't even declared in that function, if I don't pass my gdp I can't use it. Wonder if there's any legecy setup I'm running that that means I'm not using these GA functions?
cwhite
You can use
GA_Detail::countPrimitiveType()
which is very fast since the counts are maintained as prims are added and removed.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB