View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0010979VTK(No Category)public2010-07-12 04:052016-08-12 09:55
ReporterSebastian Barth 
Assigned ToKitware Robot 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0010979: vtkAssemblys visiblity is ignored if it is added to another assembly
DescriptionIf you have two vtkAssembly where one is added to the other one and the added assembly contains e.g. an vtkActor the visiblity of this added assembly is ignored. Instead, the visibility of the vtkActor is only set by its visibility flag and the toppest assembly visibility flag.

The attached code shows the problem: The actor line2 should not be visible, since its assembly line2Assembly is set to invisible, but it is visible!
Additional Information    vtkLineSource * source = vtkLineSource::New();
    source->SetPoint1(0, 0, 0);
    source->SetPoint2(20, 0, 0);

    vtkPolyDataMapper * mapper = vtkPolyDataMapper::New();
    mapper->SetInputConnection(source->GetOutputPort());

    vtkActor * line1 = vtkActor::New();
    line1->SetMapper(mapper);
    line1->GetProperty()->SetColor(1,0,0);

    vtkActor * line2 = vtkActor::New();
    line2->SetMapper(mapper);
    line2->GetProperty()->SetColor(0,1,0);
    line2->SetPosition(0, 2, 0);

    vtkAssembly * line2Assembly = vtkAssembly::New();
    line2Assembly->AddPart(line2);

    
    vtkAssembly * motherAssembly = vtkAssembly::New();
    motherAssembly->AddPart(line1);
    motherAssembly->AddPart(line2Assembly);

    // Following visiblity settings should set only actor line1 to be visible.
    // Instead, the line2 actor is visible, too;
    // line2Assemblys visibility is ignored -> Bug!
    line1->SetVisibility(true);
    line2->SetVisibility(true);
    line2Assembly->SetVisibility(false);
    motherAssembly->SetVisibility(true);


    vtkRenderer * ren = vtkRenderer::New();
    vtkRenderWindow * renWin = vtkRenderWindow::New();
    renWin->AddRenderer(ren);
    vtkRenderWindowInteractor * iren = vtkRenderWindowInteractor::New();
    iren->SetRenderWindow(renWin);

    ren->AddActor(motherAssembly);
    ren->ResetCamera();
    renWin->Render();
    iren->Start();
TagsVisibility, vtkAssembly
Project
Type
Attached Files

 Relationships

  Notes
(0037184)
Kitware Robot (administrator)
2016-08-12 09:55

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2010-07-12 04:05 Sebastian Barth New Issue
2010-07-12 08:33 Sebastian Barth Tag Attached: Visibility
2010-07-12 08:33 Sebastian Barth Tag Attached: vtkAssembly
2011-06-16 13:11 Zack Galbreath Category => (No Category)
2016-08-12 09:55 Kitware Robot Note Added: 0037184
2016-08-12 09:55 Kitware Robot Status expired => closed
2016-08-12 09:55 Kitware Robot Resolution open => moved
2016-08-12 09:55 Kitware Robot Assigned To => Kitware Robot


Copyright © 2000 - 2018 MantisBT Team