What are you trying to achieve?<br><br><div class="gmail_quote">On Mon, Sep 3, 2012 at 10:49 AM, Jothybasu Selvaraj <span dir="ltr"><<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Few points here<br><br> You are setting a -ve scaling (1,1,-1). I am not sure whether scaling in -ve has any meaning. To shrink it will be <1 and >1 to expand. (I am not familiar with matrix operations, excuse if its wrong)<br>
<br><br>With few typographical error corrections they appear in the color I set (yellow)<br><br>//...................<br> vtkCubeSource *cubeSource = vtkCubeSource::New();<div class="im"><br> cubeSource->SetCenter(5,5,5);<br>
cubeSource->SetXLength(10);<br>
cubeSource->SetYLength(10);<br> cubeSource->SetZLength(10);<br><br></div> vtkPolyDataMapper* mapper = vtkPolyDataMapper::New();<br> mapper->SetInput(cubeSource->GetOutput());<br> <b><span style="color:rgb(204,0,0)">mapper->ScalarVisibilityOff();</span></b><br>
<br> vtkActor* cubeActor = vtkActor::New();<br> cubeActor->SetMapper(mapper);<br> <span style="color:rgb(204,0,0)"><b> cubeActor->GetProperty()->SetColor(1,1,0);</b></span><br><br> this->modelRenderer->AddActor(cubeActor);<br>
vtkTransform *transform = vtkTransform::New();<br> <span style="color:rgb(204,0,0)"><b> transform->Scale(1,1,0.5);</b></span><br><br>// cubeActor->GetProperty()->BackfaceCullingOff();<br><br> cubeActor->SetUserTransform(transform);<br>
<br><br>Regards<br>Jothy<div><div class="h5"><br><br><br><br><br>On Mon, Sep 3, 2012 at 3:17 PM, zlf <<a href="mailto:jxdw_zlf@yahoo.com.cn" target="_blank">jxdw_zlf@yahoo.com.cn</a>> wrote:<br>><br>> Dear David,<br>
><br>> Thank you for your response. But I still cannot see anything. My code is<br>
><br>> vtkCubeSource cubeSource = vtkCubeSource->New();<br>> cubeSource->SetCenter(5,5,5);<br>> cubeSource->SetXLength(10);<br>> cubeSource->SetYLength(10);<br>> cubeSource->SetZLength(10);<br>
><br>> vtkPolyDataMapper mapper = vtkPolyDataMapper::New();<br>> mapper->SetInput(cubeSource->GetOutput());<br>><br>> vtkActor cubeActor = vtkActor::New();<br>> cubeActor->SetMapper(mapper);<br>
><br>> render->AddActor(cubeActor);<br>><br>> vtkTransform transform = vtkTransform::New();<br>> transform->Scale(1,1,-1);<br>> cubeActor->GetProertry()->BackfaceCullingOff();<br>> cubeAcotr->SetUserTransform(transform);<br>
><br>> renderer->ResetCameraClippingRange();<br>> renderer->ResetCamera();<br>> renwin->Render();<br>><br>> Regards,<br>><br>> zlf<br>><br>><br>><br>> --<br>> View this message in context: <a href="http://vtk.1045678.n5.nabble.com/PolyData-actor-is-invisible-after-applying-scale-1-1-1-tp5715785p5715801.html" target="_blank">http://vtk.1045678.n5.nabble.com/PolyData-actor-is-invisible-after-applying-scale-1-1-1-tp5715785p5715801.html</a><br>
> Sent from the VTK - Users mailing list archive at Nabble.com.<br>> _______________________________________________<br>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>><br>> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br><br><br><br></div></div>--<br>Jothybasu Selvaraj<br>PhD Student<br>University of Liverpool<br>UK<br></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br><br>