Update();
}
+void VISU::ScalarMap_i::SameAsParams (const ScalarMap_i* theOrigin)
+{
+ int time = GetIteration();
+ SameAs(theOrigin);
+ myIteration = time;
+
+ //??Build(true);
+ Build(-1);
+ Update();
+}
+
/**
* Creates Scalar Map and initialises it from resources
int aScalarMode = aResourceMgr->integerValue("VISU", "scalar_bar_mode", 0);
SetScalarMode(aScalarMode);
-
+
// Orientation
int orient = aResourceMgr->integerValue("VISU", "scalar_bar_orientation", 0);
if (orient == 1)
float aXorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.01 : 0.2;
aXorigin = aResourceMgr->doubleValue("VISU", propertyName + "x", aXorigin);
myPosition[0] = aXorigin;
-
+
float aYorigin = (myOrientation == VISU::ScalarMap::VERTICAL) ? 0.1 : 0.012;
aYorigin = aResourceMgr->doubleValue("VISU", propertyName + "y", aYorigin);
myPosition[1] = aYorigin;
-
+
// Scalar Bar size
myWidth = (myOrientation == VISU::ScalarMap::VERTICAL)? 0.1 : 0.6;
myWidth = aResourceMgr->doubleValue("VISU", propertyName + "width", myWidth);
-
+
myHeight = (myOrientation == VISU::ScalarMap::VERTICAL)? 0.8:0.12;
myHeight = aResourceMgr->doubleValue("VISU", propertyName + "height", myHeight);
// Nb of Labels
myNumberOfLabels = aResourceMgr->integerValue( "VISU", "scalar_bar_num_labels", 5 );
-
+
// Scalar Range
int rangeType = aResourceMgr->integerValue("VISU" , "scalar_range_type", 0);
myIsFixedRange = (rangeType == 1) ? true : false;
float aMax = aResourceMgr->doubleValue("VISU", "scalar_range_max", 0);
SetRange(aMin,aMax);
}
-
+
bool isLog = aResourceMgr->booleanValue("VISU", "scalar_bar_logarithmic", false);
-
+
if( isLog )
SetScaling(VISU::LOGARITHMIC);
else
// Fonts properties definition
myIsBoldTitle = myIsItalicTitle = myIsShadowTitle = true;
myTitFontType = VTK_ARIAL;
-
+
if ( aResourceMgr->hasValue( "VISU", "scalar_bar_title_font" ) )
{
QFont f = aResourceMgr->fontValue( "VISU", "scalar_bar_title_font" );
-
+
if ( f.family() == "Arial" )
myTitFontType = VTK_ARIAL;
else if ( f.family() == "Courier" )
myTitFontType = VTK_COURIER;
else if ( f.family() == "Times" )
myTitFontType = VTK_TIMES;
-
+
myIsBoldTitle = f.bold();
myIsItalicTitle = f.italic();
myIsShadowTitle = f.underline();
}
-
+
QColor aTextColor = aResourceMgr->colorValue( "VISU", "scalar_bar_title_color", QColor( 255, 255, 255 ) );
-
- myTitleColor[0] = aTextColor.red() / 255;
+
+ myTitleColor[0] = aTextColor.red() / 255;
myTitleColor[1] = aTextColor.green() / 255;
myTitleColor[2] = aTextColor.blue() / 255;
-
+
///
myIsBoldLabel = myIsItalicLabel = myIsShadowLabel = true;
myLblFontType = VTK_ARIAL;
-
+
if ( aResourceMgr->hasValue( "VISU", "scalar_bar_label_font" ) )
{
QFont f = aResourceMgr->fontValue( "VISU", "scalar_bar_label_font" );
-
+
if ( f.family() == "Arial" )
myLblFontType = VTK_ARIAL;
else if ( f.family() == "Courier" )
myLblFontType = VTK_COURIER;
else if ( f.family() == "Times" )
myLblFontType = VTK_TIMES;
-
+
myIsBoldLabel = f.bold();
myIsItalicLabel = f.italic();
myIsShadowLabel = f.underline();
}
QColor aLabelColor = aResourceMgr->colorValue( "VISU", "scalar_bar_label_color", QColor( 255, 255, 255 ) );
-
- myLabelColor[0] = aLabelColor.red() / 255;
+
+ myLabelColor[0] = aLabelColor.red() / 255;
myLabelColor[1] = aLabelColor.green() / 255;
myLabelColor[2] = aLabelColor.blue() / 255;
}
break;
- case VISU::TPLOT3D: // Cut Planes
+ case VISU::TPLOT3D: // Plot3d
{
VISU::Plot3D_i* aPresent = new VISU::Plot3D_i (pResult, false);
aPresent->Create(aMeshName.latin1(), anEntity,
_PTR(SObject) newObj = aStudyBuilder->NewObject(aAnimSObject);
aStudyBuilder->Addreference(newObj, aData.myField);
if (aData.myPrs.empty()) {
- VISU::CreateAttributes(myStudy, newObj->GetID().c_str(),"","",
- GetPresentationComment(aData.myPrsType).c_str(),"","",true);
- } else {
+ generatePresentations(i);
+ //VISU::CreateAttributes(myStudy, newObj->GetID().c_str(),"","",
+ // GetPresentationComment(aData.myPrsType).c_str(),"","",true);
+ }// else {
ostringstream strOut;
aData.myPrs[0]->ToStream(strOut);
string aPrsComment = strOut.str();
VISU::CreateAttributes(myStudy, newObj->GetID().c_str(),"","",
aData.myPrs[0]->GetComment(),"",aPrsComment.c_str(),true);
- }
+ //}
}
aStudyBuilder->CommitCommand();
}
aData.myPrs[0]->GetOffset(aData.myOffset);
for (int i = 1; i < aData.myNbFrames; i++) {
- aData.myPrs[i]->SameAs(aData.myPrs[0]);
+ //jfa 03.08.2005:aData.myPrs[i]->SameAs(aData.myPrs[0]);
+ aData.myPrs[i]->SameAsParams(aData.myPrs[0]);//jfa 03.08.2005
}
}
string aStr = aAnimSObject->GetID();