Salome HOME
445f6d71e744ab0ed2fe832a0d29c66790715dcb
[modules/gui.git] / src / SVTK / SVTK_CubeAxesActor2D.h
1 //  SALOME OBJECT : kernel of SALOME component
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //
23 //
24 //  File   : SVTK_CubeAxesActor2D.h
25 //  Author : Eugeny Nikolaev
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef __SVTK_CubeAxesActor2D_h
30 #define __SVTK_CubeAxesActor2D_h
31
32 #include <vtkCubeAxesActor2D.h>
33 #include <vtkSmartPointer.h>
34
35 class vtkActor;
36 class vtkAxisActor2D;
37 class vtkCamera;
38 class vtkDataSet;
39 class vtkTextProperty;
40 class vtkPolyDataMapper;
41 class vtkRectilinearGridGeometryFilter;
42 class VTKViewer_Transform;
43
44 #include "SVTK.h"
45 #include "VTKViewer.h"
46
47 #ifdef WIN32
48 #pragma warning ( disable:4251 )
49 #endif
50
51 #ifndef WNT
52 class VTK_HYBRID_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
53 #else
54 class SVTK_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
55 #endif
56 {
57 public:
58   vtkTypeRevisionMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D);
59
60   // Description:
61   // Instantiate object with bold, italic, and shadow enabled; font family
62   // set to Arial; and label format "6.3g". The number of labels per axis
63   // is set to 3.
64   static SVTK_CubeAxesActor2D *New();
65   
66   // Description:
67   // Draw the axes as per the vtkProp superclass' API.
68   int RenderOverlay(vtkViewport*);
69   int RenderOpaqueGeometry(vtkViewport*);
70
71   // Description:
72   // Release any graphics resources that are being consumed by this actor.
73   // The parameter window could be used to determine which graphic
74   // resources to release.
75   void ReleaseGraphicsResources(vtkWindow *);
76
77   // Description:
78   
79   vtkActor* GetWireActorXY(){return this->wireActorXY;}
80   vtkActor* GetWireActorYZ(){return this->wireActorYZ;}
81   vtkActor* GetWireActorXZ(){return this->wireActorXZ;}
82
83   void SetTransform(VTKViewer_Transform* theTransform);
84   VTKViewer_Transform* GetTransform();
85   
86 protected:
87   SVTK_CubeAxesActor2D();
88   ~SVTK_CubeAxesActor2D();
89
90   vtkActor* wireActorXY;
91   vtkActor* wireActorYZ;
92   vtkActor* wireActorXZ;
93
94 private:
95   // hide the superclass' ShallowCopy() from the user and the compiler.
96   void ShallowCopy(vtkProp *prop) { this->vtkProp::ShallowCopy( prop ); };
97
98   vtkRectilinearGridGeometryFilter *planeXY; // rectilinear grid XY
99   vtkPolyDataMapper *rgridMapperXY;
100   
101   vtkRectilinearGridGeometryFilter *planeYZ; // rectilinear grid YZ
102   vtkPolyDataMapper *rgridMapperYZ;
103
104   vtkRectilinearGridGeometryFilter *planeXZ; // rectilinear grid XZ
105   vtkPolyDataMapper *rgridMapperXZ;
106   
107   vtkSmartPointer<VTKViewer_Transform> m_Transform;
108 private:
109   SVTK_CubeAxesActor2D(const SVTK_CubeAxesActor2D&);  // Not implemented.
110   void operator=(const SVTK_CubeAxesActor2D&);  // Not implemented.
111 };
112
113 #ifdef WIN32
114 #pragma warning ( default:4251 )
115 #endif
116
117 #endif