FieldData& theData,
VISU::Result_i* theResult,
bool theIsRangeDefined,
- CORBA::Double theMinVal,
- CORBA::Double theMaxVal)
+ CORBA::Double& theMinVal,
+ CORBA::Double& theMaxVal,
+ CORBA::Double theTimeMin,
+ CORBA::Double theTimeMax)
{
- double aMin = VTK_LARGE_FLOAT, aMax = -VTK_LARGE_FLOAT;
+ theMinVal = VTK_LARGE_FLOAT;
+ theMaxVal = -VTK_LARGE_FLOAT;
+
_PTR(ChildIterator) anIter = theStudy->NewChildIterator(theData.myField);
anIter->Next(); // First is reference on support
theData.myTiming[aFrameId] = VISU_TimeAnimation::getTimeValue(aTimeStamp);
if (theIsRangeDefined) {
- if (theData.myTiming[aFrameId] < theMinVal)
+ if (theData.myTiming[aFrameId] < theTimeMin)
continue;
- if (theData.myTiming[aFrameId] > theMaxVal)
+ if (theData.myTiming[aFrameId] > theTimeMax)
break;
}
aFieldName.latin1(), aTimeStampId);
theData.myPrs[aFrameId++] = aPresent;
- aMin = std::min(aPresent->GetMin(),aMin);
- aMax = std::min(aPresent->GetMax(),aMax);
+ theMinVal = std::min(aPresent->GetMin(),theMinVal);
+ theMaxVal = std::max(aPresent->GetMax(),theMaxVal);
}
theData.myNbFrames = aFrameId;
if( aRangeType != 1 ){
for(long aFrameId = 0; aFrameId < theData.myNbFrames; aFrameId++) {
if (VISU::ScalarMap_i* aPrs = dynamic_cast<VISU::ScalarMap_i*>(theData.myPrs[aFrameId])){
- aPrs->SetRange(aMin, aMax);
+ aPrs->SetRange(theMinVal, theMaxVal);
aPrs->SetOffset(theData.myOffset);
}
}
if (theData.myPrsType == VISU::TISOSURFACE)
for (long aFrameId = 0; aFrameId < theData.myNbFrames; aFrameId++)
if (VISU::IsoSurfaces_i* aPrs = dynamic_cast<VISU::IsoSurfaces_i*>(theData.myPrs[aFrameId]))
- aPrs->SetSubRange(aMin, aMax);
+ aPrs->SetSubRange(theMinVal, theMaxVal);
}
}
}
using namespace VISU;
switch (aData.myPrsType) {
case VISU::TSCALARMAP: // ScalarMap
- GeneratePresentations<ScalarMap_i>(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal);
+ GeneratePresentations<ScalarMap_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myMinVal,
+ myMaxVal,
+ myTimeMin,
+ myTimeMax);
break;
case VISU::TISOSURFACE: // Iso Surfaces
- GeneratePresentations<IsoSurfaces_i>(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal);
+ GeneratePresentations<IsoSurfaces_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myMinVal,
+ myMaxVal,
+ myTimeMin,
+ myTimeMax);
break;
case VISU::TCUTPLANES: // Cut Planes
- GeneratePresentations<CutPlanes_i>(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal);
+ GeneratePresentations<CutPlanes_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myMinVal,
+ myMaxVal,
+ myTimeMin,
+ myTimeMax);
break;
case VISU::TPLOT3D: // Plot3d
- GeneratePresentations<Plot3D_i>(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal);
+ GeneratePresentations<Plot3D_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myMinVal,
+ myMaxVal,
+ myTimeMin,
+ myTimeMax);
break;
case VISU::TDEFORMEDSHAPE: // Deformed Shape
- GeneratePresentations<DeformedShape_i>(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal);
+ GeneratePresentations<DeformedShape_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myMinVal,
+ myMaxVal,
+ myTimeMin,
+ myTimeMax);
break;
case VISU::TVECTORS: // Vectors
- GeneratePresentations<Vectors_i>(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal);
+ GeneratePresentations<Vectors_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myMinVal,
+ myMaxVal,
+ myTimeMin,
+ myTimeMax);
break;
case VISU::TSTREAMLINES: // Stream Lines
- GeneratePresentations<StreamLines_i>(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal);
+ GeneratePresentations<StreamLines_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myMinVal,
+ myMaxVal,
+ myTimeMin,
+ myTimeMax);
break;
case VISU::TGAUSSPOINTS: // Gauss Points
- GeneratePresentations<GaussPoints_i>(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal);
+ GeneratePresentations<GaussPoints_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myMinVal,
+ myMaxVal,
+ myTimeMin,
+ myTimeMax);
break;
case VISU::TSCALARMAPONDEFORMEDSHAPE: // Scalar map on deformed shape
- GeneratePresentations<ScalarMapOnDeformedShape_i>(myStudy,aData,aResult,isRangeDefined(),myMinVal,myMaxVal);
+ GeneratePresentations<ScalarMapOnDeformedShape_i>(myStudy,
+ aData,
+ aResult,
+ isRangeDefined(),
+ myMinVal,
+ myMaxVal,
+ myTimeMin,
+ myTimeMax);
break;
default:
MESSAGE("Not implemented for this presentation type: " << aData.myPrsType);