Hi David, <br><br>I&#39;m afraid the problem is not caused by out of range. I put the ResetCameraClippingRange in and defined the clipping plane as a large space, but it still not working.<br><br>Wenlong<br><br><div class="gmail_quote">
2011/10/27 David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
The actor might be disappearing because it is no longer between the<br>
front and back clipping planes of the renderer.<br>
<br>
Try calling renderer-&gt;ResetCameraClippingRange() before window-&gt;Render().<br>
<font color="#888888"><br>
 - David<br>
</font><div><div></div><div class="h5"><br>
<br>
On Thu, Oct 27, 2011 at 10:53 AM, Wenlong Wang &lt;<a href="mailto:scc.wwl@gmail.com">scc.wwl@gmail.com</a>&gt; wrote:<br>
&gt; Hi David,<br>
&gt;<br>
&gt; Thank you for your advice.<br>
&gt;<br>
&gt; In my app, the scale and rotate is not ignored, they works. For translation,<br>
&gt; I don&#39;t know, after I applied translation, the actor disappeared from my<br>
&gt; screen. And the transform is not passed to actor but camera. For rendering,<br>
&gt; I totally agree with you, I render the render window first time to show my<br>
&gt; actor, then I apply all the transformation. At last, I render again to show<br>
&gt; the changed actor.<br>
&gt;<br>
&gt; Wenlong<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2011/10/27 David Gobbi &lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; The renderer automatically resets the camera on the first render,<br>
&gt;&gt; it resets both the field-of-view and the position.  That is why it<br>
&gt;&gt; &quot;seems&quot; like the position and scale are being ignored.  But they<br>
&gt;&gt; are not being ignored.  It is just that the renderer is automatically<br>
&gt;&gt; resetting the camera, and this causes the camera to move to the<br>
&gt;&gt; new actor location.<br>
&gt;&gt;<br>
&gt;&gt; The easiest way to avoid this is to render once (with the original<br>
&gt;&gt; position), then apply the UserTransform to the actor (or the<br>
&gt;&gt; vtkTransformPolyData), and then render again.  The camera<br>
&gt;&gt; reset will only occur on the first render.<br>
&gt;&gt;<br>
&gt;&gt;  - David<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Thu, Oct 27, 2011 at 10:32 AM, Wenlong Wang &lt;<a href="mailto:scc.wwl@gmail.com">scc.wwl@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi, Jothybasu,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thank you very much for your reply.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; No, I didn&#39;t use it in my app. Does that matter? If so, why the scale<br>
&gt;&gt; &gt; and<br>
&gt;&gt; &gt; rotate functions works without vtkTransformFilter?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Wenlong<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; 2011/10/27 Jothybasu Selvaraj &lt;<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Are you using vtkPolyDataTransformFilter along with vtkTransform?<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Jothy<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Thu, Oct 27, 2011 at 5:13 PM, Wenlong Wang &lt;<a href="mailto:scc.wwl@gmail.com">scc.wwl@gmail.com</a>&gt;<br>
&gt;&gt; &gt;&gt; wrote:<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Hi everyone,<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; I&#39;m trying to scale, rotate and translate my polydata. My strategy is<br>
&gt;&gt; &gt;&gt;&gt; using vtkTransform to do these operations one by one. The order is<br>
&gt;&gt; &gt;&gt;&gt; scale,<br>
&gt;&gt; &gt;&gt;&gt; rotate and translate. I calculate the transform parameters and use<br>
&gt;&gt; &gt;&gt;&gt; vtkTransform::Scale, ::RotateZ() and ::Translate() to define the<br>
&gt;&gt; &gt;&gt;&gt; transformation. Then I pass this transformation to my camera by<br>
&gt;&gt; &gt;&gt;&gt; vtkCamera::SetUserTransform(). After that, I do the visualization<br>
&gt;&gt; &gt;&gt;&gt; pipeline<br>
&gt;&gt; &gt;&gt;&gt; again to show the new polydata object. And the visualization pipeline<br>
&gt;&gt; &gt;&gt;&gt; is<br>
&gt;&gt; &gt;&gt;&gt; capsualted as an independent function.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; So far, the scale and rotate works well and the polydata changes as I<br>
&gt;&gt; &gt;&gt;&gt; expected. However, as I start to translate it, it disappears! It<br>
&gt;&gt; &gt;&gt;&gt; doesn&#39;t<br>
&gt;&gt; &gt;&gt;&gt; work even I put simple numbers as the input parameters.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; I tried to pass the transform to my actor and use<br>
&gt;&gt; &gt;&gt;&gt; vtkActor::SetUserTransform to do it. But again, the scale and rotate<br>
&gt;&gt; &gt;&gt;&gt; works<br>
&gt;&gt; &gt;&gt;&gt; well and translate failed.<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Can anyone give me some advice? I&#39;ll be extremely appreciate it!<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Thank you very much!<br>
&gt;&gt; &gt;&gt;&gt;<br>
&gt;&gt; &gt;&gt;&gt; Best wishes<br>
&gt;&gt; &gt;&gt;&gt; Long<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>