Salome HOME
updated copyright message
[modules/geom.git] / src / OBJECT / GEOM_Actor.h
index 173f40a0be9c6cbe636f0016840882b666aeecc5..0daf5306870066eda387cdcb9100550db82660bd 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -51,6 +51,7 @@ class GEOM_ShadingFace;
 typedef GEOM_SmartPtr<GEOM_ShadingFace> PSFaceSource;
 
 class vtkRenderer;
+class vtkTextActor;
 
 class vtkAppendPolyData;
 typedef GEOM_SmartPtr<vtkAppendPolyData> PAppendFilter;
@@ -58,15 +59,15 @@ typedef GEOM_SmartPtr<vtkAppendPolyData> PAppendFilter;
 class GEOM_OBJECT_EXPORT GEOM_Actor: public SALOME_Actor
 {
 public:
-  vtkTypeMacro(GEOM_Actor,SALOME_Actor);
+  vtkTypeMacro(GEOM_Actor,SALOME_Actor)
   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
@@ -139,6 +139,8 @@ public:
   void SetEdgesInShadingColor(double r, double g, double b);
   // Color of iso-lines
   void SetIsosColor(double r, double g, double b);
+  // Color of labels
+  void SetLabelColor(double r, double g, double b);
 
 
   // Material
@@ -211,10 +213,25 @@ public:
   bool
   GetVerticesMode();
 
+  //! Name mode management
+  virtual
+  void
+  SetNameMode(const bool theMode);
+
+  virtual
+  bool
+  GetNameMode();
+
+  virtual 
+  void 
+  SetTransform(VTKViewer_Transform* theTransform);
+
+
 protected:
   void SetModified();
 
   void GetMatrix(vtkCamera* theCam, vtkMatrix4x4 *result);
+  void SetShapeName();
 
   GEOM_Actor();
   ~GEOM_Actor();
@@ -223,17 +240,21 @@ private:
   TopoDS_Shape myShape;
   bool isOnlyVertex;
 
-  float myDeflection;
+  double myDeflection;
   bool myIsForced;
 
   //  EDisplayMode myDisplayMode;
   bool myIsSelected;
   bool myVectorMode;
   bool myVerticesMode;
+  bool myNameMode;
 
   PDeviceActor myVertexActor;
   PVertexSource myVertexSource;
 
+  PDeviceActor myStandaloneVertexActor;
+  PVertexSource myStandaloneVertexSource;
+
   PDeviceActor myIsolatedEdgeActor;
   PEdgeSource myIsolatedEdgeSource;
 
@@ -250,6 +271,9 @@ private:
   PSFaceSource myShadingFaceSource;
 
   PDeviceActor myHighlightActor;
+
+  vtkTextActor* myTextActor;
+
   vtkSmartPointer<vtkProperty>  myHighlightProp;
   vtkSmartPointer<vtkProperty>  myPreHighlightProp;
   vtkSmartPointer<vtkProperty>  myShadingFaceProp;