Salome HOME
148c1b0fc16e1e6e9cfa9cbe5d7fd8f2a2084b27
[modules/gui.git] / src / SVTK / SVTK_Trihedron.cxx
1 #include "SVTK_Trihedron.h"
2 #include "SALOME_Actor.h"
3
4 #include <vtkObjectFactory.h>
5 #include <vtkActorCollection.h>
6 #include <vtkRenderer.h>
7
8 //****************************************************************
9 vtkStandardNewMacro(SVTK_Trihedron);
10
11 //****************************************************************
12 SVTK_Trihedron
13 ::SVTK_Trihedron()
14 {
15 }
16
17 //****************************************************************
18 int 
19 SVTK_Trihedron
20 ::GetVisibleActorCount(vtkRenderer* theRenderer)
21 {
22   vtkActorCollection* aCollection = theRenderer->GetActors();
23   aCollection->InitTraversal();
24   int aCount = 0;
25   while(vtkActor* aProp = aCollection->GetNextActor()) {
26     if(aProp->GetVisibility())
27       if(SALOME_Actor* anActor = SALOME_Actor::SafeDownCast(aProp))
28         if(!anActor->IsInfinitive()) 
29           aCount++;
30   }
31   return aCount;
32 }