Hi David, <br><br>I'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"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></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->ResetCameraClippingRange() before window->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 <<a href="mailto:scc.wwl@gmail.com">scc.wwl@gmail.com</a>> wrote:<br>
> Hi David,<br>
><br>
> Thank you for your advice.<br>
><br>
> In my app, the scale and rotate is not ignored, they works. For translation,<br>
> I don't know, after I applied translation, the actor disappeared from my<br>
> screen. And the transform is not passed to actor but camera. For rendering,<br>
> I totally agree with you, I render the render window first time to show my<br>
> actor, then I apply all the transformation. At last, I render again to show<br>
> the changed actor.<br>
><br>
> Wenlong<br>
><br>
><br>
><br>
> 2011/10/27 David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
>><br>
>> The renderer automatically resets the camera on the first render,<br>
>> it resets both the field-of-view and the position. That is why it<br>
>> "seems" like the position and scale are being ignored. But they<br>
>> are not being ignored. It is just that the renderer is automatically<br>
>> resetting the camera, and this causes the camera to move to the<br>
>> new actor location.<br>
>><br>
>> The easiest way to avoid this is to render once (with the original<br>
>> position), then apply the UserTransform to the actor (or the<br>
>> vtkTransformPolyData), and then render again. The camera<br>
>> reset will only occur on the first render.<br>
>><br>
>> - David<br>
>><br>
>><br>
>> On Thu, Oct 27, 2011 at 10:32 AM, Wenlong Wang <<a href="mailto:scc.wwl@gmail.com">scc.wwl@gmail.com</a>> wrote:<br>
>> > Hi, Jothybasu,<br>
>> ><br>
>> > Thank you very much for your reply.<br>
>> ><br>
>> > No, I didn't use it in my app. Does that matter? If so, why the scale<br>
>> > and<br>
>> > rotate functions works without vtkTransformFilter?<br>
>> ><br>
>> > Wenlong<br>
>> ><br>
>> > 2011/10/27 Jothybasu Selvaraj <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>><br>
>> >><br>
>> >> Are you using vtkPolyDataTransformFilter along with vtkTransform?<br>
>> >><br>
>> >> Jothy<br>
>> >><br>
>> >> On Thu, Oct 27, 2011 at 5:13 PM, Wenlong Wang <<a href="mailto:scc.wwl@gmail.com">scc.wwl@gmail.com</a>><br>
>> >> wrote:<br>
>> >>><br>
>> >>> Hi everyone,<br>
>> >>><br>
>> >>> I'm trying to scale, rotate and translate my polydata. My strategy is<br>
>> >>> using vtkTransform to do these operations one by one. The order is<br>
>> >>> scale,<br>
>> >>> rotate and translate. I calculate the transform parameters and use<br>
>> >>> vtkTransform::Scale, ::RotateZ() and ::Translate() to define the<br>
>> >>> transformation. Then I pass this transformation to my camera by<br>
>> >>> vtkCamera::SetUserTransform(). After that, I do the visualization<br>
>> >>> pipeline<br>
>> >>> again to show the new polydata object. And the visualization pipeline<br>
>> >>> is<br>
>> >>> capsualted as an independent function.<br>
>> >>><br>
>> >>> So far, the scale and rotate works well and the polydata changes as I<br>
>> >>> expected. However, as I start to translate it, it disappears! It<br>
>> >>> doesn't<br>
>> >>> work even I put simple numbers as the input parameters.<br>
>> >>><br>
>> >>> I tried to pass the transform to my actor and use<br>
>> >>> vtkActor::SetUserTransform to do it. But again, the scale and rotate<br>
>> >>> works<br>
>> >>> well and translate failed.<br>
>> >>><br>
>> >>> Can anyone give me some advice? I'll be extremely appreciate it!<br>
>> >>><br>
>> >>> Thank you very much!<br>
>> >>><br>
>> >>> Best wishes<br>
>> >>> Long<br>
><br>
><br>
</div></div></blockquote></div><br>