X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVISU_I%2FVISU_Mesh_i.hh;h=de7e3142660d62f0fd47ed31a684b73826208a87;hb=d90eeb25287fa1f390fe7a336547e74161708e44;hp=70e4e6ae06983ec228e1f7069a32e7721529082e;hpb=5a556666ab9fa2ef09feb2f8c1773ca94dba5ede;p=modules%2Fvisu.git diff --git a/src/VISU_I/VISU_Mesh_i.hh b/src/VISU_I/VISU_Mesh_i.hh index 70e4e6ae..de7e3142 100644 --- a/src/VISU_I/VISU_Mesh_i.hh +++ b/src/VISU_I/VISU_Mesh_i.hh @@ -1,6 +1,6 @@ -// VISU OBJECT : interactive object for VISU entities implementation +// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // // This library is free software; you can redistribute it and/or @@ -17,13 +17,13 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org -// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// VISU OBJECT : interactive object for VISU entities implementation // File : VISU_PrsObject_i.hxx // Author : Alexey PETROV // Module : VISU - +// #ifndef VISU_Mesh_i_HeaderFile #define VISU_Mesh_i_HeaderFile @@ -31,79 +31,161 @@ class VISU_MeshPL; -namespace VISU{ - class Mesh_i : public virtual POA_VISU::Mesh, +namespace VISU +{ + class VISU_I_EXPORT Mesh_i : public virtual POA_VISU::Mesh, public virtual Prs3d_i { static int myNbPresent; - Mesh_i(); Mesh_i(const Mesh_i&); + public: - explicit - Mesh_i(Result_i* theResult); - explicit - Mesh_i(Result_i* theResult, - SALOMEDS::SObject_ptr theSObject); - virtual void SameAs(const Mesh_i* theOrigin); - virtual ~Mesh_i(); - virtual void RemoveFromStudy(); + typedef Prs3d_i TSuperClass; + typedef VISU::Mesh TInterface; - virtual VISU::VISUType GetType() { return VISU::TMESH;}; + Mesh_i(); - virtual void SetCellColor(const SALOMEDS::Color& theColor) { myCellColor = theColor;} - virtual SALOMEDS::Color GetCellColor() { return myCellColor;} + virtual + ~Mesh_i(); - virtual void SetNodeColor(const SALOMEDS::Color& theColor) { myNodeColor = theColor;} - virtual SALOMEDS::Color GetNodeColor() { return myNodeColor;} + virtual + void + SameAs(const Prs3d_i* theOrigin); - virtual void SetLinkColor(const SALOMEDS::Color& theColor) { myLinkColor = theColor;} - virtual SALOMEDS::Color GetLinkColor() { return myLinkColor;} + virtual + void + RemoveFromStudy(); - virtual void SetPresentationType(VISU::PresentationType theType) { myPresentType = theType;} - virtual PresentationType GetPresentationType() { return myPresentType;} + virtual + VISU::VISUType + GetType() + { + return VISU::TMESH; + } - typedef VISU::Mesh TInterface; - VISU_MeshPL* GetMeshPL(){ return myMeshPL;} + virtual + void + SetCellColor(const SALOMEDS::Color& theColor); - protected: - Storable* Build(int theRestoring); + virtual + SALOMEDS::Color + GetCellColor(); - VISU_MeshPL* myMeshPL; + virtual + void + SetNodeColor(const SALOMEDS::Color& theColor); - string myMeshName; - //jfa IPAL9284:TEntity myEntity; - int myEntity;//jfa IPAL9284 - string mySubMeshName; - VISU::VISUType myType; + virtual + SALOMEDS::Color + GetNodeColor(); - VISU::PresentationType myPresentType; - struct SALOMEDS::Color myCellColor, myNodeColor, myLinkColor; + virtual + void + SetLinkColor(const SALOMEDS::Color& theColor); - public: - static int IsPossible(Result_i* theResult, const char* theMeshName, Entity theEntity, const char* theFamilyName = ""); - virtual Storable* Create(const char* theMeshName, Entity theEntity, const char* theFamilyName = ""); + virtual + SALOMEDS::Color + GetLinkColor(); - static int IsPossible(Result_i* theResult, const char* theMeshName, const char* theGroupName); - virtual Storable* Create(const char* theMeshName, const char* theGroupName); + virtual + void + SetPresentationType(VISU::PresentationType theType); - const std::string& GetMeshName() const { return myMeshName;} - VISU::Entity GetEntity() const { return VISU::Entity(myEntity);} - const string& GetSubMeshName() const { return mySubMeshName;} + virtual + VISU::PresentationType + GetPresentationType(); - virtual void ToStream(std::ostringstream& theStr); - virtual const char* GetComment() const; - static const string myComment; - virtual QString GenerateName(); + virtual void SetShrink(CORBA::Boolean toShrink); - virtual Storable* Restore(const Storable::TRestoringMap& theMap); + virtual CORBA::Boolean IsShrank(); - virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL); + VISU_MeshPL* GetSpecificPL() const + { + return myMeshPL; + } + + protected: + Storable* + Build(int theRestoring); - virtual void UpdateActor(VISU_Actor* theActor); + VISU_MeshPL* myMeshPL; + + int myEntity;//jfa IPAL9284: TEntity myEntity; + std::string mySubMeshName; + VISU::VISUType myType; + + VISU::PresentationType myPresentType; + SALOMEDS::Color myCellColor; + SALOMEDS::Color myNodeColor; + SALOMEDS::Color myLinkColor; + bool myIsShrank; + + public: + static + size_t + IsPossible(VISU::Result_i* theResult, + const std::string& theMeshName, + VISU::Entity theEntity, + const std::string& theFamilyName = ""); + virtual + Storable* + Create(VISU::Result_i* theResult, + const std::string& theMeshName, + VISU::Entity theEntity, + const std::string& theFamilyName = ""); + + static + size_t + IsPossible(VISU::Result_i* theResult, + const std::string& theMeshName, + const std::string& theGroupName); + virtual + Storable* + Create(VISU::Result_i* theResult, + const std::string& theMeshName, + const std::string& theGroupName); + + VISU::Entity + GetEntity() const; + + const std::string& + GetSubMeshName() const; + + virtual + void + ToStream(std::ostringstream& theStr); + + virtual + const char* + GetComment() const; + + static const std::string myComment; + + virtual + QString + GenerateName(); + + virtual + Storable* + Restore(SALOMEDS::SObject_ptr theSObject, + const Storable::TRestoringMap& theMap); + + static + Storable* + StorableEngine(SALOMEDS::SObject_ptr theSObject, + const Storable::TRestoringMap& theMap, + const std::string& thePrefix, + CORBA::Boolean theIsMultiFile); + + virtual + VISU_Actor* + CreateActor(); + + virtual + void + UpdateActor(VISU_ActorBase* theActor); }; } #endif - -