Salome HOME
Merge branch 'master' of ssh://git.salome-platform.org/modules/hydro
[modules/hydro.git] / src / HYDROGUI / GEOM_Actor_patched.h
index efa756d83be684ae522587ecdd708ec2497d35ac..7834ad6151e0e2b532a8f869fa579dfe3127841b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015  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
@@ -6,7 +6,7 @@
 // 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -51,6 +51,7 @@ class GEOM_ShadingFace;
 typedef GEOM_SmartPtr<GEOM_ShadingFace> PSFaceSource;
 
 class vtkRenderer;
+class vtkTextActor;
 
 class vtkAppendPolyData;
 typedef GEOM_SmartPtr<vtkAppendPolyData> PAppendFilter;
@@ -62,11 +63,11 @@ public:
   static GEOM_Actor* New();
 
   void SetShape(const TopoDS_Shape& theShape,
-                float theDeflection,
+                double theDeflection,
                 bool theIsVector = false);
 
-  void SetDeflection(float theDeflection);
-  float GetDeflection() const{ return myDeflection;}
+  void SetDeflection(double theDeflection);
+  double GetDeflection() const{ return myDeflection;}
 
   void AddToRender(vtkRenderer* theRenderer);
   void RemoveFromRender(vtkRenderer* theRenderer);
@@ -89,10 +90,10 @@ public:
   vtkProperty* GetShadingProperty();
   vtkProperty* GetIsolatedEdgeProperty();
   vtkProperty* GetVertexProperty();
+  vtkProperty* GetStandaloneVertexProperty();
   vtkProperty* GetSharedEdgeProperty();
   vtkProperty* GetFaceEdgeProperty();
 
-  void setDeflection(double adef);
   virtual void setDisplayMode(int thenewmode);
 
   // Description:
@@ -107,7 +108,6 @@ public:
   const TopoDS_Shape& getTopo();
   void setInputShape(const TopoDS_Shape& ashape, double adef1,
                      int imode, bool isVector = false);
-  double getDeflection();
   double isVector();
 
   // SubShape
@@ -201,40 +201,54 @@ public:
   virtual
   bool
   GetVectorMode();
-  
-  void
-  StoreIsoNumbers();
 
+  //! Vertices mode management
+  virtual
   void
-  RestoreIsoNumbers();
-  
+  SetVerticesMode(const bool theMode);
+
+  virtual
+  bool
+  GetVerticesMode();
+
+  //! Name mode management
+  virtual
   void
-  ResetIsoNumbers();
+  SetNameMode(const bool theMode);
+
+  virtual
+  bool
+  GetNameMode();
 
 protected:
   void SetModified();
 
   void GetMatrix(vtkCamera* theCam, vtkMatrix4x4 *result);
+  void SetShapeName(const TopoDS_Shape& theShape);
 
   GEOM_Actor();
   ~GEOM_Actor();
 
 private:
   TopoDS_Shape myShape;
-  int myNbIsos[2];
   bool isOnlyVertex;
 
-  float myDeflection;
+  double myDeflection;
   bool myIsForced;
 
   //  EDisplayMode myDisplayMode;
   bool myIsSelected;
   bool myVectorMode;
+  bool myVerticesMode;
+  bool myNameMode;
 
-protected:
+public:
   PDeviceActor myVertexActor;
   PVertexSource myVertexSource;
 
+  PDeviceActor myStandaloneVertexActor;
+  PVertexSource myStandaloneVertexSource;
+
   PDeviceActor myIsolatedEdgeActor;
   PEdgeSource myIsolatedEdgeSource;
 
@@ -252,15 +266,14 @@ protected:
 
   PDeviceActor myHighlightActor;
 
-private:
+  vtkTextActor* myTextActor;
+
   vtkSmartPointer<vtkProperty>  myHighlightProp;
   vtkSmartPointer<vtkProperty>  myPreHighlightProp;
   vtkSmartPointer<vtkProperty>  myShadingFaceProp;
   vtkSmartPointer<vtkProperty>  myShadingBackFaceProp;
 
   PAppendFilter myAppendFilter;
-
-protected:
   PPolyGeomPainterDataMapper myPolyDataMapper;
 
 private:
@@ -269,6 +282,7 @@ private:
   GEOM_Actor(const GEOM_Actor&);
   void operator=(const GEOM_Actor&);
 
+public:
   double myEdgesInWireframeColor[3];
   double myEdgesInShadingColor[3];
   double myIsolatedEdgeColor[3];