<DIV>
<DIV>Hi Fabio,</DIV>
<DIV> </DIV>
<DIV>vtkAppendPolyData will reserve the texture coordinates data as long as both of pd1 and pd2 have tex coordinates.</DIV>
<DIV> </DIV>
<DIV>I created an Actor for the pd1 in my project, coz I wanted to interact with it through a vtkBoxWidget. If you are not going to do that, I don't think an Actor is necessary. Just put them together.</DIV>
<DIV> </DIV>
<DIV>Qiang<BR><BR><B><I>fabio depascalis <fabio.depascalis@gmail.com></I></B> 写道:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">Hello Dai, thanks for your answer<BR><BR>if I understand well, I should separate my polydata pd in two parts<BR>- pd1: the part on which I want to place the texture<BR>- pd2: the other part<BR><BR>then i should set up the tcoords<BR><BR>pd1->GetPointData()->SetTCoords(tc1); <BR>pd2->GetPointData()->SetTCoords(0); <BR><BR>and use appendpolydata:<BR><BR>vtkAppendPolyData *apd=vtkAppendPolyData::New();<BR>apd->AddInput(pd1);<BR>apd->AddInput(pd2);<BR><BR>vtkPolyDataMapper *map3=vtkPolyDataMapper::New();<BR>map3->SetInput(apd->GetOutput()); <BR><BR>vtkActor *actor3 = vtkActorWBB::New();<BR>actor3->SetMapper(map3);<BR>actor3->SetTexture(texture);<BR><BR>But this method extend the texture on whole apd (also on the points<BR>with tcoords=0)<BR>May be, Do I have to create two actor for pd1 and pd2 and join them<BR>with
vtkAssembly?<BR><BR><BR><BR>thanks<BR></BLOCKQUOTE></DIV><p>
                <hr size=1>DO YOU YAHOO!?<br>
<a href="http://cn.mail.yahoo.com/?id=77071" target=blank>
雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱</a>