C4dObjectList lasso and radius

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

On 16/09/2009 at 13:07, xxxxxxxx wrote:

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

---------
Hello Al,
in my plugin i need to know the object under mouse pointer in editor.
to do this i already use C4dObjectList and SelectionListCreate.
My problem now i find a fast way to extend SelectionListCreate Function in a sorrunding area of my cursor, like a serch radius.
i read somthing about Lasso Selection in SelectionListCreate but it don't work form me as anyone any suggestion or example for this feature or i am completely out of my way?
Thanks in advance
Franz

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

On 17/09/2009 at 02:46, xxxxxxxx wrote:

Here is a basic example of rectangle selection with class LassoSelection.

> \> Bool LiquidToolData::MouseInput(BaseDocument \*doc, BaseContainer &data;, BaseDraw \*bd, EditorWindow \*win, const BaseContainer &msg;) \> { \>      Real mx = msg.GetReal(BFM_INPUT_X); \>      Real my = msg.GetReal(BFM_INPUT_Y); \>      Real start_x = mx; \>      Real start_y = my; \>      Real dx,dy; \>      LONG button; \>       \>      switch (msg.GetLong(BFM_INPUT_CHANNEL)) \>      { \>           case BFM_INPUT_MOUSELEFT : button=KEY_MLEFT; break; \>           case BFM_INPUT_MOUSERIGHT: button=KEY_MRIGHT; break; \>           default: return TRUE; \>      } \>       \>      BaseContainer bc; \>      BaseContainer device; \>      win->MouseDragStart(button,mx,my,MOUSEDRAG_DONTHIDEMOUSE|MOUSEDRAG_NOMOVE); \>      while (win->MouseDrag(&dx;,&dy;,&device;)==MOUSEDRAG_CONTINUE) \>      { \>           if (dx==0.0 && dy==0.0) continue; \> \>           mx+=dx; \>           my+=dy; \> \>           AutoAlloc<C4DObjectList> olist; \>           if (!olist) return FALSE; \> \>           AutoAlloc<LassoSelection> ls; \>           if (!ls) return FALSE; \> \>           ls->Start(win, MOUSESELECT_RECTANGLE, start_x, start_y, BFM_INPUT_MOUSELEFT); \> \>           if (SelectionListCreate(doc, NULL, bd, mx, my, ls, olist)) \>           { \>                GePrint(LongToString(olist->GetCount())); \>           } \>      } \> \>      if (win->MouseDragEnd()==MOUSEDRAG_ESCAPE) \>      { \>      } \> \>      return TRUE; \> } \>

Also check the ViewportSelect class for detection/selection with a defined radius.

cheers,
Matthias