THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/11/2005 at 04:26, xxxxxxxx wrote:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C++ ;
i want to upgrade magicwandselection with the new R9 features.. mostly selection preview highlighting and n-gon support.
The tool will basically behave like the buildin loop selection tools. It will just generate a different selection.
I'm using the ViewportSelect class to get the edge/poly under the cursor. Are we actually advised to do so, for simple poly under mouse querries ? Using the RayCollider would also work.
I would like to know where to do the poly-under-mouse querry and to generate the selection. The only candidate seems to be GetCursorInfo() since it is always called and provides the mouse position.
The second problem is when and where to initialize the ViewportSelect class. It is way too costly to initialize it on every call to GetCursorInfo. So it must be called only when the camera or basedraw or active objects change. Is there a function that does this for me, or do i have to hack it myself ?
What is the ViewportHighlight class good for ? And how to use ??