<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6249.1">
<TITLE>help needed on translation</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT COLOR="#000080" FACE="Verdana">Hi, </FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"><FONT COLOR="#000080" FACE="Verdana">I</FONT></SPAN><SPAN LANG="en-au"><FONT COLOR="#000080" FACE="Verdana">’</FONT></SPAN><SPAN LANG="en-au"><FONT COLOR="#000080" FACE="Verdana">m trying to create 6 cones each of which rotat</FONT></SPAN><SPAN LANG="en-au"><FONT COLOR="#000080" FACE="Verdana">es 60 degrees. The result was they just flashed</FONT></SPAN><SPAN LANG="en-au"><FONT COLOR="#000080" FACE="Verdana">, then the first 5 were gone leaving the last one in the scene. </FONT></SPAN><SPAN LANG="en-au"> <FONT COLOR="#000080" FACE="Verdana">Could anyone please help me have a look at the following code</FONT></SPAN><SPAN LANG="en-au"><FONT COLOR="#000080" FACE="Verdana"> and tell me where went wrong</FONT></SPAN><SPAN LANG="en-au"><FONT COLOR="#000080" FACE="Verdana">?</FONT></SPAN><SPAN LANG="en-au"> </SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"></SPAN><A NAME=""><SPAN LANG="en-au"><FONT COLOR="#000080" FACE="Verdana">Thank you.</FONT></SPAN></A></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">vtkActor *coneActor;</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">vtkRenderer *ren1;</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">vtkRenderWindow *renWin;</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">vtkConeSource *cone;</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">vtkRenderWindowInteractor* iren;</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">void</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"></FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">rotate</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> ()</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">{</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor-> SetOrientation(0, 0, 0);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">ren1->ResetCameraClippingRange();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin->Render();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin->Render();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin-> EraseOff();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor-> SetOrigin(6.11414, 1.27386, .015175);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor-> SetOrigin(0, 0, 0);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor-> SetPosition(0, 0, 0);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">vtkTransform *cowTransform = vtkTransform::New();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">cowTransform->Identity();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor-> SetUserMatrix(cowTransform-> GetMatrix());</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> </SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">for</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> (</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">int</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> idx=1; idx<=6; idx++) {</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor->RotateWXYZ(60,2.19574,-1.42455,-.0331036);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor->RotateY(60);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin->Render();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin->Render();</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> </SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">}</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin-> EraseOn();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">}</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">void</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> main(</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">int</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> argc,</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">char</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> *argv[] )</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">{</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">ren1 = vtkRenderer::New();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">iren = vtkRenderWindowInteractor::New();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin = vtkRenderWindow::New();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">cone = vtkConeSource::New();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor = vtkActor::New();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin->AddRenderer(ren1);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">iren->SetRenderWindow(renWin);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> cone->SetResolution(3);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">cone->SetHeight(1);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">cone->SetRadius(0.25);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> </FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New"> coneMapper->SetInput(cone->GetOutput());</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New"> </FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New"> </FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New"> coneMapper->ScalarVisibilityOff();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor->SetMapper(coneMapper);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">ren1->AddActor(coneActor);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">ren1->SetBackground( 0.1, 0.2, 0.4 );</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin->SetSize(800,800);</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin->Render();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> </SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin-> EraseOff();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> </SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">rotate</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">();</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"> <FONT COLOR="#008000" SIZE=2 FACE="Courier New">/*</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT COLOR="#008000" SIZE=2 FACE="Courier New">rotate</FONT></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-au"></SPAN><SPAN LANG="en-us"><FONT COLOR="#008000" SIZE=2 FACE="Courier New">*/</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">iren->Start();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">cone->Delete();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneMapper->Delete();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">coneActor->Delete();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">ren1->Delete();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">renWin->Delete();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"> <FONT SIZE=2 FACE="Courier New">iren->Delete();</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT SIZE=2 FACE="Courier New">}</FONT></SPAN></P>
<BR>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#000080" FACE="Verdana">Regards,</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-us"><FONT COLOR="#000080" FACE="Verdana">Yaqian</FONT></SPAN></P>
<P ALIGN=LEFT><SPAN LANG="en-au"></SPAN></P>
</BODY>
</HTML>