THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/01/2010 at 08:42, xxxxxxxx wrote:
Cinema 4D Version: 11.5
Platform: Windows ;
Language(s) : C++ ;
I'm doing something wrong here, or misinterpreting how the SelectionChanger works. What I want to do is get the points corresponding to a selected polygon or polygons. The code snippet looks like this:
// obj is a valid pointer to a PolygonObject
// I'm in polygon mode
BaseSelect *selPolys, *convPoints;
selPolys = obj->GetPolygonS(); // get selected polygons
sc->InitFromSelection(selPolys, Mpolygons, obj);
convPoints = sc->GetPointS(); // convert polygon selection to points
This compiles and runs but if the polygon object has one selected polygon, convPoints->GetCount() returns 1 - but I thought it would return 4, one for each point in the polygon. Also, the one point it contains is not actually in the selected polygon.
I'm sure I've misunderstood how this works - can anyone enlighten me?