Salome HOME
b17028a347105648b6d6cfcc73828f7977acaa0b
[modules/gui.git] / src / VTKViewer / VTKViewer_Texture.h
1 // Copyright (C) 2007-2011  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
23 //  SALOME VTKViewer : build VTK viewer into Salome desktop
24 //  File   :
25 //  Author :
26 //  Module :
27 //  $Header$
28 //
29
30 #ifndef VTKVIEWER_TEXTURE_H
31 #define VTKVIEWER_TEXTURE_H
32
33 #include "VTKViewer.h"
34 #include <vtkOpenGLTexture.h>
35
36 #ifdef WIN32
37 #pragma warning ( disable:4251 )
38 #endif
39
40 class vtkRenderer;
41
42 class VTKVIEWER_EXPORT VTKViewer_Texture : public vtkOpenGLTexture
43 {
44 public:
45   enum { Stretched = 0, Centered, Tiled };
46
47 public:
48   static VTKViewer_Texture *New();
49   vtkTypeMacro(VTKViewer_Texture,vtkOpenGLTexture);
50
51   virtual void Load(vtkRenderer *ren);
52
53   int GetWidth() const;
54   int GetHeight() const;
55
56   void SetPosition(int type);
57   int GetPosition() const;
58
59 protected:
60   VTKViewer_Texture();
61   ~VTKViewer_Texture();
62
63   int myWidth;
64   int myHeight;
65   int myPosition;
66
67 private:
68   virtual void Initialize(vtkRenderer * ren);
69 };
70
71 #endif