Search - User list
Full Version: HDK all prims into a group
Root » Technical Discussion » HDK all prims into a group
ivan
I have this:

GA_PrimitiveGroup *deleteUs = gdp->newPrimitiveGroup(“deleteUs”);
GA_Offset lcl_start, lcl_end, crr;
for (GA_Iterator lcl_it((gdp)->getPrimitiveRange());lcl_it.blockAdvance(lcl_start, lcl_end); )
for (crr = lcl_start; crr < lcl_end; ++crr){
deleteUs->addIndex(crr);
}

sorta stolen from “GA_FOR_ALL_PTOFF”

is this the fastest? or is there a way to simply say newPrimGroup(“foo”,ADD_ALL);

or sumthin'?
graham
I believe you can use GA_PrimitiveGroup::setEntries() to add all the prims to the group.
ivan


perfect.

now, if I can only figure out why they don't have a “GA_FOR_ALL_PRIM_OFF” macro…..
Anonymous
You can also do:

GA_PrimitiveGroup::addRange(GU_Detail::getPrimitiveRange());
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