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_PrsObject_i.hxx
24 // Author : Alexey PETROV
27 #ifndef VISU_Mesh_i_HeaderFile
28 #define VISU_Mesh_i_HeaderFile
30 #include "VISU_Prs3d_i.hh"
35 class Mesh_i : public virtual POA_VISU::Mesh,
36 public virtual Prs3d_i
38 static int myNbPresent;
40 Mesh_i(const Mesh_i&);
42 Mesh_i(Result_i* theResult, SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil());
43 virtual void SameAs(const Mesh_i* theOrigin);
45 virtual void RemoveFromStudy();
47 virtual VISU::VISUType GetType() { return VISU::TMESH;};
49 virtual void SetCellColor(const SALOMEDS::Color& theColor) { myCellColor = theColor;}
50 virtual SALOMEDS::Color GetCellColor() { return myCellColor;}
52 virtual void SetNodeColor(const SALOMEDS::Color& theColor) { myNodeColor = theColor;}
53 virtual SALOMEDS::Color GetNodeColor() { return myNodeColor;}
55 virtual void SetLinkColor(const SALOMEDS::Color& theColor) { myLinkColor = theColor;}
56 virtual SALOMEDS::Color GetLinkColor() { return myLinkColor;}
58 virtual void SetPresentationType(VISU::PresentationType theType) { myPresentType = theType;}
59 virtual PresentationType GetPresentationType() { return myPresentType;}
61 typedef VISU::Mesh TInterface;
62 VISU_MeshPL* GetMeshPL(){ return myMeshPL;}
65 Storable* Build(int theRestoring);
67 VISU_MeshPL* myMeshPL;
72 VISU::VISUType myType;
74 VISU::PresentationType myPresentType;
75 struct SALOMEDS::Color myCellColor, myNodeColor, myLinkColor;
78 static int IsPossible(Result_i* theResult, const char* theMeshName, Entity theEntity, const char* theFamilyName = "");
79 virtual Storable* Create(const char* theMeshName, Entity theEntity, const char* theFamilyName = "");
81 static int IsPossible(Result_i* theResult, const char* theMeshName, const char* theGroupName);
82 virtual Storable* Create(const char* theMeshName, const char* theGroupName);
84 virtual void ToStream(std::ostringstream& theStr);
86 virtual const char* GetComment() const;
87 static const string myComment;
88 virtual QString GenerateName();
90 virtual Storable* Restore(const Storable::TRestoringMap& theMap);
92 virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL);
94 virtual void UpdateActor(VISU_Actor* theActor);