VISU::Storable* VISU::DeformedShape_i::Create(const char* theMeshName, VISU::Entity theEntity,
const char* theFieldName, int theIteration)
{
- myIsColored = false;
- myColor.R = myColor.G = myColor.B = 0.5;
+ ShowColored( false );
return TSuperClass::Create(theMeshName,theEntity,theFieldName,theIteration);
}
TSuperClass::Restore(theMap);
SetScale(VISU::Storable::FindValue(theMap,"myFactor").toDouble());
- myIsColored = VISU::Storable::FindValue(theMap,"myIsColored").toInt();
- myColor.R = VISU::Storable::FindValue(theMap,"myColor.R").toDouble();
- myColor.G = VISU::Storable::FindValue(theMap,"myColor.G").toDouble();
- myColor.B = VISU::Storable::FindValue(theMap,"myColor.B").toDouble();
return this;
}
TSuperClass::ToStream(theStr);
Storable::DataToStream( theStr, "myFactor", GetScale() );
-
- Storable::DataToStream( theStr, "myIsColored", myIsColored );
- Storable::DataToStream( theStr, "myColor.R", myColor.R );
- Storable::DataToStream( theStr, "myColor.G", myColor.G );
- Storable::DataToStream( theStr, "myColor.B", myColor.B );
}
bool toShrink = aResourceMgr->booleanValue("VISU", "deformed_shape_shrink", false);
anActor->SetRepresentation(aDispMode);
if (toShrink && !toSupressShrinking) anActor->SetShrink();
- anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
+ SALOMEDS::Color aColor = GetColor();
+ anActor->GetProperty()->SetColor(aColor.R,aColor.G,aColor.B);
return anActor;
}
}else{
anActor->SetBarVisibility(false);
myPipeLine->GetMapper()->SetScalarVisibility(0);
- anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
+ SALOMEDS::Color aColor = GetColor();
+ anActor->GetProperty()->SetColor(aColor.R,aColor.G,aColor.B);
}
TSuperClass::UpdateActor(theActor);
}
virtual void SetScale(CORBA::Double theScale);
virtual CORBA::Double GetScale();
- virtual CORBA::Boolean IsColored() { return myIsColored; }
- virtual void ShowColored(CORBA::Boolean theColored) { myIsColored = theColored; }
+ virtual CORBA::Boolean IsColored() { return PrsMerger_i::IsColored(); }
+ virtual void ShowColored(CORBA::Boolean theColored) { PrsMerger_i::ShowColored( theColored ); }
- virtual SALOMEDS::Color GetColor() { return myColor;}
- virtual void SetColor(const SALOMEDS::Color& theColor) { myColor = theColor;}
+ virtual SALOMEDS::Color GetColor() { return PrsMerger_i::GetColor();}
+ virtual void SetColor(const SALOMEDS::Color& theColor) { PrsMerger_i::SetColor( theColor ); }
typedef VISU::DeformedShape TInterface;
VISU_DeformedShapePL* GetDeformedShapePL(){ return myDeformedShapePL;}
virtual const char* GetIconName();
VISU_DeformedShapePL *myDeformedShapePL;
- SALOMEDS::Color myColor;
- bool myIsColored;
public:
static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
const char* theFieldName, int theIteration)
{
if (MYDEBUG) MESSAGE("PrsMerger_i::Create");
+
myIsColored = true;
myColor.R = myColor.G = myColor.B = 0.5;
VISU::Storable* aRes = TSuperClass::Create(theMeshName,theEntity,theFieldName,theIteration);
{
if (MYDEBUG) MESSAGE("VISU::PrsMerger_i::Restore");
+ myIsColored = VISU::Storable::FindValue(theMap,"myIsColored",QString( "1" )).toInt();
+ myColor.R = VISU::Storable::FindValue(theMap,"myColor.R",QString( "0.5" )).toDouble();
+ myColor.G = VISU::Storable::FindValue(theMap,"myColor.G",QString( "0.5" )).toDouble();
+ myColor.B = VISU::Storable::FindValue(theMap,"myColor.B",QString( "0.5" )).toDouble();
+
TSuperClass::Restore(theMap);
SetScalarMap(myMeshName.c_str(),
Storable::DataToStream( theStr, "myMeshName", myMeshName.c_str() );
Storable::DataToStream( theStr, "myGeomNameList", aStrSubMeshName.latin1());
Storable::DataToStream( theStr, "myGeomEntityList", aStrEntity.latin1());
+
+ Storable::DataToStream( theStr, "myIsColored", myIsColored );
+ Storable::DataToStream( theStr, "myColor.R", myColor.R );
+ Storable::DataToStream( theStr, "myColor.G", myColor.G );
+ Storable::DataToStream( theStr, "myColor.B", myColor.B );
+
}
VISU_PrsMergerPL* myPrsMergerPL;
VISU_PrsMergerPL::TPipeLines myMeshPLList;
- SALOMEDS::Color myColor;
- bool myIsColored;
-
/*! Warning! This variable must be maked as list, if
* you we will need in different mesh entities (ENTITY,FAMILY,GROUP) as geometries.
*/
TNameAndEntityList myGeomNameEntityList;
+
+ private:
+
+ SALOMEDS::Color myColor;
+ bool myIsColored;
+
public:
static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
VISU::Prs3d_i::CreateActor(anActor,theIO);
anActor->SetVTKMapping(true);
anActor->SetBarVisibility(true);
- anActor->GetProperty()->SetColor(myColor.R,myColor.G,myColor.B);
+ SALOMEDS::Color aColor = GetColor();
+ anActor->GetProperty()->SetColor(aColor.R,aColor.G,aColor.B);
anActor->GetProperty()->SetLineWidth(GetLineWidth());
SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
int aDispMode = aResourceMgr->integerValue("VISU", "vectors_represent", 1);