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 VISU_ScalarMapOnDeformedShapePL* GetScalarMapOnDeformedShapePL(){ return myScalarMapOnDeformedShapePL;}
89 VISU_ScalarMapOnDeformedShapePL *myScalarMapOnDeformedShapePL;
90 SALOMEDS::Color myColor;
92 std::string myScalarMeshName;
93 std::string myScalarFieldName;
94 VISU::TEntity myScalarEntity;
95 int myScalarIteration;
98 static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity,
99 const char* theFieldName, int theIteration, int isMemoryCheck = true);
100 virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity,
101 const char* theFieldName, int theIteration);
103 virtual void ToStream(std::ostringstream& theStr);
105 virtual Storable* Restore(const Storable::TRestoringMap& theMap);
107 static Storable* Restore(SALOMEDS::SObject_ptr theSObject,
108 const std::string& thePrefix, const Storable::TRestoringMap& theMap);
110 static const std::string myComment;
111 virtual const char* GetComment() const;
112 virtual QString GenerateName();
114 virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
116 virtual void UpdateActor(VISU_Actor* theActor) ;
118 virtual void SetScalarField(const char* theMeshName,
119 const char* theFieldName,
120 const int theIteration,
121 const VISU::TEntity theEntity);
123 virtual void SetScalarFieldName(const char* theName);
124 virtual std::string GetScalarFieldName();
125 virtual void SetScalarIteration(const int theValue);
126 virtual int GetScalarIteration();
127 virtual void SetScalarMeshName(const char* theName);
128 virtual std::string GetScalarMeshName();
129 virtual void SetScalarEntity(const VISU::TEntity theValue);
130 virtual VISU::TEntity GetScalarEntity();