[vtkusers] Removing Actors
Renato Cesar Pompeu
rcpompeu at hotmail.com
Mon May 5 16:00:45 EDT 2008
Still the same.
Thanks
From: w_e_b_m_a_s_t_e_r_6_9 at hotmail.comTo: rcpompeu at hotmail.comCC: vtkusers at public.kitware.comSubject: RE: [vtkusers] Removing ActorsDate: Tue, 6 May 2008 01:52:48 +1000
Put this line at the end and see if it does anything.VTK3->GetRenderer()->Render();
From: rcpompeu at hotmail.comTo: frederic.danesi at dinccs.comDate: Mon, 5 May 2008 15:20:36 +0000CC: vtkusers at public.kitware.comSubject: Re: [vtkusers] Removing Actors
I'm using a button to show/disappear an actor. Here's the code: vtkCubeSource *cubo = vtkCubeSource::New(); cubo->SetXLength(14); cubo->SetYLength(14); cubo->SetZLength(14); cubo->SetCenter(a/2,b/2,c/2); vtkPolyDataMapper *cuboMapper = vtkPolyDataMapper::New(); cuboMapper->SetInput(cubo->GetOutput()); vtkActor *cubo1 = vtkActor::New(); cubo1->SetMapper(cuboMapper); cubo1->GetProperty()->SetColor(0.52, 0.27, 0); cubo1->GetProperty()->SetAmbient(0.2); cubo1->GetProperty()->SetDiffuse(0.3); cubo1->GetProperty()->SetSpecular(0.8); if (tbnCubo->Down) { // the button is down = the cube appears VTK3->GetRenderer()->AddActor(cubo1);}else { // the button is up = the cube disappears VTK3->GetRenderer()->RemoveActor(cubo1); VTK3->GetRenderer()->RemoveViewProp(cubo1); VTK3->GetRenderer()->Clear();}cubo->Delete();cuboMapper->Delete();cubo1->Delete();VTK3->Invalidate();When the button is up the actor does not disappear.
From: frederic.danesi at dinccs.comTo: rcpompeu at hotmail.comSubject: RE: [vtkusers] Removing ActorsDate: Mon, 5 May 2008 17:01:17 +0200
Just a dumb question : is your outlineActor the same at each call or not ? … could you please provide us with more sourcecode (t least the code before your condition …) ?
Fred.
De : vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] De la part de Renato Cesar PompeuEnvoyé : lundi 5 mai 2008 15:45À : vtkusers at public.kitware.comObjet : [vtkusers] Removing Actors
Hello All,
How do I remove an individual actor from the scene? My code does not work. Someone help me? Thanks.
if (tbnIniciar->Down) { VTK3->GetRenderer()->AddActor(outlineActor); } else { VTK3->GetRenderer()->RemoveActor(outlineActor); VTK3->GetRenderer()->RemoveViewProp(outlineActor); VTK3->GetRenderer()->Clear(); } VTK3->Invalidate();
Notícias direto do New York Times, gols do Lance, videocassetadas e muitos outros vídeos no MSN Videos! Confira já!
Conheça já o Windows Live Spaces, o site de relacionamentos do Messenger! Crie já o seu!
Hotmail on your mobile. Never miss another e-mail with
_________________________________________________________________
Conheça o Windows Live Spaces, a rede de relacionamentos do Messenger!
http://www.amigosdomessenger.com.br/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080505/dc7c3012/attachment.htm>
More information about the vtkusers
mailing list