Version: 6.3.1

src/VISU_I/VISU_Mesh_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_Mesh_i_HeaderFile
00029 #define VISU_Mesh_i_HeaderFile
00030 
00031 #include "VISU_Prs3d_i.hh"
00032 
00033 class VISU_MeshPL;
00034 
00035 namespace VISU
00036 {
00037   class VISU_I_EXPORT Mesh_i : public virtual POA_VISU::Mesh,
00038            public virtual Prs3d_i
00039   {
00040     static int myNbPresent;
00041     Mesh_i(const Mesh_i&);
00042 
00043   public:
00044     typedef Prs3d_i TSuperClass;
00045     typedef VISU::Mesh TInterface;
00046 
00047     Mesh_i();
00048 
00049     virtual
00050     ~Mesh_i();
00051 
00052     virtual
00053     void
00054     SameAs(const Prs3d_i* theOrigin);
00055 
00056     virtual
00057     void
00058     RemoveFromStudy();
00059 
00060     virtual
00061     VISU::VISUType 
00062     GetType() 
00063     { 
00064       return VISU::TMESH;
00065     }
00066 
00067     virtual 
00068     void 
00069     SetCellColor(const SALOMEDS::Color& theColor);
00070 
00071     virtual 
00072     SALOMEDS::Color 
00073     GetCellColor();
00074 
00075     virtual 
00076     void 
00077     SetNodeColor(const SALOMEDS::Color& theColor);
00078 
00079     virtual 
00080     SALOMEDS::Color 
00081     GetNodeColor();
00082 
00083     virtual 
00084     void 
00085     SetLinkColor(const SALOMEDS::Color& theColor);
00086 
00087     virtual 
00088     SALOMEDS::Color 
00089     GetLinkColor();
00090 
00091     virtual 
00092     void
00093     SetPresentationType(VISU::PresentationType theType);
00094 
00095     virtual 
00096     void
00097     SetQuadratic2DPresentationType(VISU::Quadratic2DPresentationType theType);
00098 
00099     virtual 
00100     VISU::Quadratic2DPresentationType
00101     GetQuadratic2DPresentationType();
00102 
00103     virtual
00104     VISU::PresentationType 
00105     GetPresentationType();
00106 
00107 
00108     virtual void SetShrink(CORBA::Boolean toShrink);
00109 
00110     virtual CORBA::Boolean IsShrank();
00111 
00112     VISU_MeshPL* GetSpecificPL() const
00113     { 
00114       return myMeshPL;
00115     }
00116 
00117   protected:
00118     Storable* 
00119     Build(int theRestoring);
00120 
00121     VISU_MeshPL* myMeshPL;
00122 
00123     int myEntity;//jfa IPAL9284: TEntity myEntity;
00124     std::string mySubMeshName;
00125     VISU::VISUType myType;
00126 
00127     VISU::PresentationType              myPresentType;
00128     VISU::Quadratic2DPresentationType   my2DQuadPrsType;
00129     SALOMEDS::Color myCellColor;
00130     SALOMEDS::Color myNodeColor;
00131     SALOMEDS::Color myLinkColor;
00132     bool myIsShrank;
00133 
00134   public:
00135     static 
00136     size_t
00137     IsPossible(VISU::Result_i* theResult, 
00138             const std::string& theMeshName,
00139             VISU::Entity theEntity, 
00140             const std::string& theFamilyName = "");
00141     virtual 
00142     Storable* 
00143     Create(VISU::Result_i* theResult, 
00144         const std::string& theMeshName, 
00145         VISU::Entity theEntity, 
00146         const std::string& theFamilyName = "");
00147 
00148     static 
00149     size_t
00150     IsPossible(VISU::Result_i* theResult, 
00151             const std::string& theMeshName, 
00152             const std::string& theGroupName);
00153     virtual 
00154     Storable* 
00155     Create(VISU::Result_i* theResult, 
00156         const std::string& theMeshName, 
00157         const std::string& theGroupName);
00158 
00159     VISU::Entity
00160     GetEntity() const;
00161 
00162     const std::string& 
00163     GetSubMeshName() const;
00164 
00165     virtual
00166     void
00167     ToStream(std::ostringstream& theStr);
00168 
00169     virtual
00170     const char* 
00171     GetComment() const;
00172 
00173     static const std::string myComment;
00174 
00175     virtual
00176     QString
00177     GenerateName();
00178 
00179     virtual
00180     Storable* 
00181     Restore(SALOMEDS::SObject_ptr theSObject,
00182          const Storable::TRestoringMap& theMap);
00183 
00184     static 
00185     Storable* 
00186     StorableEngine(SALOMEDS::SObject_ptr theSObject,
00187              const Storable::TRestoringMap& theMap,
00188              const std::string& thePrefix,
00189              CORBA::Boolean theIsMultiFile);
00190     
00191     virtual
00192     VISU_Actor* 
00193     CreateActor();
00194 
00195     virtual
00196     void 
00197     UpdateActor(VISU_ActorBase* theActor);
00198   };
00199 }
00200 
00201 #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