myContourFilter(vtkContourFilter::New()),
myWarpScalar(vtkWarpScalar::New()),
myIsContour(false),
- myScaleFactor(1.0)
+ myScaleFactor(1.0),
+ myMapScaleFactor(1.0)
{
SetIsShrinkable(false);
SetNumberOfContours(32);
{
if ( VISU::CheckIsSameValue( myWarpScalar->GetScaleFactor(), theScaleFactor ) )
return;
+
myScaleFactor = theScaleFactor;
- myWarpScalar->SetScaleFactor(theScaleFactor);
+ myWarpScalar->SetScaleFactor(theScaleFactor*myMapScaleFactor);
}
::SetMapScale(vtkFloatingPointType theMapScale)
{
Superclass::SetMapScale(theMapScale);
+ myMapScaleFactor = theMapScale;
if ( myIsContour ) {
vtkFloatingPointType aSourceRange[2];
void operator=(const VISU_DeformedGridPL&); // Not implemented.
vtkFloatingPointType myScaleFactor;
+ vtkFloatingPointType myMapScaleFactor;
vtkContourFilter* myContourFilter;
vtkWarpScalar *myWarpScalar;
bool myIsContour;
*/
VISU_DeformedShapeAndScalarMapPL
::VISU_DeformedShapeAndScalarMapPL():
- myScaleFactor(0.0)
+ myScaleFactor(1.0),
+ myMapScaleFactor(1.0)
{
myWarpVector = vtkWarpVector::New();
if(VISU::CheckIsSameValue(myScaleFactor, theScale))
return;
- myWarpVector->SetScaleFactor(theScale);
myScaleFactor = theScale;
+ myWarpVector->SetScaleFactor(theScale*myMapScaleFactor);
}
//----------------------------------------------------------------------------
VISU_DeformedShapeAndScalarMapPL
::GetScale()
{
- return myWarpVector->GetScaleFactor();
+ return myScaleFactor;
}
//----------------------------------------------------------------------------
VISU_DeformedShapeAndScalarMapPL
::SetMapScale(vtkFloatingPointType theMapScale)
{
+ myMapScaleFactor = theMapScale;
Superclass::SetMapScale(theMapScale);
myWarpVector->SetScaleFactor(myScaleFactor*theMapScale);
}
VISU_DeformedShapeAndScalarMapPL(const VISU_DeformedShapeAndScalarMapPL&);
vtkFloatingPointType myScaleFactor;
+ vtkFloatingPointType myMapScaleFactor;
vtkWarpVector *myWarpVector;
VISU_MergeFilter *myScalarsMergeFilter;
vtkSmartPointer<vtkUnstructuredGrid> myScalars;