[vtkusers] assembly, actors, add/remove and rendering

Andres Barrera andresba at hotmail.com
Tue Aug 3 12:53:28 EDT 2004


Hi,

    Try    "( (vtkActor*) 
renderer->GetActors()->GetItemAsObject(actorNumber) )->VisibilityOff() ;"

    i.e.
        assembly->AddPart( ball    );
        assembly->AddPart( cube );
        assembly->AddPart( cone );

        renderer->AddActor( actor1);      // 0
        renderer->AddActor( actor2);      // 1
        renderer->AddActor( assembly);  // 2-4
        renderer->AddActor( actor3);     // 5

    then
           ( (vtkActor*) renderer->GetActors()->GetItemAsObject( 3 ) 
)->VisibilityOff() ;

          will hide "cube"


       Andres


>On Tue, 3 Aug 2004, Sean McInerney wrote:
>
>>First, you'll probably add the Assembly to the Renderer via a call to 
>>AddProp() since it's not an Actor subclass (AddActor is really just a 
>>deprecated synonym).
>>Second, you can use RemoveProp() to ... um ... remove it from the 
>>Renderer.

>ok, but assembly is... assembly.
>I'm removing items in it, but nothing is reflected in the renderer (it 
>shows the full picture).
>when I remove assembly - yes, there is no image, I see...

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee® 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the vtkusers mailing list