//----------------------------------------------------------------------------
VISU_DeformedShapePL
::VISU_DeformedShapePL():
- myScaleFactor(0.0)
+ myScaleFactor(0.0),
+ myMapScaleFactor(1.0)
{
SetIsShrinkable(true);
{
if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), theScale))
return;
-
- myWarpVector->SetScaleFactor(theScale);
+
+ myWarpVector->SetScaleFactor(theScale*myMapScaleFactor);
myScaleFactor = theScale;
}
VISU_DeformedShapePL
::SetMapScale(vtkFloatingPointType theMapScale)
{
+ myMapScaleFactor = theMapScale;
Superclass::SetMapScale(theMapScale);
- myWarpVector->SetScaleFactor(myScaleFactor*theMapScale);
+ vtkFloatingPointType aMapScale = myScaleFactor * theMapScale;
+ if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), aMapScale))
+ return;
+
+ myWarpVector->SetScaleFactor( aMapScale );
}
bool theIsCopyInput);
vtkFloatingPointType myScaleFactor;
+ vtkFloatingPointType myMapScaleFactor;
vtkWarpVector *myWarpVector;
vtkCellDataToPointData* myCellDataToPointData;
myIsRelative(true),
myIsContour(false),
myPosition(0.5),
- myScaleFactor(1.0)
+ myScaleFactor(1.0),
+ myMapScaleFactor(1.0)
{
SetIsShrinkable(false);
::SetScaleFactor(vtkFloatingPointType theScaleFactor)
{
myScaleFactor = theScaleFactor;
- myWarpScalar->SetScaleFactor(theScaleFactor);
+ myWarpScalar->SetScaleFactor(theScaleFactor*myMapScaleFactor);
}
VISU_Plot3DPL
::SetMapScale(vtkFloatingPointType theMapScale)
{
+ myMapScaleFactor = theMapScale;
Superclass::SetMapScale(theMapScale);
if ( myIsContour ) {
vtkFloatingPointType myAngle[3];
bool myIsRelative, myIsContour;
- vtkFloatingPointType myPosition, myScaleFactor;
+ vtkFloatingPointType myPosition, myScaleFactor, myMapScaleFactor;
VISU_CutPlanesPL::PlaneOrientation myOrientation;
vtkSmartPointer<vtkCellDataToPointData> myCellDataToPointData;
*/
VISU_ScalarMapOnDeformedShapePL
::VISU_ScalarMapOnDeformedShapePL():
- myScaleFactor(0.0)
+ myScaleFactor(0.0),
+ myMapScaleFactor(1.0)
{
myWarpVector = vtkWarpVector::New();
if(VISU::CheckIsSameValue(myScaleFactor, theScale))
return;
- myWarpVector->SetScaleFactor(theScale);
+ myWarpVector->SetScaleFactor(theScale*myMapScaleFactor);
myScaleFactor = theScale;
}
VISU_ScalarMapOnDeformedShapePL
::GetScale()
{
- return myWarpVector->GetScaleFactor();
+ return myScaleFactor;
}
//----------------------------------------------------------------------------
VISU_ScalarMapOnDeformedShapePL
::SetMapScale(vtkFloatingPointType theMapScale)
{
+ myMapScaleFactor = theMapScale;
Superclass::SetMapScale(theMapScale);
- myWarpVector->SetScaleFactor(myScaleFactor*theMapScale);
+
+ vtkFloatingPointType aMapScale = myScaleFactor * theMapScale;
+
+ if(VISU::CheckIsSameValue(myWarpVector->GetScaleFactor(), aMapScale))
+ return;
+
+ myWarpVector->SetScaleFactor(aMapScale);
}
//----------------------------------------------------------------------------
VISU_ScalarMapOnDeformedShapePL(const VISU_ScalarMapOnDeformedShapePL&);
vtkFloatingPointType myScaleFactor;
+ vtkFloatingPointType myMapScaleFactor;
vtkWarpVector *myWarpVector;
VISU_MergeFilter *myScalarsMergeFilter;
vtkSmartPointer<vtkUnstructuredGrid> myScalars;
::SetMapScale(vtkFloatingPointType theMapScale)
{
VISU_ScalarMapPL::SetMapScale(theMapScale);
+ myMapScaleFactor = theMapScale;
myBaseGlyph->SetScaleFactor(myScaleFactor*theMapScale);
myTransformedGlyph->SetScaleFactor(myScaleFactor*theMapScale);