<div>Strange that nobody else has this problem...</div>
<div>Did anybody from the vtk team checked the small example program given in the com dated 03/04/2011?</div>
<div>Thanks for any reply<br><br></div>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">pof</b> <span dir="ltr">&lt;<a href="mailto:jd379252@gmail.com">jd379252@gmail.com</a>&gt;</span><br>Date: 2011/4/15<br>
Subject: Re: vtkInteractorStyleTerrain not compatible with vtkAxesActor/vtkOrientationMarkerWidget ?<br>To: <a href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</a><br><br><br>
<div text="#000000" bgcolor="#ffffff">Well, <br><br>it looks like the described bug vtkInteractorStyleTerrain did not attract any developer.<br>I might give up using the vtkInteractorStyleTerrain and replace it with vtkInteractorStyleTrackball as this problem does not occur in this one, though the behaviour of vtkInteractorStyleTerrain much better fits my needs.<br>
<br>Any idea, maybe from the vtk team ?<br>JD<br><br>Le 03/04/2011 11:01, pof a écrit : 
<div>
<div></div>
<div class="h5">
<blockquote type="cite">Dear vtker&#39;s,<br>No answer yet, so does it means that I&#39;m now the only one having this problem ?<br>Herebelow is a small example program that illustrate this incompatibility between vtkInteractorStyleTerrain and vtkAxesActor/vtkOrientationMarkerWidget.<br>
Any idea/comment ?<br><br>////////////////<br>#include &quot;vtkCylinderSource.h&quot;<br>#include &quot;vtkPolyDataMapper.h&quot;<br>#include &quot;vtkActor.h&quot;<br>#include &quot;vtkRenderer.h&quot;<br>#include &quot;vtkRenderWindow.h&quot;<br>
#include &quot;vtkRenderWindowInteractor.h&quot;<br>#include &quot;vtkProperty.h&quot;<br>#include &quot;vtkCamera.h&quot;<br>#include &quot;vtkAxesActor.h&quot;<br>#include &quot;vtkOrientationMarkerWidget.h&quot;<br>#include &quot;vtkInteractorStyleTerrain.h&quot;<br>
<br>int main()<br>{<br>    // Creates a polygonal cylinder model with eight circumferential facets.<br>    vtkCylinderSource *cylinder = vtkCylinderSource::New();<br>    cylinder-&gt;SetResolution(20);<br>    cylinder-&gt;SetCenter(0,0,0.);<br>
    cylinder-&gt;SetRadius(10.);<br>    cylinder-&gt;SetHeight(20.);<br>    vtkPolyDataMapper *cylinderMapper = vtkPolyDataMapper::New();<br>    cylinderMapper-&gt;SetInputConnection(cylinder-&gt;GetOutputPort());<br>    vtkActor *cylinderActor = vtkActor::New();<br>
    cylinderActor-&gt;SetMapper(cylinderMapper);<br>    cylinderActor-&gt;GetProperty()-&gt;SetColor(1.0000, 0.3882, 0.2784);<br><br>    vtkPolyDataMapper *MeshMapper = vtkPolyDataMapper::New();<br>    vtkActor *MeshActor = vtkActor::New();<br>
    MeshMapper-&gt;SetInputConnection(cylinder-&gt;GetOutputPort());<br>    MeshActor-&gt;SetMapper(MeshMapper);<br>    (MeshActor-&gt;GetProperty())-&gt;SetInterpolationToFlat();<br>    (MeshActor-&gt;GetProperty())-&gt;BackfaceCullingOff();<br>
    (MeshActor-&gt;GetProperty())-&gt;EdgeVisibilityOn();<br>    (MeshActor-&gt;GetProperty())-&gt;SetLineWidth(2);<br>    (MeshActor-&gt;GetProperty())-&gt;SetColor(0.,0.6,0.8);<br>    (MeshActor-&gt;GetProperty())-&gt;SetRepresentationToWireframe();<br>
<br>    // Create the graphics structure.<br>    vtkRenderer *ren = vtkRenderer::New();<br>    vtkRenderWindow *renWin = vtkRenderWindow::New();<br><br>    renWin-&gt;AddRenderer(ren);<br>    renWin-&gt;SetSize(600, 600);<br>
<br>    vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>    iren-&gt;SetRenderWindow(renWin);<br><br>    // Add the actors to the renderer, set the background and size<br>    ren-&gt;AddActor(cylinderActor);<br>
    ren-&gt;AddActor(MeshActor);<br>    ren-&gt;SetBackground(0.1, 0.2, 0.4);<br><br>    // We&#39;ll zoom in a little by accessing the camera and invoking a &quot;Zoom&quot;<br>    // method on it.<br>    ren-&gt;ResetCamera();<br>
    ren-&gt;GetActiveCamera()-&gt;Zoom(1.0);<br>    renWin-&gt;Render();<br><br>    vtkInteractorStyleTerrain *styleTerrain = vtkInteractorStyleTerrain::New();<br>    iren-&gt;SetInteractorStyle(styleTerrain);<br><br>    vtkAxesActor *Axes = vtkAxesActor::New();<br>
    Axes-&gt;SetShaftTypeToCylinder();<br>    Axes-&gt;SetXAxisLabelText( &quot;X&quot; );<br>    Axes-&gt;SetYAxisLabelText( &quot;Y&quot; );<br>    Axes-&gt;SetZAxisLabelText( &quot;Z&quot; );<br><br>    vtkOrientationMarkerWidget *AxesWidget = vtkOrientationMarkerWidget::New();<br>
    AxesWidget-&gt;SetOutlineColor(0,0,0);<br>    AxesWidget-&gt;SetOrientationMarker(Axes);<br>    AxesWidget-&gt;SetInteractor(iren);<br>    AxesWidget-&gt;SetViewport( 0.0, 0.0, 0.2, 0.2 );<br>    AxesWidget-&gt;SetEnabled(1);<br>
    AxesWidget-&gt;InteractiveOn();<br><br>    // This starts the event loop and as a side effect causes an initial render.<br>    iren-&gt;Start();<br><br>    // Exiting from here, we have to delete all the instances that<br>
    // have been created.<br>    cylinder-&gt;Delete();<br>    cylinderMapper-&gt;Delete();<br>    cylinderActor-&gt;Delete();<br>    MeshMapper-&gt;Delete();<br>    MeshActor-&gt;Delete();<br>    ren-&gt;Delete();<br>    renWin-&gt;Delete();<br>
    iren-&gt;Delete();<br><br>    return 0;<br>}<br><br><br><br>Le 24/03/2011 11:26, Pof a écrit : 
<blockquote type="cite">
<div>Answering to myself, just to mention that similar problem has already been reported in the mailing list, but I could not find any answer.</div>
<div> </div>
<div>So does this means the only solution is not to use vtkInteractorStyleTerrain with vtkOrientationMarkerWidget??</div>
<div> </div>
<div>Thanks for any tip/advice</div>
<div>JD<br><br></div>
<div class="gmail_quote">2011/3/22 Pof <span dir="ltr">&lt;<a href="mailto:jd379252@gmail.com" target="_blank">jd379252@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<p>Hi all,</p>
<p>when the vtkInteractorStyleTerrain is used with vtkAxesActor/vtkOrientationMarkerWidget:<br>- the following error message is obtained &quot;Resetting view-up since view plane normal is parallel&quot;<br>- the orientation of the vtkAxesActor gets wrong when viewing along the z-axis.</p>

<p>Is there any way to correct this behaviour (apart from not displaying the warning message)?</p>
<p>Thanks</p></blockquote></div><br></blockquote><br></blockquote><br></div></div></div></div><br>