X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FOBJECT%2FGEOM_Actor.h;h=0daf5306870066eda387cdcb9100550db82660bd;hb=09ece3edc1896e16a412b35810d76411f06d68ec;hp=117f1afcb378cfc7424a9a3c8bc935d2f2fcfed1;hpb=6f000dfe28cad33bcf7053913e1a2f24b3fa3e33;p=modules%2Fgeom.git diff --git a/src/OBJECT/GEOM_Actor.h b/src/OBJECT/GEOM_Actor.h index 117f1afcb..0daf53068 100644 --- a/src/OBJECT/GEOM_Actor.h +++ b/src/OBJECT/GEOM_Actor.h @@ -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 PSFaceSource; class vtkRenderer; +class vtkTextActor; class vtkAppendPolyData; typedef GEOM_SmartPtr PAppendFilter; @@ -58,15 +59,15 @@ typedef GEOM_SmartPtr 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); @@ -93,7 +94,6 @@ public: vtkProperty* GetSharedEdgeProperty(); vtkProperty* GetFaceEdgeProperty(); - void setDeflection(double adef); virtual void setDisplayMode(int thenewmode); // Description: @@ -108,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 @@ -140,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 @@ -212,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(); @@ -224,13 +240,14 @@ 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; @@ -254,6 +271,9 @@ private: PSFaceSource myShadingFaceSource; PDeviceActor myHighlightActor; + + vtkTextActor* myTextActor; + vtkSmartPointer myHighlightProp; vtkSmartPointer myPreHighlightProp; vtkSmartPointer myShadingFaceProp;