<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;"><font size="3" face="Arial">I have now established conclusively that adjusting the camera setup with SetPosition and SetFocalPoint stops the scene from being displayed, while any
 movement of the mouse with a button down restores display.<br>
<br>
<span style=" color:#c0c0c0;"></span><font face="Courier New"><span style=" color:#800000;">qvtkWidget</span><span style=" color:#c0c0c0;">
</span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span>
<span style=" color:#808000;">new</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QVTKWidget</span><span style=" color:#000000;">(</span><span style=" color:#000000;">page</span><span style=" color:#000000;">,</span><span style=" color:#800080;">QFlag</span><span style=" color:#000000;">(</span><span style=" color:#000080;">0</span><span style=" color:#000000;">));</span></font></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font size="3" face="Courier New"><span style=" color:#800000;"><span style=" color:#800080;">QVBoxLayout</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">layout</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">new</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">QVBoxLayout</span><span style=" color:#000000;">;</span>
l<span style=" color:#000000;">ayout</span><span style=" color:#000000;">-></span>addWidget<span style=" color:#000000;">(</span><span style=" color:#800000;">qvtkWidget</span><span style=" color:#000000;">);</span>
</span></font><span style=" color:#c0c0c0;"></span><span style=" color:#800000;">page_VTK</span><span style=" color:#000000;">-></span>setLayout<span style=" color:#000000;">(</span><span style=" color:#000000;">layout</span><span style=" color:#000000;">);</span>
<font size="3" face="Courier New"><span style=" color:#800000;">ren</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">vtkRenderer</span><span style=" color:#000000;">::</span>New<span style=" color:#000000;">();</span><span style=" color:#c0c0c0;">     </span></font></pre>
<font size="3" face="Courier New"></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font size="3" face="Courier New"><span style=" color:#800000;">renWin</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">qvtkWidget</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">GetRenderWindow</span><span style=" color:#000000;">();</span></font></pre>
<font size="3" face="Courier New"></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font size="3" face="Courier New"><span style=" color:#800000;">renWin</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">AddRenderer</span><span style=" color:#000000;">(</span><span style=" color:#800000;">ren</span><span style=" color:#000000;">);</span></font></pre>
<font size="3" face="Courier New"><span style=" color:#c0c0c0;"></span><span style=" color:#800000;">ren</span><span style=" color:#000000;">-></span>ResetCamera<span style=" color:#000000;">();</span><span style=" color:#c0c0c0;">
</span><span style=" color:#800000;"><br>
iren</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;">
</span><span style=" color:#800000;">qvtkWidget</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">GetInteractor</span><span style=" color:#000000;">();</span>
</font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font size="3" face="Courier New"><span style=" color:#800080;">vtkSmartPointer</span><span style=" color:#000000;"><</span><span style=" color:#800080;">MouseInteractorStyle4</span><span style=" color:#000000;">></span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">style</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">vtkSmartPointer</span><span style=" color:#000000;"><</span><span style=" color:#800080;">MouseInteractorStyle4</span><span style=" color:#000000;">>::</span>New<span style=" color:#000000;">();</span></font></pre>
<font size="3" face="Courier New"></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font size="3" face="Courier New"><span style=" color:#800000;">iren</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">SetInteractorStyle</span><span style=" color:#000000;">(</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">style</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">);</span></font></pre>
<font size="3" face="Courier New"></font>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font size="3" face="Courier New"><span style=" color:#800000;">iren</span><span style=" color:#000000;">-></span><span style=" font-style:italic; color:#000000;">Initialize</span><span style=" color:#000000;">();</span></font></pre>
<font size="3" face="Courier New"></font>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font size="3"><font face="Courier New"><span style=" color:#800000;">ren</span><span style=" color:#000000;">-></span>GetActiveCamera<span style=" color:#000000;">()-></span>SetPosition<span style=" color:#000000;">(</span><span style=" color:#000080;">0</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0</span><span style=" color:#000000;">);</span>
<span style=" color:#c0c0c0;"></span><span style=" color:#800000;">ren</span><span style=" color:#000000;">-></span>GetActiveCamera<span style=" color:#000000;">()-></span>SetFocalPoint<span style=" color:#000000;">(</span><span style=" color:#000000;">x0</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">x0</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">x0</span><span style=" color:#000000;">);</span></font>
</font><pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font size="3"><br></font></pre></pre>
<font size="3" face="Arial">If I remove the last two lines the scene is centred OK, but not at the scale I want.  I can play with Zoom(), but SetFocalPoint(x0,x0,x0) ensures that I get the desired scaling directly.<br>
Is this the expected behaviour?  I'm wondering if it is the result of using the QVTKWidget "default" camera instead of creating a new one to use (please excuse deficiencies in my understanding).  Is Zoom() the only way to achieve what I want?</font><br>
</div>
</body>
</html>