<HTML>
<HEAD>
<TITLE>Re: [vtk-developers] New feature: improved hover support</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>In general, the idea of having a second render in the still render (effectively doubling the time) is troubling.  If you have a lot of geometry that takes a while to render (which is not uncommon in a 3D view), the added rendering time is not acceptable.<BR>
<BR>
Is this behavior an option and is it off by default?<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 9/9/09 9:37 AM, "Jeff Baumes" <<a href="jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Basically yes. The exception is the render caused when the actual hover text changes and the scene needs to be re-rendered, in which case the pick render is not performed. The problem is knowing when a render caused any pipeline updates or camera changes, which are the cases where you need to re-generate the pick map. BTW the cached pick map is also used for drag-selections.<BR>
<BR>
Thinking about it, it would probably be better to wait for the first "mouse dwell" or drag-selection to update the pick map, I'll make a note of that.<BR>
<BR>
Jeff<BR>
<BR>
On Wed, Sep 9, 2009 at 11:27 AM, Moreland, Kenneth <<a href="kmorel@sandia.gov">kmorel@sandia.gov</a>> wrote:<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Does that mean every still render is actually rendered twice with the second one basically a pick render?<BR>
<BR>
-Ken<BR>
<BR>
<BR>
<BR>
On 9/9/09 9:04 AM, "Jeff Baumes" <<a href="jeff.baumes@kitware.com">jeff.baumes@kitware.com</a> <<a href="http://jeff.baumes@kitware.com">http://jeff.baumes@kitware.com</a>> > wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I've just checked in a change that allows improved hover support in vtkRenderView subclasses.<BR>
<BR>
After each render (except during interaction), the view automatically takes a "snapshot" of what is currently rendered in a special render mode that maps pixel locations particular actors and cells. When the user's mouse stops over a cell, the render view looks up the hovered cell in the map and sends it to its representations to possibly produce a hover label. Representations manage the pipleline/mappers/actors for displaying a particular type of data in a view. They implement support for hover queries by overriding GetHoverTextInternal().<BR>
<BR>
This is currently implemented in vtkRenderedGraphRepresentation, where the user may select the vertex and edge hover arrays.<BR>
<BR>
The view also allows the hover labels not to be rendered with OpenGL, but invokes a HoverEvent when the hover label changes. This would allow an application to capture these events and use real native tooltips (e.g. with Qt) to show the hover labels.<BR>
<BR>
Jeff<BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
   ****      Kenneth Moreland<BR>
    ***      Sandia National Laboratories<BR>
***********  <BR>
*** *** ***  email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a> <<a href="http://kmorel@sandia.gov">http://kmorel@sandia.gov</a>> <BR>
**  ***  **  phone: (505) 844-8919<BR>
    ***      web:   <a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
   ****      Kenneth Moreland<BR>
    ***      Sandia National Laboratories<BR>
***********  <BR>
*** *** ***  email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
**  ***  **  phone: (505) 844-8919<BR>
    ***      web:   <a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>