OTB  7.2.0
Orfeo Toolbox
otbGlActor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otb_GlActor_h
22 #define otb_GlActor_h
23 
24 #include <itkObject.h>
25 
26 #include "otbViewSettings.h"
27 #include "otbShader.h"
28 #include "OTBIceExport.h"
29 #include <string>
30 
31 namespace otb
32 {
33 
34 class OTBIce_EXPORT GlActor
35  : public itk::Object
36 {
37 public:
38  typedef GlActor Self;
39  typedef itk::Object Superclass;
40  typedef itk::SmartPointer<Self> Pointer;
41  typedef itk::SmartPointer<const Self> ConstPointer;
42 
43  itkSetObjectMacro(Settings,ViewSettings);
44  itkGetObjectMacro(Settings,ViewSettings);
45  itkGetConstObjectMacro(Settings,ViewSettings);
46 
47  itkSetMacro(Visible,bool);
48  itkGetMacro(Visible,bool);
49  itkBooleanMacro(Visible);
50 
51  itkSetStringMacro(Name);
52  itkGetStringMacro(Name);
53 
54  itkSetMacro( GeometryChanged, bool );
55  itkGetMacro( GeometryChanged, bool );
56  itkBooleanMacro( GeometryChanged );
57 
58  itkSetMacro( Overlay, bool );
59  itkGetMacro( Overlay, bool );
60  itkBooleanMacro( Overlay );
61 
62  itkGetObjectMacro( Shader, Shader );
63  itkSetObjectMacro( Shader, Shader );
64 
65  // Retrieve the full extent of the actor
66  virtual void GetExtent(double & ulx, double & uly, double & lrx, double & lry) const = 0;
67 
68  // Update internal actor state with respect to ViewSettings
69  virtual void ProcessViewSettings() = 0;
70 
71  // Heavy load/unload operations of data
72  virtual void UpdateData() = 0;
73 
74  // Gl rendering of current state
75  virtual void Render() = 0;
76 
78  virtual void CreateShader();
79 
80 protected:
81  GlActor();
82 
83  ~GlActor() override;
84 
86 
87 private:
88  // prevent implementation
89  GlActor( const Self & ) = delete;
90  void operator=( const Self & ) = delete;
91 
93 
94  // Name field
95  std::string m_Name;
96 
97  // Visibility flag
98  bool m_Visible: 1;
99 
103 
106  bool m_Overlay: 1;
107 
108 }; // End class GlActor
109 
110 } // End namespace otb
111 
112 #endif
bool m_Visible
Definition: otbGlActor.h:98
Shader::Pointer m_Shader
Definition: otbGlActor.h:85
bool m_GeometryChanged
Definition: otbGlActor.h:102
itk::SmartPointer< Self > Pointer
itk::SmartPointer< Self > Pointer
Definition: otbGlActor.h:40
bool m_Overlay
Definition: otbGlActor.h:106
GlActor Self
Definition: otbGlActor.h:38
itk::SmartPointer< Self > Pointer
Definition: otbShader.h:41
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
std::string m_Name
Definition: otbGlActor.h:95
ViewSettings::Pointer m_Settings
Definition: otbGlActor.h:92
itk::SmartPointer< const Self > ConstPointer
Definition: otbGlActor.h:41
itk::Object Superclass
Definition: otbGlActor.h:39