Salome HOME
Copyright update 2022
[modules/geom.git] / src / OBJECT / GEOM_VTKTrihedron.hxx
index 4250b3d707bbb2d79cc3d34b43c199daff7501fd..ca680f529f77ce06fc1df645b221ae2318c603c7 100644 (file)
@@ -1,56 +1,49 @@
-//  SALOME GEOM : 
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-//  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// 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, 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
+// 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.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
+//  SALOME GEOM : 
 //  File   : GEOM_VTKTrihedron.h
 //  Author : Sergey LITONIN
 //  Module : SALOME
-//  $Header: 
-
+//
 #ifndef GEOM_VTKTrihedron_H
 #define GEOM_VTKTrihedron_H
 
+#include "GEOM_OBJECT_defs.hxx"
+
 #include <Geom_Axis2Placement.hxx>
 #include "SALOME_Actor.h"
 #include "VTKViewer_Trihedron.h"
 
-#ifdef WNT
-#include <SALOME_WNT.hxx>
-#else
-#define SALOME_WNT_EXPORT
-#endif
-
-
-class vtkActorCollection;
 class vtkRenderer;
 class vtkPolyDataMapper;
 
 /*
   Class       : GEOM_VTKTrihedron
   Description : Class for displaying trihedron of local CS in VTK viewer.
-                Placement of trihedron is chahged with SetPlacement() method
+                Placement of trihedron is changed with SetPlacement() method
 */
 
-class SALOME_WNT_EXPORT GEOM_VTKTrihedron : public SALOME_Actor
+class GEOM_OBJECT_EXPORT GEOM_VTKTrihedron : public SALOME_Actor
 {
 
 protected:
@@ -59,11 +52,12 @@ protected:
   virtual                           ~GEOM_VTKTrihedron();
 
 public:
-                                    vtkTypeMacro( GEOM_VTKTrihedron, SALOME_Actor );
+                                    vtkTypeMacro( GEOM_VTKTrihedron, SALOME_Actor )
   static GEOM_VTKTrihedron*         New();
 
-  virtual vtkFloatingPointType      GetSize() { return mySize;}
+  virtual double      GetSize() { return mySize;}
 
+  virtual void                      SetVisibility( int theVisibility );
   virtual void                      SetVisibility( VTKViewer_Trihedron::TVisibility theVis );
   virtual void                      VisibilityOff() { SetVisibility( VTKViewer_Trihedron::eOff ); }
   virtual void                      VisibilityOn() { SetVisibility( VTKViewer_Trihedron::eOn ); }
@@ -80,21 +74,33 @@ public:
   virtual void                      Render(vtkRenderer *, vtkMapper *);
   virtual bool                      IsSetCamera() const;
   virtual bool                      IsResizable() const;
-  virtual void                      SetSize( vtkFloatingPointType );
+  virtual void                      SetSize( double );
   virtual void                      SetCamera( vtkCamera* );
 
-  void                              SetColor( vtkFloatingPointType r, vtkFloatingPointType g, vtkFloatingPointType b );
-  void                              GetColor( vtkFloatingPointType& r, vtkFloatingPointType& g, vtkFloatingPointType& b );
+  void                              SetColor( double r, double g, double b );
+  void                              GetColor( double& r, double& g, double& b );
+
+  virtual bool                      hasHighlight() { return true; } 
 
-  virtual bool                      hasHighlight() { return false; } 
+  virtual void                      Highlight( bool theHighlight );
+  virtual bool                      PreHighlight( vtkInteractorStyle* theInteractorStyle,
+                                                  SVTK_SelectionEvent* theSelectionEvent,
+                                                  bool theIsHighlight );
+
+protected:
+  virtual void                      ResetAxesColors();
+  virtual void                      SetAxesColors( double theColor[3], bool theIsDiffuse = false );
 
 protected:
   VTKViewer_Axis*                   myAxis[3];
   vtkPolyDataMapper*                myMapper;
-  vtkFloatingPointType              mySize;
+  double              mySize;
   gp_Pnt                            myLocation;
   gp_Dir                            myDirX, myDirY, myDirZ;
-  vtkFloatingPointType              myColor[ 3 ];
+  double              myColor[ 3 ];
+  double              myDefaultColor[ 3 ];
+  double              myPreHighlightColor[ 3 ];
+  double              myHighlightColor[ 3 ];
 };
 
 #endif