Hi-<br>I have an application using FLTK and VTK together via the vtkFlRenderWindowInteractor class. I have my point picking working after using the following example <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/PointPicker">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/PointPicker</a><div>
<br></div><div>My concern is that I am only displaying a 2D image and after enabling interaction, the camera swings around in 3D when the user picks a point and distorts my image. Can I modify the following code to allow point picking but disable the camera view from moving? Thanks in advance-</div>
<div><br></div><div>-Ryan</div><div><br></div><div><br></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 10px; background-color: rgb(255, 255, 255); "><pre class="de1" style="padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-top-color: white; border-right-color: white; border-bottom-color: white; border-left-color: white; color: black; background-color: initial; line-height: normal; font: normal normal normal 1em/1.2em monospace; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-image: none; background-attachment: initial; background-origin: initial; background-clip: initial; vertical-align: top; background-position: initial initial; background-repeat: initial initial; ">
<span class="kw2" style="color: rgb(0, 0, 255); ">class</span> MouseInteractorStylePP <span class="sy4" style="color: rgb(0, 128, 128); ">:</span> <span class="kw2" style="color: rgb(0, 0, 255); ">public</span> vtkInteractorStyleTrackballCamera
<span class="br0" style="color: rgb(0, 128, 0); ">{</span>
<span class="kw2" style="color: rgb(0, 0, 255); ">public</span><span class="sy4" style="color: rgb(0, 128, 128); ">:</span>
<span class="kw4" style="color: rgb(0, 0, 255); ">static</span> MouseInteractorStylePP<span class="sy2" style="color: rgb(0, 0, 64); ">*</span> New<span class="br0" style="color: rgb(0, 128, 0); ">(</span><span class="br0" style="color: rgb(0, 128, 0); ">)</span><span class="sy4" style="color: rgb(0, 128, 128); ">;</span>
vtkTypeMacro<span class="br0" style="color: rgb(0, 128, 0); ">(</span>MouseInteractorStylePP, vtkInteractorStyleTrackballCamera<span class="br0" style="color: rgb(0, 128, 0); ">)</span><span class="sy4" style="color: rgb(0, 128, 128); ">;</span>
<span class="kw2" style="color: rgb(0, 0, 255); ">virtual</span> <span class="kw4" style="color: rgb(0, 0, 255); ">void</span> OnLeftButtonDown<span class="br0" style="color: rgb(0, 128, 0); ">(</span><span class="br0" style="color: rgb(0, 128, 0); ">)</span>
<span class="br0" style="color: rgb(0, 128, 0); ">{</span>
std<span class="sy4" style="color: rgb(0, 128, 128); ">::</span><span class="kw3" style="color: rgb(0, 0, 221); ">cout</span> <span class="sy1" style="color: rgb(0, 0, 128); "><<</span> <span class="st0" style="color: rgb(255, 0, 0); ">"Picking pixel: "</span> <span class="sy1" style="color: rgb(0, 0, 128); "><<</span> this<span class="sy2" style="color: rgb(0, 0, 64); ">-</span><span class="sy1" style="color: rgb(0, 0, 128); ">></span>Interactor<span class="sy2" style="color: rgb(0, 0, 64); ">-</span><span class="sy1" style="color: rgb(0, 0, 128); ">></span>GetEventPosition<span class="br0" style="color: rgb(0, 128, 0); ">(</span><span class="br0" style="color: rgb(0, 128, 0); ">)</span><span class="br0" style="color: rgb(0, 128, 0); ">[</span><span class="nu0" style="color: rgb(0, 0, 221); ">0</span><span class="br0" style="color: rgb(0, 128, 0); ">]</span> <span class="sy1" style="color: rgb(0, 0, 128); "><<</span> <span class="st0" style="color: rgb(255, 0, 0); ">" "</span> <span class="sy1" style="color: rgb(0, 0, 128); "><<</span> this<span class="sy2" style="color: rgb(0, 0, 64); ">-</span><span class="sy1" style="color: rgb(0, 0, 128); ">></span>Interactor<span class="sy2" style="color: rgb(0, 0, 64); ">-</span><span class="sy1" style="color: rgb(0, 0, 128); ">></span>GetEventPosition<span class="br0" style="color: rgb(0, 128, 0); ">(</span><span class="br0" style="color: rgb(0, 128, 0); ">)</span><span class="br0" style="color: rgb(0, 128, 0); ">[</span><span class="nu0" style="color: rgb(0, 0, 221); ">1</span><span class="br0" style="color: rgb(0, 128, 0); ">]</span> <span class="sy1" style="color: rgb(0, 0, 128); "><<</span> std<span class="sy4" style="color: rgb(0, 128, 128); ">::</span><span class="me2" style="color: rgb(0, 119, 136); ">endl</span><span class="sy4" style="color: rgb(0, 128, 128); ">;</span>
vtkInteractorStyleTrackballCamera<span class="sy4" style="color: rgb(0, 128, 128); ">::</span><span class="me2" style="color: rgb(0, 119, 136); ">OnLeftButtonDown</span><span class="br0" style="color: rgb(0, 128, 0); ">(</span><span class="br0" style="color: rgb(0, 128, 0); ">)</span><span class="sy4" style="color: rgb(0, 128, 128); ">;</span>
<span class="br0" style="color: rgb(0, 128, 0); ">}</span>
<span class="br0" style="color: rgb(0, 128, 0); ">}</span><span class="sy4" style="color: rgb(0, 128, 128); ">;</span></pre></span></div>