27 #ifndef VTKViewer_Algorithm_H
28 #define VTKViewer_Algorithm_H
32 #include <vtkActorCollection.h>
61 vtkActorCollection* GetActors()
const;
67 template<
typename TActor,
typename TFunction>
68 TFunction
ForEach(vtkActorCollection *theCollection, TFunction theFun)
71 theCollection->InitTraversal();
72 while(vtkActor *anAct = theCollection->GetNextActor())
73 if(TActor *anActor =
dynamic_cast<TActor*
>(anAct))
83 template<
typename TActor,
typename TPredicate,
typename TFunction>
84 TFunction
ForEachIf(vtkActorCollection *theCollection,
85 TPredicate thePredicate,
89 theCollection->InitTraversal();
90 while(vtkActor *anAct = theCollection->GetNextActor())
91 if(TActor *anActor =
dynamic_cast<TActor*
>(anAct))
92 if(thePredicate(anActor))
102 template<
typename TActor,
typename TPredicate>
103 TActor*
Find(vtkActorCollection *theCollection, TPredicate thePredicate)
106 theCollection->InitTraversal();
107 while(vtkActor *anAct = theCollection->GetNextActor())
108 if(TActor *anActor =
dynamic_cast<TActor*
>(anAct))
109 if(thePredicate(anActor))
#define VTKVIEWER_EXPORT
Definition: VTKViewer.h:33
Definition: VTKViewer_Algorithm.cxx:23
TFunction ForEachIf(vtkActorCollection *theCollection, TPredicate thePredicate, TFunction theFun)
Definition: VTKViewer_Algorithm.h:84
TActor * Find(vtkActorCollection *theCollection, TPredicate thePredicate)
Definition: VTKViewer_Algorithm.h:103
TFunction ForEach(vtkActorCollection *theCollection, TFunction theFun)
Definition: VTKViewer_Algorithm.h:68
Definition: VTKViewer_Algorithm.h:55
vtkActorCollection * myActorCollection
Definition: VTKViewer_Algorithm.h:56