1 // VISU OBJECT : interactive object for VISU entities implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
23 // File: VISU_ScalarMapOnDeformedShape_i.hh
24 // Author: Eugeny Nikolaev
27 #ifndef VISU_ScalarMapOnDeformedShape_i_HeaderFile
28 #define VISU_ScalarMapOnDeformedShape_i_HeaderFile
30 #include "VISU_ScalarMap_i.hh"
32 class VISU_ScalarMapOnDeformedShapePL;
36 //! Class of Scalar Map on Deformed Shape presentation.
37 class ScalarMapOnDeformedShape_i : public virtual POA_VISU::ScalarMapOnDeformedShape,
38 public virtual ScalarMap_i
40 static int myNbPresent;
41 ScalarMapOnDeformedShape_i();
42 ScalarMapOnDeformedShape_i(const ScalarMapOnDeformedShape_i&);
46 typedef ScalarMap_i TSuperClass;
49 ScalarMapOnDeformedShape_i(Result_i* theResult,
52 ScalarMapOnDeformedShape_i(Result_i* theResult,
53 SALOMEDS::SObject_ptr theSObject);
55 virtual ~ScalarMapOnDeformedShape_i();
57 virtual VISU::VISUType GetType()
59 return VISU::TSCALARMAPONDEFORMEDSHAPE;
62 typedef VISU::ScalarMapOnDeformedShape TInterface;
64 virtual void SetScale(CORBA::Double theScale);
65 virtual CORBA::Double GetScale();
67 virtual CORBA::Boolean IsColored() { return myIsColored; }
68 virtual void ShowColored(CORBA::Boolean theColored) { myIsColored = theColored; }
70 virtual SALOMEDS::Color GetColor() { return myColor;}
71 virtual void SetColor(const SALOMEDS::Color& theColor) { myColor = theColor;}
73 virtual void SetSourceRange(CORBA::Double theMinRange,CORBA::Double theMaxRange);
74 virtual CORBA::Double GetSourceRangeMin();
75 virtual CORBA::Double GetSourceRangeMax();
79 SameAs(const Prs3d_i* theOrigin);
81 virtual const VISU::PField&
84 VISU_ScalarMapOnDeformedShapePL* GetScalarMapOnDeformedShapePL(){ return myScalarMapOnDeformedShapePL;}
92 VISU_ScalarMapOnDeformedShapePL *myScalarMapOnDeformedShapePL;
93 SALOMEDS::Color myColor;
95 std::string myScalarMeshName;
96 std::string myScalarFieldName;
97 VISU::TEntity myScalarEntity;
98 int myScalarIteration;
102 static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
103 const char* theFieldName, int theIteration, int isMemoryCheck = true);
104 virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
105 const char* theFieldName, int theIteration);
107 virtual void ToStream(std::ostringstream& theStr);
109 virtual Storable* Restore(const Storable::TRestoringMap& theMap);
111 static Storable* Restore(SALOMEDS::SObject_ptr theSObject,
112 const std::string& thePrefix, const Storable::TRestoringMap& theMap);
114 static const std::string myComment;
115 virtual const char* GetComment() const;
116 virtual QString GenerateName();
118 virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
120 virtual void UpdateActor(VISU_Actor* theActor) ;
122 virtual void SetScalarField(const char* theMeshName,
123 const char* theFieldName,
124 const int theIteration,
125 const VISU::TEntity theEntity);
127 virtual void SetScalarField(const char* theMeshName,
128 const char* theFieldName,
129 const long theIteration,
130 const VISU::Entity theEntity);
132 virtual void SetScalarFieldName(const char* theName);
133 virtual std::string GetScalarFieldName();
134 virtual void SetScalarIteration(const int theValue);
135 virtual int GetScalarIteration();
136 virtual void SetScalarMeshName(const char* theName);
137 virtual std::string GetScalarMeshName();
138 virtual void SetScalarEntity(const VISU::TEntity theValue);
139 virtual VISU::TEntity GetScalarEntity();
140 virtual void SetScalarEEntity(const VISU::Entity theValue);
141 virtual VISU::Entity GetScalarEEntity();