if (MYDEBUG) MESSAGE("aNbGeoms="<<aNbGeoms);
myMeshGeometryList.clear();
for(int i=0; i<aNbGeoms; i++){
- AddBackGeometry(aPipeLine->GetGeometry(i));
+ AddBackGeometry(aPipeLine->GetGeometry(i),false);
}
- SetScalars(aPipeLine->GetScalars());
+ SetScalars(aPipeLine->GetScalars(),true);
}
Superclass::ShallowCopy(thePipeLine);
}
bool
VISU_PrsMergerPL
-::SetGeometry(VISU_PipeLine* theGeometry)
+::SetGeometry(VISU_PipeLine* theGeometry,bool theUpdate)
{
myMeshGeometryList.clear();
if(this->checkGeometry(theGeometry)){
myMeshGeometryList.push_back(theGeometry);
if (MYDEBUG) MESSAGE("this->GetGeometry(0)->GetIDMapper()="<<this->GetGeometry(0)->GetIDMapper());
-
- this->Execute();
+
+ if(theUpdate)
+ this->Execute();
return true;
} else
int
VISU_PrsMergerPL
-::AddBackGeometry(VISU_PipeLine* theGeometry)
+::AddBackGeometry(VISU_PipeLine* theGeometry,bool theUpdate)
{
if(theGeometry == NULL) return -1;
int aGeomNum = this->GetGeometryNumber(theGeometry);
if(aGeomNum == -1){
if(this->checkGeometry(theGeometry)){
myMeshGeometryList.push_back(theGeometry);
-
- this->Execute();
+
+ if(theUpdate)
+ this->Execute();
return (myMeshGeometryList.size()-1);
} else {
bool
VISU_PrsMergerPL
-::SetScalars(VISU_PipeLine* theInput)
+::SetScalars(VISU_PipeLine* theInput,bool theUpdate)
{
if(MYDEBUG) MESSAGE("VISU_PrsMergerPL::SetScalars()");
if ( this->checkScalars( theInput ) ){
myScalars = theInput;
VISU_ScalarMapPL* aScalarMap = dynamic_cast<VISU_ScalarMapPL*>(this->GetScalars());
myScalarRanges = aScalarMap->GetScalarRange();
+ if(theUpdate)
+ this->Execute();
return true;
} else
return false;
aDSArrays->Delete();
aArrays->Delete();
- myOutput->ShallowCopy(aMergeFilter->GetOutput());
-
aMergeFilter->Delete();
}
else
{
VISU_ScalarMapPL* aScalarMap = dynamic_cast<VISU_ScalarMapPL*>(this->GetScalars());
VISU_PrsMergerPL* aPrsMerger = dynamic_cast<VISU_PrsMergerPL*>(this->GetScalars());
- if(aPrsMerger != NULL){
- myOutput = NULL;
- }
if(aScalarMap != NULL){
SetInput(aScalarMap->GetInput());
- vtkDataSet* aOut = aScalarMap->GetOutput();
- myOutput = aOut;
-
}
-
}
}
}
/*!
* Add geometry of presentation to myMeshGeometryList.
+ * \params theGeometry - visu pipeline with geometry.
+ * \params theUpdate - update pipeline if true.
* \retval TRUE - if geometry and scalars on the common mesh, esle FALSE.
*/
virtual
bool
- SetGeometry(VISU_PipeLine* theGeometry);
+ SetGeometry(VISU_PipeLine* theGeometry,bool theUpdate=true);
/*!
* Add geometry to back of myMeshGeometryList.
+ * \params theInput - visu pipeline with geometry.
+ * \params theUpdate - update pipeline if true.
* \retval index of added geometry. (must be >= 0)
* \retval -1, if geometry not added.
*/
virtual
int
- AddBackGeometry(VISU_PipeLine* theGeometry);
+ AddBackGeometry(VISU_PipeLine* theGeometry,bool theUpdate=true);
/*!
* Get geometry id of myMeshGeometryList.
/*!
* Sets scalar values and ids by VISU_ScalarMapPL object.
+ * \params theInput - visu pipeline with scalar values
+ * \params theUpdate - update pipeline if true.
* \retval TRUE - if scalars and geometry on the common mesh, esle FALSE.
*/
virtual
bool
- SetScalars(VISU_PipeLine* theInput);
+ SetScalars(VISU_PipeLine* theInput,bool theUpdate=false);
/*!
* Gets input VISU_ScalarMapPL, which contain scalar values and ids.
vtkFloatingPointType* myScalarRanges;
- VISU_ScalarMapPL::THook* myOutput;
-
private:
/*!