X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_DeviceActor.cxx;h=02eefc529731a14d306fb607f83c91587c6a3307;hp=4a46932cc7f52eb89953f21da815187f584dc8b0;hb=824f011cef0dc8fee10a7eaca511e9f61690766b;hpb=fcec7fb454ef336224ec535af05b14732a85322d diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index 4a46932cc..02eefc529 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -63,6 +63,8 @@ #include +#include + #include "utilities.h" #ifdef _DEBUG_ @@ -90,6 +92,7 @@ SMESH_DeviceActor myProperty = vtkProperty::New(); myMapper = VTKViewer_PolyDataMapper::New(); + myPlaneCollection = vtkPlaneCollection::New(); vtkMapper::GetResolveCoincidentTopologyPolygonOffsetParameters(myPolygonOffsetFactor, myPolygonOffsetUnits); @@ -139,6 +142,7 @@ SMESH_DeviceActor if(MYDEBUG) MESSAGE("~SMESH_DeviceActor - "<Delete(); + myPlaneCollection->Delete(); myProperty->Delete(); @@ -256,12 +260,20 @@ SMESH_DeviceActor anId++; // 5 myMapper->SetInputConnection( myPassFilter[ anId ]->GetOutputPort() ); + if( myPlaneCollection->GetNumberOfItems() ) + myMapper->SetClippingPlanes( myPlaneCollection ); vtkLODActor::SetMapper( myMapper ); Modified(); } } +void +SMESH_DeviceActor +::SetPlaneCollection( vtkPlaneCollection* theCollection ) +{ + myPlaneCollection = theCollection; +} VTKViewer_ExtractUnstructuredGrid* SMESH_DeviceActor