Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
First step for the "21793: [CEA 625] Clipping : from coordinates or from bounding...
[modules/smesh.git]
/
src
/
OBJECT
/
SMESH_DeviceActor.cxx
diff --git
a/src/OBJECT/SMESH_DeviceActor.cxx
b/src/OBJECT/SMESH_DeviceActor.cxx
index 4a46932cc7f52eb89953f21da815187f584dc8b0..02eefc529731a14d306fb607f83c91587c6a3307 100644
(file)
--- a/
src/OBJECT/SMESH_DeviceActor.cxx
+++ b/
src/OBJECT/SMESH_DeviceActor.cxx
@@
-63,6
+63,8
@@
#include <vtkRenderer.h>
#include <vtkRenderer.h>
+#include <vtkPlaneCollection.h>
+
#include "utilities.h"
#ifdef _DEBUG_
#include "utilities.h"
#ifdef _DEBUG_
@@
-90,6
+92,7
@@
SMESH_DeviceActor
myProperty = vtkProperty::New();
myMapper = VTKViewer_PolyDataMapper::New();
myProperty = vtkProperty::New();
myMapper = VTKViewer_PolyDataMapper::New();
+ myPlaneCollection = vtkPlaneCollection::New();
vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
myPolygonOffsetUnits);
vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor,
myPolygonOffsetUnits);
@@
-139,6
+142,7
@@
SMESH_DeviceActor
if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
myMapper->Delete();
if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<<this);
myMapper->Delete();
+ myPlaneCollection->Delete();
myProperty->Delete();
myProperty->Delete();
@@
-256,12
+260,20
@@
SMESH_DeviceActor
anId++; // 5
myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
anId++; // 5
myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() );
+ if( myPlaneCollection->GetNumberOfItems() )
+ myMapper->SetClippingPlanes( myPlaneCollection );
vtkLODActor::SetMapper( myMapper );
Modified();
}
}
vtkLODActor::SetMapper( myMapper );
Modified();
}
}
+void
+SMESH_DeviceActor
+::SetPlaneCollection( vtkPlaneCollection* theCollection )
+{
+ myPlaneCollection = theCollection;
+}
VTKViewer_ExtractUnstructuredGrid*
SMESH_DeviceActor
VTKViewer_ExtractUnstructuredGrid*
SMESH_DeviceActor