]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
To use the same scalar range that was calculated during initlization of the pipe...
authorapo <apo@opencascade.com>
Wed, 7 Dec 2005 09:49:54 +0000 (09:49 +0000)
committerapo <apo@opencascade.com>
Wed, 7 Dec 2005 09:49:54 +0000 (09:49 +0000)
src/PIPELINE/VISU_GaussPointsPL.cxx

index db7fdde9a3d92c97821f54b06cdeb266c62b4bf2..1316b2f679c4a740775044bfd9fda6437bcdb75d 100644 (file)
@@ -194,11 +194,10 @@ VISU_GaussPointsPL
 {
   Superclass::Init();
 
-  float aScalarRange[2];
-  GetSourceRange(aScalarRange);
   vtkDataSet* aDataSet = GetParentMesh();
   float aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
 
+  float* aScalarRange = GetScalarRange();
   static double EPS = 1.0 / VTK_LARGE_FLOAT;
   if(fabs(aScalarRange[1]) > EPS)
     SetScale( aScaleFactor / aScalarRange[1] );
@@ -229,9 +228,10 @@ VISU_GaussPointsPL
 ::Update()
 {
   //cout << "VISU_GaussPointsPL::Update()" << endl;
-
-  GetSourceRange(mySourceScalarRange);
-  myDeltaScalarRange = mySourceScalarRange[1] - mySourceScalarRange[0];
+  float* aScalarRange = GetScalarRange();
+  mySourceScalarRange[0] = aScalarRange[0];
+  mySourceScalarRange[1] = aScalarRange[1];
+  myDeltaScalarRange = aScalarRange[1] - aScalarRange[0];
 
   SetAverageCellSize( VISU_DeformedShapePL::GetScaleFactor( GetParentMesh() ) );
 
@@ -241,7 +241,7 @@ VISU_GaussPointsPL
   myScalarArray = aCellData->GetScalars();
 
   myPSMapper->SetLookupTable( myMapperTable );
-  myPSMapper->SetScalarRange( mySourceScalarRange );
+  myPSMapper->SetScalarRange( aScalarRange );
 
   this->UpdateGlyph();
 
@@ -255,8 +255,7 @@ VISU_GaussPointsPL
 {
   //cout << "VISU_GaussPointsPL::UpdateGlyph()" << endl;
 
-  float aScalarRange[2];
-  GetSourceRange( aScalarRange );
+  float* aScalarRange = GetScalarRange();
 
   if( myPSMapper->GetPointSpriteMode() == 0 ) // Results
   {