+ /*!
+ * This object should be used to avoid problems with recurring calls of GetActors() method of the vtkRenderer class.
+ *
+ * Instead of the following instructions:
+ *
+ * vtkRenderer* aRenderer = ...;
+ * vtkActorCollection* anActorCollection = aRenderer->GetActors();
+ * DoSomething( anActorCollection ); // where GetActors() could be called again
+ *
+ * A code like the following should be used:
+ *
+ * vtkRenderer* aRenderer = ...;
+ * vtkActorCollection* anActorCollection = aRenderer->GetActors();
+ * ActorCollectionCopy aCopy( anActorCollection );
+ * DoSomething( aCopy.GetActors() );
+ */
+ struct VTKVIEWER_EXPORT ActorCollectionCopy
+ {
+ vtkActorCollection* myActorCollection;
+
+ ActorCollectionCopy( vtkActorCollection* theActorCollection );
+ ~ActorCollectionCopy();
+
+ vtkActorCollection* GetActors() const;
+ };
+