Access to selected points of an object



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 25/09/2007 at 08:15, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10.101 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hi,

    Question for C++

    Can somebody me please explain how you get the selected points (vertexes) of an object, or point me to an example? It has something to do with BaseSelect, no?

    From the BaseDocument I take the BaseObject and then the Polygonobject? Somehow I can only access the selected eges, but I want the points. The one that are currently selected.

    BTW, why do I get 0 results when searching the word "select" in the thread title or body? But there are posts concerning this word in the forum. That's strange, isn't it...

    Steve



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 25/09/2007 at 10:52, xxxxxxxx wrote:

    BaseObject* obj = // the object
    > // not a point object, return
    > if (!obj- >IsInstanceOf(Opoint)) return;
    > // Cast to a point object
    > PointObject* pobj = ToPoint(obj);
    > // Get the selected points, the point array, and point count
    > BaseSelect* bs = pobj->GetPointS();
    > Vector* vert = pobj->GetPointW();
    > LONG vcnt = pobj->GetPointCount();

    Traverse the BaseSelect just as shown in the SDK documentation. The indices that are 'selected' will match those of the vert array.


Log in to reply