#include "VISU_Actor.h"
#include "VISU_PipeLine.hxx"
-#include "SALOME_ShrinkFilter.h"
-#include "SALOME_GeometryFilter.h"
-#include "SALOME_PassThroughFilter.h"
+#include "VTKViewer_ShrinkFilter.h"
+#include "VTKViewer_GeometryFilter.h"
+#include "VTKViewer_PassThroughFilter.h"
#include <stdexcept>
#ifdef _DEBUG_
static int MYDEBUG = 1;
-static int MYDEBUGWITHFILES = 0;
#else
static int MYDEBUG = 0;
-static int MYDEBUGWITHFILES = 0;
#endif
//=======================================================================
myIsShrunk = false;
myIsShrinkable = false;
- myShrinkFilter = SALOME_ShrinkFilter::New();
+ myShrinkFilter = VTKViewer_ShrinkFilter::New();
myShrinkFilter->SetStoreMapping(true);
SetShrinkFactor();
myIO = NULL;
myName = "";
-
- vtkProperty* aProperty = GetProperty();
- aProperty->SetAmbient(0.5);
- aProperty->SetDiffuse(0.2);
- aProperty->SetSpecular(0.2);
- aProperty->SetAmbientColor(1, 1, 1);
- aProperty->SetDiffuseColor(1, 1, 1);
- aProperty->SetSpecularColor(0.5, 0.5, 0.5);
- this->SetProperty(aProperty);
}
VISU_Actor::~VISU_Actor(){
this->Modified();
vtkMapper *aMapper = myPipeLine->GetMapper();
vtkDataSet *aDataSet = aMapper->GetInput();
- if(!aDataSet)
- throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no input data !!!");
- aDataSet->Update();
- static float eps = VTK_LARGE_FLOAT * 0.1 ;
- if(aDataSet->GetLength() > eps)
- throw std::runtime_error("VISU_Actor::SetPipeLine >> Diagonal of the actor is too large !!!");
- if(!aDataSet->GetNumberOfCells())
- throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no visible elements");
+
+ //This code has been moved into VISU::Prs3d_i::UpdateActor() for bug 9808
+ //if(!aDataSet)
+ // throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no input data !!!");
+ //aDataSet->Update();
+ //static float eps = VTK_LARGE_FLOAT * 0.1 ;
+ //if(aDataSet->GetLength() > eps)
+ // throw std::runtime_error("VISU_Actor::SetPipeLine >> Diagonal of the actor is too large !!!");
+ //if(!aDataSet->GetNumberOfCells())
+ // throw std::runtime_error("VISU_Actor::SetPipeLine >> There is no visible elements");
+
//Bug SAL4221: Mesh with less than 10 cells : shrink mode disable
//SetShrinkable(aDataSet->GetNumberOfCells() > 10);
- SetShrinkable(true);
+ SetShrinkable(thePipeLine->IsShrinkable());
//Now, we use vtkShrinkPolyData (not vtkShrinkFilter),
//and the class there is no such limitation.
-
+
myMapper->SetInput(aDataSet);
SetMapper(myMapper);
}
return SALOME_Actor::GetVisibility();
}
-void VISU_Actor::SetProperty(vtkProperty* theProperty){
- SALOME_Actor::SetProperty(theProperty);
-}
-
-vtkProperty* VISU_Actor::GetProperty(){
- return SALOME_Actor::GetProperty();
-}
-
void VISU_Actor::SetLineWidth(float theLineWidth){
GetProperty()->SetLineWidth(theLineWidth);
}