Salome HOME
Merge with branch V2_2_0_VISU_improvement
[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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
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 class VTK_HYBRID_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
45 {
46 public:
47   vtkTypeRevisionMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D);
48
49   // Description:
50   // Instantiate object with bold, italic, and shadow enabled; font family
51   // set to Arial; and label format "6.3g". The number of labels per axis
52   // is set to 3.
53   static SVTK_CubeAxesActor2D *New();
54   
55   // Description:
56   // Draw the axes as per the vtkProp superclass' API.
57   int RenderOverlay(vtkViewport*);
58   int RenderOpaqueGeometry(vtkViewport*);
59
60   // Description:
61   // Release any graphics resources that are being consumed by this actor.
62   // The parameter window could be used to determine which graphic
63   // resources to release.
64   void ReleaseGraphicsResources(vtkWindow *);
65
66   // Description:
67   
68   vtkActor* GetWireActorXY(){return this->wireActorXY;}
69   vtkActor* GetWireActorYZ(){return this->wireActorYZ;}
70   vtkActor* GetWireActorXZ(){return this->wireActorXZ;}
71
72   void SetTransform(VTKViewer_Transform* theTransform);
73   VTKViewer_Transform* GetTransform();
74   
75 protected:
76   SVTK_CubeAxesActor2D();
77   ~SVTK_CubeAxesActor2D();
78
79   vtkActor* wireActorXY;
80   vtkActor* wireActorYZ;
81   vtkActor* wireActorXZ;
82
83 private:
84   // hide the superclass' ShallowCopy() from the user and the compiler.
85   void ShallowCopy(vtkProp *prop) { this->vtkProp::ShallowCopy( prop ); };
86
87   vtkRectilinearGridGeometryFilter *planeXY; // rectilinear grid XY
88   vtkPolyDataMapper *rgridMapperXY;
89   
90   vtkRectilinearGridGeometryFilter *planeYZ; // rectilinear grid YZ
91   vtkPolyDataMapper *rgridMapperYZ;
92
93   vtkRectilinearGridGeometryFilter *planeXZ; // rectilinear grid XZ
94   vtkPolyDataMapper *rgridMapperXZ;
95   
96   vtkSmartPointer<VTKViewer_Transform> m_Transform;
97 private:
98   SVTK_CubeAxesActor2D(const SVTK_CubeAxesActor2D&);  // Not implemented.
99   void operator=(const SVTK_CubeAxesActor2D&);  // Not implemented.
100 };
101
102 #endif