Back to index

salome-gui  6.5.0
SVTK_CubeAxesActor2D.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 //  SALOME OBJECT : kernel of SALOME component
00024 //  File   : SVTK_CubeAxesActor2D.h
00025 //  Author : Eugeny Nikolaev
00026 
00027 #ifndef __SVTK_CubeAxesActor2D_h
00028 #define __SVTK_CubeAxesActor2D_h
00029 
00030 #include <vtkCubeAxesActor2D.h>
00031 #include <vtkSmartPointer.h>
00032 
00033 class vtkActor;
00034 class vtkAxisActor2D;
00035 class vtkCamera;
00036 class vtkDataSet;
00037 class vtkTextProperty;
00038 class vtkPolyDataMapper;
00039 class vtkRectilinearGridGeometryFilter;
00040 class VTKViewer_Transform;
00041 
00042 #include "SVTK.h"
00043 #include "VTKViewer.h"
00044 
00045 #ifdef WIN32
00046 #pragma warning ( disable:4251 )
00047 #endif
00048 
00049 #ifndef WIN32
00050 class VTK_HYBRID_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
00051 #else
00052 class SVTK_EXPORT SVTK_CubeAxesActor2D : public vtkCubeAxesActor2D
00053 #endif
00054 {
00055 public:
00056   vtkTypeRevisionMacro(SVTK_CubeAxesActor2D,vtkCubeAxesActor2D);
00057 
00058   // Description:
00059   // Instantiate object with bold, italic, and shadow enabled; font family
00060   // set to Arial; and label format "6.3g". The number of labels per axis
00061   // is set to 3.
00062   static SVTK_CubeAxesActor2D *New();
00063   
00064   // Description:
00065   // Draw the axes as per the vtkProp superclass' API.
00066   int RenderOverlay(vtkViewport*);
00067   int RenderOpaqueGeometry(vtkViewport*);
00068 
00069   // Description:
00070   // Release any graphics resources that are being consumed by this actor.
00071   // The parameter window could be used to determine which graphic
00072   // resources to release.
00073   void ReleaseGraphicsResources(vtkWindow *);
00074 
00075   // Description:
00076   
00077   vtkActor* GetWireActorXY(){return this->wireActorXY;}
00078   vtkActor* GetWireActorYZ(){return this->wireActorYZ;}
00079   vtkActor* GetWireActorXZ(){return this->wireActorXZ;}
00080 
00081   void SetTransform(VTKViewer_Transform* theTransform);
00082   VTKViewer_Transform* GetTransform();
00083   
00084 protected:
00085   SVTK_CubeAxesActor2D();
00086   ~SVTK_CubeAxesActor2D();
00087 
00088   vtkActor* wireActorXY;
00089   vtkActor* wireActorYZ;
00090   vtkActor* wireActorXZ;
00091 
00092 private:
00093   // hide the superclass' ShallowCopy() from the user and the compiler.
00094   void ShallowCopy(vtkProp *prop) { this->vtkProp::ShallowCopy( prop ); };
00095 
00096   vtkRectilinearGridGeometryFilter *planeXY; // rectilinear grid XY
00097   vtkPolyDataMapper *rgridMapperXY;
00098   
00099   vtkRectilinearGridGeometryFilter *planeYZ; // rectilinear grid YZ
00100   vtkPolyDataMapper *rgridMapperYZ;
00101 
00102   vtkRectilinearGridGeometryFilter *planeXZ; // rectilinear grid XZ
00103   vtkPolyDataMapper *rgridMapperXZ;
00104   
00105   vtkSmartPointer<VTKViewer_Transform> m_Transform;
00106 private:
00107   SVTK_CubeAxesActor2D(const SVTK_CubeAxesActor2D&);  // Not implemented.
00108   void operator=(const SVTK_CubeAxesActor2D&);  // Not implemented.
00109 };
00110 
00111 #ifdef WIN32
00112 #pragma warning ( default:4251 )
00113 #endif
00114 
00115 #endif