#include "SVTK_ViewModel.h"
#include "SVTK_Functor.h"
+#include "VTKViewer_Algorithm.h"
+
#include "SPlot2d_ViewModel.h"
#include "VisuGUI_SetupPlot2dDlg.h"
#include "Plot2d_SetupCurveDlg.h"
vw->unHighlightAll();
if (vtkRenderer *aRen = vw->getRenderer()) {
vtkActor *anActor;
- vtkActorCollection *anActColl = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection *anActColl = aCopy.GetActors();
for (anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL; ) {
if (anActor->GetVisibility() > 0)
if (VISU_Actor* anVISUActor = VISU_Actor::SafeDownCast(anActor)) {
#include "SVTK_RenderWindowInteractor.h"
#include "VISU_Event.h"
+#include "VTKViewer_Algorithm.h"
+
#include "VisuGUI_Prs3dTools.h"
#include "VisuGUI_ClippingDlg.h"
{
// First find all visible Gauss Points presentations
vtkRenderer* aRenderer = theViewWindow->getRenderer();
- vtkActorCollection* anActors = aRenderer->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ vtkActorCollection* anActors = aCopy.GetActors();
TGetVisibleEntries aGetVisibleEntries(theVisibleEntries);
SVTK::ForEach<VISU_GaussPtsAct>(anActors,
aGetVisibleEntries);
QPtrVector<SUIT_ViewWindow> views = vman->getViews();
for ( int i = 0, iEnd = vman->getViewsCount(); i < iEnd; i++ ) {
if ( SVTK_ViewWindow* vtkView = dynamic_cast<SVTK_ViewWindow*>( views[i] ) ) {
- vtkActorCollection* allActors = vtkView->getRenderer()->GetActors();
+ VTK::ActorCollectionCopy aCopy(vtkView->getRenderer()->GetActors());
+ vtkActorCollection* allActors = aCopy.GetActors();
allActors->InitTraversal();
while ( vtkActor* actor = allActors->GetNextActor() ) {
if ( actor->GetVisibility() ) { // store only visible actors
#include "SVTK_ViewWindow.h"
+#include "VTKViewer_Algorithm.h"
+
#include "SUIT_OverrideCursor.h"
#include "SUIT_MessageBox.h"
#include "SUIT_ResourceMgr.h"
myCurrent = 0;
init();
QStringList aPrsNames;
- vtkActorCollection *aCollection = myViewWindow->getRenderer()->GetActors();
+ VTK::ActorCollectionCopy aCopy(myViewWindow->getRenderer()->GetActors());
+ vtkActorCollection *aCollection = aCopy.GetActors();
aCollection->InitTraversal();
while(vtkActor* anActor = aCollection->GetNextActor()){
if (VISU_Actor* anVISUActor = dynamic_cast<VISU_Actor*>(anActor)) {
const char* theActorClassName = "VISU_Actor")
{
vtkRenderer *aRen = theViewWindow->getRenderer();
- vtkActorCollection *anActColl = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection *anActColl = aCopy.GetActors();
vtkProp *prop;
vtkFloatingPointType *bounds;
int somethingVisible = false;
{
if (SVTK_ViewWindow* aViewWindow = GetActiveViewWindow<SVTK_ViewWindow>(theModule)) {
vtkRenderer *aRen = aViewWindow->getRenderer();
- vtkActorCollection *anActColl = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection *anActColl = aCopy.GetActors();
anActColl->InitTraversal();
VISU_Actor* aResActor = NULL;
bool isOk = true;
if (TViewWindow* aViewWindow = GetActiveViewWindow<TViewWindow>(theModule)) {
aViewWindow->unHighlightAll();
if (vtkRenderer *aRen = aViewWindow->getRenderer()) {
- vtkActorCollection *aCollection = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection *aCollection = aCopy.GetActors();
aCollection->InitTraversal();
while (vtkActor *anAct = aCollection->GetNextActor()) {
if (anAct->GetVisibility() > 0)
if (!vf) return NULL;
if(MYDEBUG) MESSAGE("UpdateViewer - theDisplaing = "<<theDisplaing<<"; thePrs = "<<thePrs);
vtkRenderer *aRen = vf->getRenderer();
- vtkActorCollection *anActColl = aRen->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRen->GetActors());
+ vtkActorCollection* anActColl = aCopy.GetActors();
vtkActor *anActor;
VISU_Actor *anVISUActor = NULL, *aResActor = NULL;
for(anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL;){
return NULL;
vtkRenderer* aRenderer = theViewWindow->getRenderer();
- vtkActorCollection* anActors = aRenderer->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ vtkActorCollection* anActors = aCopy.GetActors();
return SVTK::Find<VISU_Actor>(anActors, VISU::TIsSamePrs3d(thePrs3d));
}
return NULL;
vtkRenderer* aRenderer = theViewWindow->getRenderer();
- vtkActorCollection* anActors = aRenderer->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ vtkActorCollection* anActors = aCopy.GetActors();
return SVTK::Find<VISU_ActorBase>(anActors, VISU::TIsSameActor(theActor));
}
if (SUIT_ViewWindow* aViewWindow = aViews.at(i)) {
if (SVTK_ViewWindow* vw = dynamic_cast<SVTK_ViewWindow*>(aViewWindow)) {
VISU_Actor* anActor = NULL;
- vtkActorCollection *anActColl = vw->getRenderer()->GetActors();
+ VTK::ActorCollectionCopy aCopy(vw->getRenderer()->GetActors());
+ vtkActorCollection *anActColl = aCopy.GetActors();
anActColl->InitTraversal();
vtkActor *aVTKActor = anActColl->GetNextActor();
for (; !anActor && aVTKActor; aVTKActor = anActColl->GetNextActor()) {
#include "SVTK_ViewWindow.h"
#include "SVTK_ViewModel.h"
+#include "VTKViewer_Algorithm.h"
#include "SPlot2d_ViewModel.h"
#include "Plot2d_ViewFrame.h"
{
SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(myViewWindow);
vtkRenderer* aRenderer = aViewWindow->getRenderer();
- vtkActorCollection* anActors = aRenderer->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ vtkActorCollection* anActors = aCopy.GetActors();
anActors->InitTraversal();
while (vtkActor *anAct = anActors->GetNextActor()) {
if (VISU_ActorBase* anActor = dynamic_cast<VISU_ActorBase*>(anAct)) {
if ( mySelector->HasIndex( myIO ) )
mySelector->GetIndex(myIO, myMapIndex);
- myActor = SVTK::Find<VISU_GaussPtsAct>(myInteractor->getRenderer()->GetActors(),
+ VTK::ActorCollectionCopy aCopy(myInteractor->getRenderer()->GetActors());
+ myActor = SVTK::Find<VISU_GaussPtsAct>(aCopy.GetActors(),
SVTK::TIsSameIObject<VISU_GaussPtsAct>( myIO ));
if ( !myActor )
return aResult;
#include "VISU_PlanesWidget.hxx"
#include "VISU_SphereWidget.hxx"
+#include "VTKViewer_Algorithm.h"
+
#include <vtkObjectFactory.h>
#include <vtkProperty.h>
#include <vtkPointPicker.h>
float aLastRenderTimeInSeconds = aRenderer->GetLastRenderTimeInSeconds();
if(aLastRenderTimeInSeconds > aTol){
size_t aNumberOfCells = 0;
- if(vtkActorCollection *anActorCollection = aRenderer->GetActors()){
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ if(vtkActorCollection *anActorCollection = aCopy.GetActors()){
anActorCollection->InitTraversal();
while(vtkActor *anActor = anActorCollection->GetNextActor()){
if(anActor->GetVisibility()){
#include "SUIT_Session.h"
#include "SVTK_RenderWindowInteractor.h"
+#include "VTKViewer_Algorithm.h"
#include <vtkActorCollection.h>
#include <vtkCallbackCommand.h>
int aNumberOfPoints = 0;
vtkActor* anActor;
- vtkActorCollection* anActColl = aRenderer->GetActors();
+ VTK::ActorCollectionCopy aCopy(aRenderer->GetActors());
+ vtkActorCollection* anActColl = aCopy.GetActors();
for( anActColl->InitTraversal(); ( anActor = anActColl->GetNextActor() ) != NULL; )
{
if( VISU_GaussPtsAct1* aGaussActor = VISU_GaussPtsAct1::SafeDownCast( anActor ) )
if(SVTK_ViewWindow* aViewWindow = dynamic_cast<SVTK_ViewWindow*>(aViews.at(i))){
bool aResult;
VVTK::TIsOneActorVisibleAction anAction(aResult);
- SVTK::ForEachIf<SALOME_Actor>(aViewWindow->getRenderer()->GetActors(),
+ VTK::ActorCollectionCopy aCopy(aViewWindow->getRenderer()->GetActors());
+ SVTK::ForEachIf<SALOME_Actor>(aCopy.GetActors(),
SVTK::TIsSameIObject<SALOME_Actor>(theIO),
anAction);
return anAction.myResult;