Salome HOME
Update from BR_V5_DEV 13Feb2009
[modules/gui.git] / src / SVTK / SVTK_CubeAxesActor2D.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  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 //  SALOME OBJECT : kernel of SALOME component
23 //  File   : SVTK_CubeAxesActor2D.h
24 //  Author : Eugeny Nikolaev
25 //  Module : SALOME
26 //  $Header$
27 //
28 #ifndef __SVTK_CubeAxesActor2D_h
29 #define __SVTK_CubeAxesActor2D_h
30
31 #include <vtkCubeAxesActor2D.h>
32 #include <vtkSmartPointer.h>
33
34 class vtkActor;
35 class vtkAxisActor2D;
36 class vtkCamera;
37 class vtkDataSet;
38 class vtkTextProperty;
39 class vtkPolyDataMapper;
40 class vtkRectilinearGridGeometryFilter;
41 class VTKViewer_Transform;
42
43 #include "SVTK.h"
44 #include "VTKViewer.h"
45
46 #ifdef WIN32
47 #pragma warning ( disable:4251 )
48 #endif
49
50 #ifndef WIN32
51 class VTK_HYBRID_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
52 #else
53 class SVTK_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
54 #endif
55 {
56 public:
57   vtkTypeRevisionMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D);
58
59   // Description:
60   // Instantiate object with bold, italic, and shadow enabled; font family
61   // set to Arial; and label format "6.3g". The number of labels per axis
62   // is set to 3.
63   static SVTK_CubeAxesActor2D *New();
64   
65   // Description:
66   // Draw the axes as per the vtkProp superclass' API.
67   int RenderOverlay(vtkViewport*);
68   int RenderOpaqueGeometry(vtkViewport*);
69
70   // Description:
71   // Release any graphics resources that are being consumed by this actor.
72   // The parameter window could be used to determine which graphic
73   // resources to release.
74   void ReleaseGraphicsResources(vtkWindow *);
75
76   // Description:
77   
78   vtkActor* GetWireActorXY(){return this->wireActorXY;}
79   vtkActor* GetWireActorYZ(){return this->wireActorYZ;}
80   vtkActor* GetWireActorXZ(){return this->wireActorXZ;}
81
82   void SetTransform(VTKViewer_Transform* theTransform);
83   VTKViewer_Transform* GetTransform();
84   
85 protected:
86   SVTK_CubeAxesActor2D();
87   ~SVTK_CubeAxesActor2D();
88
89   vtkActor* wireActorXY;
90   vtkActor* wireActorYZ;
91   vtkActor* wireActorXZ;
92
93 private:
94   // hide the superclass' ShallowCopy() from the user and the compiler.
95   void ShallowCopy(vtkProp *prop) { this->vtkProp::ShallowCopy( prop ); };
96
97   vtkRectilinearGridGeometryFilter *planeXY; // rectilinear grid XY
98   vtkPolyDataMapper *rgridMapperXY;
99   
100   vtkRectilinearGridGeometryFilter *planeYZ; // rectilinear grid YZ
101   vtkPolyDataMapper *rgridMapperYZ;
102
103   vtkRectilinearGridGeometryFilter *planeXZ; // rectilinear grid XZ
104   vtkPolyDataMapper *rgridMapperXZ;
105   
106   vtkSmartPointer<VTKViewer_Transform> m_Transform;
107 private:
108   SVTK_CubeAxesActor2D(const SVTK_CubeAxesActor2D&);  // Not implemented.
109   void operator=(const SVTK_CubeAxesActor2D&);  // Not implemented.
110 };
111
112 #ifdef WIN32
113 #pragma warning ( default:4251 )
114 #endif
115
116 #endif