selection tool preview highlight
-
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:
User Information:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C++ ;---------
Hello,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 ??
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/08/2006 at 08:42, xxxxxxxx wrote:
Michael,
Did you ever find a solution? If you see my latest topic, hmmm, sounds really familiar. I'm basically trying the same approach (GetCursorInfo(), ViewportSelect) with no luck.
One thing that I can definitely say about ViewportSelect is that you should AutoAlloc for every call - as there is no flush for the ViewportPixel array and they will consume memory. Ask me how I found that out.
Appreciate any info that you can provide - you can respond to my topic to keep things on the up and up.
Thank you very much!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/08/2006 at 10:41, xxxxxxxx wrote:
Hi, yes i found a solution. See my response on your topic.