-// VISU OBJECT : interactive object for VISU entities implementation
+// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// 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
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
//
-// Copyright (C) 2003 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
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// 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
+// You should have received a copy of the GNU Lesser General Public
+// 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.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
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:
- Mesh_i(Result_i* theResult);
- virtual void SameAs(const Mesh_i* theOrigin);
- virtual ~Mesh_i();
- virtual void Destroy();
+ typedef Prs3d_i TSuperClass;
+ typedef VISU::Mesh TInterface;
+
+ Mesh_i();
- virtual VISU::VISUType GetType() { return VISU::TMESH;};
+ virtual
+ ~Mesh_i();
- virtual void SetCellColor(const SALOMEDS::Color& theColor) { myCellColor = theColor;}
- virtual SALOMEDS::Color GetCellColor() { return myCellColor;}
+ virtual
+ void
+ SameAs(const Prs3d_i* theOrigin);
- virtual void SetNodeColor(const SALOMEDS::Color& theColor) { myNodeColor = theColor;}
- virtual SALOMEDS::Color GetNodeColor() { return myNodeColor;}
+ virtual
+ void
+ RemoveFromStudy();
- virtual void SetLinkColor(const SALOMEDS::Color& theColor) { myLinkColor = theColor;}
- virtual SALOMEDS::Color GetLinkColor() { return myLinkColor;}
+ virtual
+ VISU::VISUType
+ GetType()
+ {
+ return VISU::TMESH;
+ }
- virtual void SetPresentationType(VISU::PresentationType theType) { myPresentType = theType;}
- virtual PresentationType GetPresentationType() { return myPresentType;}
+ virtual
+ void
+ SetCellColor(const SALOMEDS::Color& theColor);
- typedef VISU::Mesh TInterface;
- VISU_MeshPL* GetMeshPL(){ return myMeshPL;}
+ virtual
+ SALOMEDS::Color
+ GetCellColor();
+
+ virtual
+ void
+ SetNodeColor(const SALOMEDS::Color& theColor);
+
+ virtual
+ SALOMEDS::Color
+ GetNodeColor();
+
+ virtual
+ void
+ SetLinkColor(const SALOMEDS::Color& theColor);
+
+ virtual
+ SALOMEDS::Color
+ GetLinkColor();
+
+ virtual
+ void
+ SetPresentationType(VISU::PresentationType theType);
+
+ virtual
+ void
+ SetQuadratic2DPresentationType(VISU::Quadratic2DPresentationType theType);
+
+ virtual
+ VISU::Quadratic2DPresentationType
+ GetQuadratic2DPresentationType();
+
+ virtual
+ VISU::PresentationType
+ GetPresentationType();
+
+
+ virtual void SetShrink(CORBA::Boolean toShrink);
+
+ virtual CORBA::Boolean IsShrank();
+
+ VISU_MeshPL* GetSpecificPL() const
+ {
+ return myMeshPL;
+ }
protected:
- Storable* Build(int theRestoring);
+ Storable*
+ Build(int theRestoring);
VISU_MeshPL* myMeshPL;
- string myMeshName;
- TEntity myEntity;
- string mySubMeshName;
+ int myEntity;//jfa IPAL9284: TEntity myEntity;
+ std::string mySubMeshName;
VISU::VISUType myType;
- VISU::PresentationType myPresentType;
- struct SALOMEDS::Color myCellColor, myNodeColor, myLinkColor;
+ VISU::PresentationType myPresentType;
+ VISU::Quadratic2DPresentationType my2DQuadPrsType;
+ SALOMEDS::Color myCellColor;
+ SALOMEDS::Color myNodeColor;
+ SALOMEDS::Color myLinkColor;
+ bool myIsShrank;
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 = "");
+ 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);
- static int IsPossible(Result_i* theResult, const char* theMeshName, const char* theGroupName);
- virtual Storable* Create(const char* theMeshName, const char* theGroupName);
-
- virtual void ToStream(std::ostringstream& theStr);
-
- virtual const char* GetComment() const;
- static const string myComment;
- virtual QString GenerateName();
+ virtual
+ VISU_Actor*
+ CreateActor();
- virtual Storable* Restore(const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
- static Storable* Restore(SALOMEDS::SObject_ptr theSObject,
- const string& thePrefix, const Storable::TRestoringMap& theMap)
- throw(std::logic_error&);
-
- virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL)
- throw (std::runtime_error&);
- virtual void UpdateActor(VISU_Actor* theActor);
+ virtual
+ void
+ UpdateActor(VISU_ActorBase* theActor);
};
}
#endif
-
-