X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FOBJECT%2FSMESH_DeviceActor.cxx;h=28670e6bef7302f017887740615bed1380d270df;hp=962ad1ed8c12f04a210b8ce34e97f659fac19a3a;hb=4ff5bd61540272713e48de1eee75625028c32155;hpb=83f19818fce494a77ddf10b70493abdd9f73e4e0 diff --git a/src/OBJECT/SMESH_DeviceActor.cxx b/src/OBJECT/SMESH_DeviceActor.cxx index 962ad1ed8..28670e6be 100644 --- a/src/OBJECT/SMESH_DeviceActor.cxx +++ b/src/OBJECT/SMESH_DeviceActor.cxx @@ -32,10 +32,10 @@ #include "SMESH_ControlsDef.hxx" #include "SMESH_ActorUtils.h" -#include "SALOME_Transform.h" -#include "SALOME_TransformFilter.h" -#include "SALOME_PassThroughFilter.h" -#include "SALOME_ExtractUnstructuredGrid.h" +#include +#include +#include +#include // VTK Includes #include @@ -100,16 +100,16 @@ SMESH_DeviceActor::SMESH_DeviceActor() myExtractGeometry->SetReleaseDataFlag(true); myIsImplicitFunctionUsed = false; - myExtractUnstructuredGrid = SALOME_ExtractUnstructuredGrid::New(); + myExtractUnstructuredGrid = VTKViewer_ExtractUnstructuredGrid::New(); myMergeFilter = vtkMergeFilter::New(); - myGeomFilter = SALOME_GeometryFilter::New(); + myGeomFilter = VTKViewer_GeometryFilter::New(); - myTransformFilter = SALOME_TransformFilter::New(); + myTransformFilter = VTKViewer_TransformFilter::New(); for(int i = 0; i < 6; i++) - myPassFilter.push_back(SALOME_PassThroughFilter::New()); + myPassFilter.push_back(VTKViewer_PassThroughFilter::New()); } @@ -231,7 +231,7 @@ void SMESH_DeviceActor::SetUnstructuredGrid(vtkUnstructuredGrid* theGrid){ } -SALOME_ExtractUnstructuredGrid* SMESH_DeviceActor::GetExtractUnstructuredGrid(){ +VTKViewer_ExtractUnstructuredGrid* SMESH_DeviceActor::GetExtractUnstructuredGrid(){ return myExtractUnstructuredGrid; } @@ -300,7 +300,7 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor bool anIsInitialized = theFunctor; myExtractUnstructuredGrid->ClearRegisteredCells(); myExtractUnstructuredGrid->ClearRegisteredCellsWithType(); - myExtractUnstructuredGrid->SetModeOfChanging(SALOME_ExtractUnstructuredGrid::ePassAll); + myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::ePassAll); myVisualObj->UpdateFunctor(theFunctor); using namespace SMESH::Controls; @@ -436,12 +436,12 @@ void SMESH_DeviceActor::SetExtControlMode(SMESH::Controls::FunctorPtr theFunctor { myExtractUnstructuredGrid->ClearRegisteredCells(); myExtractUnstructuredGrid->ClearRegisteredCellsWithType(); - myExtractUnstructuredGrid->SetModeOfChanging(SALOME_ExtractUnstructuredGrid::ePassAll); + myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::ePassAll); myVisualObj->UpdateFunctor(theFunctor); using namespace SMESH::Controls; if(FreeBorders* aFreeBorders = dynamic_cast(theFunctor.get())){ - myExtractUnstructuredGrid->SetModeOfChanging(SALOME_ExtractUnstructuredGrid::eAdding); + myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding); vtkUnstructuredGrid* aGrid = myVisualObj->GetUnstructuredGrid(); vtkIdType aNbCells = aGrid->GetNumberOfCells(); for( vtkIdType i = 0; i < aNbCells; i++ ){ @@ -516,7 +516,7 @@ unsigned long int SMESH_DeviceActor::GetMTime(){ } -void SMESH_DeviceActor::SetTransform(SALOME_Transform* theTransform){ +void SMESH_DeviceActor::SetTransform(VTKViewer_Transform* theTransform){ myTransformFilter->SetTransform(theTransform); } @@ -547,14 +547,22 @@ void SMESH_DeviceActor::SetRepresentation(EReperesent theMode){ switch(theMode){ case ePoint: myGeomFilter->SetInside(true); + myGeomFilter->SetWireframeMode(false); GetProperty()->SetRepresentation(0); break; + case eWireframe: + myGeomFilter->SetInside(false); + myGeomFilter->SetWireframeMode(true); + GetProperty()->SetRepresentation(theMode); + break; case eInsideframe: myGeomFilter->SetInside(true); + myGeomFilter->SetWireframeMode(true); GetProperty()->SetRepresentation(1); break; - default : + case eSurface: myGeomFilter->SetInside(false); + myGeomFilter->SetWireframeMode(false); GetProperty()->SetRepresentation(theMode); } myRepresentation = theMode; @@ -646,6 +654,8 @@ void SMESH_DeviceActor::SetShrinkFactor(float theValue){ void SMESH_DeviceActor::SetHighlited(bool theIsHighlited){ + if ( myIsHighlited == theIsHighlited ) + return; myIsHighlited = theIsHighlited; Modified(); }