]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To enforce development
authorapo <apo@opencascade.com>
Fri, 26 Aug 2005 05:47:02 +0000 (05:47 +0000)
committerapo <apo@opencascade.com>
Fri, 26 Aug 2005 05:47:02 +0000 (05:47 +0000)
src/PIPELINE/VISU_GaussPointsPL.cxx
src/PIPELINE/VISU_GaussPointsPL.hxx

index ff967b12313eca170d07c75bd5e118cfb1bd08b6..c4400bdc88f4626a345a055087ae720651172116 100644 (file)
 vtkStandardNewMacro(VISU_GaussPointsPL);
 
 VISU_GaussPointsPL::VISU_GaussPointsPL()
-{
-  myFieldTransform = VISU_FieldTransform::New();
+{}
 
-  myMapperTable = VISU_LookupTable::New();
-  myMapperTable->SetScale(VTK_SCALE_LINEAR);
-  myMapperTable->SetHueRange(0.667,0.0);
-
-  myBarTable = VISU_LookupTable::New();
-  myBarTable->SetScale(VTK_SCALE_LINEAR);
-  myBarTable->SetHueRange(0.667,0.0);
-
-  myExtractor = VISU_Extractor::New();
-
-  myIsShrinkable = true;
-}
-
-void VISU_GaussPointsPL::Build()
-{
-  myExtractor->SetInput(GetInput2());
-  myFieldTransform->SetInput(myExtractor->GetOutput());
-
-  myMapper->SetColorModeToMapScalars();
-  myMapper->ScalarVisibilityOn();
-  myMapper->SetInput( myFieldTransform->GetUnstructuredGridOutput() );
-}
-
-void VISU_GaussPointsPL::Init()
-{
-}
-
-void VISU_GaussPointsPL::Update()
-{
-  float *aRange = myFieldTransform->GetScalarRange();
-  float aScalarRange[2] = {aRange[0], aRange[1]};
-  if(myBarTable->GetScale() == VTK_SCALE_LOG10)
-    VISU_LookupTable::ComputeLogRange(aRange,aScalarRange);
-  myMapperTable->SetRange(aScalarRange);
-  myMapperTable->SetMapScale(1.0);
-
-  myMapperTable->Build();
-  myBarTable->Build();
-
-  myMapper->SetLookupTable(myMapperTable);
-  myMapper->SetScalarRange(aScalarRange);
-
-  VISU_PipeLine::Update();
-}
-
-void VISU_GaussPointsPL::SetScalarRange(float theRange[2]){
-  myFieldTransform->SetScalarRange(theRange);
-  myBarTable->SetRange(theRange);
-  Modified();
-}
-
-void VISU_GaussPointsPL::GetSourceRange(float theRange[2]){
-  myExtractor->Update();
-  myExtractor->GetOutput()->GetScalarRange(theRange);
-}
-
-void VISU_GaussPointsPL::SetSourceRange(){
-  float aRange[2];
-  GetSourceRange(aRange);
-  SetScalarRange(aRange);
-}
+VISU_GaussPointsPL::~VISU_GaussPointsPL()
+{}
index 9708b16379ec87cdfee0b7974c98c39ef2441852..356641fdf4b088abff702da859b2c63ff45c233e 100644 (file)
 #ifndef VISU_GaussPointsPL_HeaderFile
 #define VISU_GaussPointsPL_HeaderFile
 
-#include "VISU_PipeLine.hxx"
-#include "VISU_ScalarBarActor.hxx"
+#include "VISU_ScalarMapPL.hxx"
 
-class VISU_Extractor;
-class VISU_FieldTransform;
-
-class VISU_GaussPointsPL : public VISU_PipeLine
+class VISU_GaussPointsPL: public VISU_ScalarMapPL
 {
 protected:
   VISU_GaussPointsPL();
+  virtual ~VISU_GaussPointsPL();
 
 public:
-  vtkTypeMacro(VISU_GaussPointsPL,VISU_PipeLine);
+  vtkTypeMacro(VISU_GaussPointsPL,VISU_ScalarMapPL);
   static VISU_GaussPointsPL* New();
-
-  virtual void SetScalarRange(float theRange[2]);
-
-public:
-  virtual void Init();
-  virtual void Build();
-  virtual void Update();
-
-  virtual VISU_LookupTable *GetMapperTable(){ return myMapperTable;}
-  virtual VISU_LookupTable *GetBarTable(){ return myBarTable;}
-
-  virtual void GetSourceRange(float theRange[2]);
-  virtual void SetSourceRange();
-
-protected:
-  VISU_LookupTable *myMapperTable, *myBarTable;
-  VISU_FieldTransform *myFieldTransform;
-  VISU_Extractor* myExtractor;
 };
   
 #endif