Version: 6.3.1

src/VISU_I/VISU_ScalarMap_i.hh

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  VISU OBJECT : interactive object for VISU entities implementation
00024 //  File   : VISU_PrsObject_i.hxx
00025 //  Author : Alexey PETROV
00026 //  Module : VISU
00027 //
00028 #ifndef VISU_ScalarMap_i_HeaderFile
00029 #define VISU_ScalarMap_i_HeaderFile
00030 
00031 #include "VISU_ColoredPrs3d_i.hh"
00032 
00033 #include <string>
00034 #include <set>
00035 
00036 class VISU_ScalarMapPL;
00037 
00038 namespace VISU
00039 {
00040   //============================================================================
00041   class VISU_I_EXPORT ScalarMap_i : public virtual POA_VISU::ScalarMap,
00042                         public virtual ColoredPrs3d_i
00043   {
00044     static int myNbPresent;
00045     ScalarMap_i(const ScalarMap_i&);
00046 
00047   public:
00048      //----------------------------------------------------------------------------
00049     typedef ColoredPrs3d_i TSuperClass;
00050     typedef VISU::ScalarMap TInterface;
00051 
00052     explicit
00053     ScalarMap_i(EPublishInStudyMode thePublishInStudyModep);
00054 
00055     virtual
00056     ~ScalarMap_i();
00057 
00058     virtual
00059     VISU::VISUType 
00060     GetType() 
00061     { 
00062       return VISU::TSCALARMAP;
00063     }
00064 
00065     //----------------------------------------------------------------------------
00067     virtual
00068     CORBA::Float
00069     GetMemorySize();
00070 
00071     //----------------------------------------------------------------------------
00072     virtual 
00073     VISU::Scaling 
00074     GetScaling();
00075 
00076     virtual
00077     void
00078     SetScaling(VISU::Scaling theScaling);
00079 
00080     //----------------------------------------------------------------------------
00081     virtual 
00082     void 
00083     SetLinkColor(const SALOMEDS::Color& theColor);
00084 
00085     virtual 
00086     SALOMEDS::Color 
00087     GetLinkColor();
00088 
00089     //----------------------------------------------------------------------------
00090     virtual 
00091     VISU::GaussMetric 
00092     GetGaussMetric();
00093 
00094     virtual
00095     void
00096     SetGaussMetric(VISU::GaussMetric theGaussMetric);
00097 
00098     //----------------------------------------------------------------------------
00100     virtual
00101     void
00102     SetSourceGeometry();
00103 
00105     virtual 
00106     void
00107     AddMeshOnGroup(const char* theGroupName);
00108     
00110     virtual
00111     void
00112     RemoveAllGeom();
00113 
00114     //----------------------------------------------------------------------------
00115     VISU_ScalarMapPL* 
00116     GetSpecificPL() const
00117     { 
00118       return myScalarMapPL; 
00119     }
00120 
00121     virtual CORBA::Boolean IsBarVisible() { return myShowBar; }
00122 
00123     virtual void SetBarVisible(CORBA::Boolean theVisible);
00124     
00125   protected:
00127     virtual 
00128     void
00129     DoSetInput(bool theIsInitilizePipe, bool theReInit);
00130 
00132     virtual
00133     void
00134     CreatePipeLine(VISU_PipeLine* thePipeLine);
00135 
00137     virtual 
00138     bool 
00139     CheckIsPossible();
00140 
00141   public:
00146     static
00147     size_t
00148     IsPossible(Result_i* theResult, 
00149             const std::string& theMeshName, 
00150             VISU::Entity theEntity,
00151             const std::string& theFieldName, 
00152             CORBA::Long theTimeStampNumber,
00153             bool theIsMemoryCheck);
00154 
00156     virtual
00157     Storable* 
00158     Create(const std::string& theMeshName, 
00159         VISU::Entity theEntity,
00160         const std::string& theFieldName, 
00161         CORBA::Long theTimeStampNumber);
00162 
00163     virtual 
00164     void
00165     ToStream(std::ostringstream& theStr);
00166 
00167     static const std::string myComment;
00168 
00169     virtual
00170     const char* 
00171     GetComment() const;
00172 
00173     virtual
00174     QString
00175     GenerateName();
00176 
00177     virtual
00178     const char* 
00179     GetIconName();
00180 
00181     void
00182     UpdateIcon();
00183 
00184     virtual 
00185     Storable* 
00186     Restore(SALOMEDS::SObject_ptr theSObject,
00187          const Storable::TRestoringMap& theMap);
00188 
00189     virtual 
00190     void
00191     SameAs(const Prs3d_i* theOrigin);
00192 
00193     virtual 
00194     VISU_Actor* 
00195     CreateActor();
00196     
00197     virtual 
00198     VISU_Actor* 
00199     CreateActor(bool toSupressShrinking);
00200 
00201     virtual
00202     void
00203     UpdateActor(VISU_ActorBase* theActor);
00204 
00205     virtual
00206     vtkFloatingPointType
00207     GetComponentMin(vtkIdType theCompID);
00208 
00209     virtual
00210     vtkFloatingPointType
00211     GetComponentMax(vtkIdType theCompID);
00212 
00213   private:
00214     VISU_ScalarMapPL* myScalarMapPL;
00215     SALOMEDS::Color myLinkColor;
00216     bool myShowBar;
00217   };
00218 }
00219 
00220 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS