Main MRPT website > C++ reference for MRPT 1.5.7
COpenGLViewport.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 #ifndef opengl_COpenGLViewport_H
10 #define opengl_COpenGLViewport_H
11 
14 #include <mrpt/utils/CImage.h>
15 #include <mrpt/opengl/CCamera.h>
17 #include <mrpt/opengl/CLight.h>
19 #include <mrpt/utils/CObservable.h>
20 #include <mrpt/utils/CStringList.h>
21 #include <mrpt/utils/mrptEvent.h>
22 
23 namespace mrpt
24 {
25  namespace utils { class CImage; }
26 
27  namespace opengl
28  {
29  class COpenGLScene;
30  class CRenderizable;
31 
32  // This must be added to any CSerializable derived class:
34 
35  /** A viewport within a COpenGLScene, containing a set of OpenGL objects to render.
36  * This class has protected constuctor, thus it cannot be created by users. Use COpenGLScene::createViewport instead.
37  * A viewport has these "operation modes":
38  * - Normal (default): It renders the contained objects.
39  * - Cloned: It clones the objects from another viewport. See \a setCloneView()
40  * - Image mode: It renders an image (e.g. from a video stream) efficiently using a textued quad. See \a setImageView().
41  *
42  * In any case, the viewport can be resized to only fit a part of the entire parent viewport.
43  * There will be always at least one viewport in a COpenGLScene named "main".
44  *
45  * This class can be observed (see mrpt::utils::CObserver) for the following events (see mrpt::utils::mrptEvent):
46  * - mrpt::opengl::mrptEventGLPreRender
47  * - mrpt::opengl::mrptEventGLPostRender
48  *
49  * Two directional light sources at infinity are created by default, with directions (-1,-1,-1) and (1,2,1), respectively.
50  * All OpenGL properties of light sources are accesible via the methods: setNumberOfLights(), lightsClearAll(), addLight(), and getLight().
51  * Please, refer to mrpt::opengl::CLight and the standard OpenGL documentation for the meaning of all light properties.
52  *
53  * Refer to mrpt::opengl::COpenGLScene for further details.
54  * \ingroup mrpt_opengl_grp
55  */
57  public mrpt::utils::CSerializable,
58  public mrpt::utils::CObservable
59  {
61  friend class COpenGLScene;
62  public:
63  // -------------------------------------------------------------------
64  /** @name Set the viewport "modes"
65  @{ */
66 
67  /** Set this viewport as a clone of some other viewport, given its name - as a side effect, current list of internal OpenGL objects is cleared.
68  * By default, only the objects are cloned, not the camera. See
69  * \sa resetCloneView
70  */
71  void setCloneView( const std::string &clonedViewport );
72 
73  /** Set this viewport into "image view"-mode, where an image is efficiently drawn (fitting the viewport area) using an OpenGL textured quad.
74  * Call this method with the new image to update the displayed image (but recall to first lock the parent openglscene's critical section, then do the update, then release the lock, and then issue a window repaint).
75  * Internally, the texture is drawn using a mrpt::opengl::CTexturedPlane
76  * The viewport can be reverted to behave like a normal viewport by calling setNormalMode()
77  * \sa setImageView_fast
78  */
79  void setImageView(const mrpt::utils::CImage &img);
80 
81  /** Just like \a setImageView but moves the internal image memory instead of making a copy, so it's faster but empties the input image.
82  * \sa setImageView
83  */
84  void setImageView_fast(mrpt::utils::CImage &img);
85 
86  /** Reset the viewport to normal mode: rendering its own objects.
87  * \sa setCloneView, setNormalMode
88  */
89  inline void resetCloneView() { setNormalMode(); }
90 
91  /** If set to true, and setCloneView() has been called, this viewport will be rendered using the camera of the cloned viewport.
92  */
93  inline void setCloneCamera(bool enable) { m_isClonedCamera = enable; }
94 
95  /** Resets the viewport to a normal 3D viewport \sa setCloneView, setImageView */
96  void setNormalMode();
97 
98  /** @} */ // end of Set the "viewport mode"
99  // ------------------------------------------------------
100 
101 
102  /** @name OpenGL global settings that affect rendering all objects in the scene/viewport
103  @{ */
104 
105  /** Sets glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST) is enabled, or GL_FASTEST otherwise. */
106  void enablePolygonNicest(bool enable=true) { m_OpenGL_enablePolygonNicest=enable; }
107  bool isPolygonNicestEnabled() const { return m_OpenGL_enablePolygonNicest; }
108 
109  /** Removes all lights (and disables the global "GL_LIGHTING") */
110  void lightsClearAll() { m_lights.clear(); }
111 
112  /** Append a new light to the scene. By default there are two lights. "GL_LIGHTING" is disabled if all lights are removed */
113  void addLight(const CLight &l) { m_lights.push_back(l); }
114 
115  /** Allocates a number of lights, which must be correctly defined via getLight(i), etc. */
116  void setNumberOfLights(const size_t N) { m_lights.resize(N); }
117 
118  CLight & getLight(const size_t i) { ASSERT_BELOW_(i,m_lights.size()) return m_lights[i]; }
119  const CLight & getLight(const size_t i) const { ASSERT_BELOW_(i,m_lights.size()) return m_lights[i]; }
120 
121  /** @} */ // end of OpenGL settings
122 
123  // -------------------------------------------------------------------
124  /** @name Change or read viewport properties (except "viewport modes")
125  @{ */
126 
127  /** Returns the name of the viewport */
128  inline std::string getName() { return m_name; }
129 
130  /** Change the viewport position and dimension on the rendering window.
131  * X & Y coordinates here can have two interpretations:
132  * - If in the range [0,1], they are factors with respect to the actual window sizes (i.e. width=1 means the entire width of the rendering window).
133  * - If >1, they are interpreted as pixels.
134  *
135  * width & height can be interpreted as:
136  * - If >1, they are the size of the viewport in that dimension, in pixels.
137  * - If in [0,1], they are the size of the viewport in that dimension, in a factor of the width/height.
138  * - If in [-1,0[, the size is computed such as the right/top border ends up in the given coordinate, interpreted as a factor (e.g. -1: up to the end of the viewport, -0.5: up to the middle of it).
139  * - If <-1 the size is computed such as the right/top border ends up in the given absolute coordinate (e.g. -200: up to the row/column 200px).
140  *
141  * \note (x,y) specify the lower left corner of the viewport rectangle.
142  * \sa getViewportPosition
143  */
144  void setViewportPosition(
145  const double x,
146  const double y,
147  const double width,
148  const double height );
149 
150  /** Get the current viewport position and dimension on the rendering window.
151  * X & Y coordinates here can have two interpretations:
152  * - If in the range [0,1], they are factors with respect to the actual window sizes (i.e. width=1 means the entire width of the rendering window).
153  * - If >1, they are interpreted as pixels.
154  * \note (x,y) specify the lower left corner of the viewport rectangle.
155  * \sa setViewportPosition
156  */
157  void getViewportPosition(
158  double &x,
159  double &y,
160  double &width,
161  double &height );
162 
163  /** Set the min/max clip depth distances of the rendering frustum (default: 0.1 - 10000)
164  * \sa getViewportClipDistances
165  */
166  void setViewportClipDistances(const double clip_min, const double clip_max);
167 
168  /** Get the current min/max clip depth distances of the rendering frustum (default: 0.1 - 10000)
169  * \sa setViewportClipDistances
170  */
171  void getViewportClipDistances(double &clip_min, double &clip_max) const;
172 
173  /** Set the border size ("frame") of the viewport (default=0).
174  */
175  inline void setBorderSize( unsigned int lineWidth ) { m_borderWidth = lineWidth; }
176 
177  /** Return whether the viewport will be rendered transparent over previous viewports.
178  */
179  inline bool isTransparent() { return m_isTransparent; }
180 
181  /** Set the transparency, that is, whether the viewport will be rendered transparent over previous viewports (default=false).
182  */
183  inline void setTransparent( bool trans ) { m_isTransparent=trans; }
184 
185  /** Set a background color different from that of the parent GUI window */
186  inline void setCustomBackgroundColor( const mrpt::utils::TColorf &color ) { m_custom_backgb_color = true; m_background_color = color; }
187 
188  inline mrpt::utils::TColorf getCustomBackgroundColor() const { return m_background_color; }
189 
190  /** Compute the 3D ray corresponding to a given pixel; this can be used to allow the user to pick and select 3D objects by clicking onto the 2D image.
191  * \param x_coord Horizontal coordinate with the usual meaning (0:left of the viewport, W-1: right border).
192  * \param y_coord Horizontal coordinate with the usual meaning (0:top of the viewport, H-1: right border).
193  * \param out_cameraPose If not NULL, will have the camera 3D pose as a mrpt::poses::CPose3D. See also
194  * \note (x,y) refer to VIEWPORT coordinates. Take into account this when viewports do not extend to the whole window size.
195  * \note x and y are double instead of integers to allow sub-pixel precision.
196  * \sa getCurrentCameraPose
197  */
198  void get3DRayForPixelCoord( const double x_coord, const double y_coord, mrpt::math::TLine3D &out_ray, mrpt::poses::CPose3D *out_cameraPose=NULL ) const;
199 
200  /** @} */ // end of Change or read viewport properties
201  // ------------------------------------------------------
202 
203 
204  // -------------------------------------------------------------------
205  /** @name Contained objects set/get/search
206  @{ */
207 
210 
211  inline const_iterator begin() const { return m_objects.begin(); }
212  inline const_iterator end() const { return m_objects.end(); }
213  inline iterator begin() { return m_objects.begin(); }
214  inline iterator end() { return m_objects.end(); }
215 
216  /** Delete all internal obejcts
217  * \sa insert */
218  void clear();
219 
220  /** Insert a new object into the list.
221  * The object MUST NOT be deleted, it will be deleted automatically by this object when not required anymore.
222  */
223  void insert( const CRenderizablePtr &newObject );
224 
225  /** Compute the current 3D camera pose.
226  * \sa get3DRayForPixelCoord
227  */
228  void getCurrentCameraPose( mrpt::poses::CPose3D &out_cameraPose ) const;
229 
230  /** Returns the first object with a given name, or NULL if not found.
231  */
232  CRenderizablePtr getByName( const std::string &str );
233 
234  /** Returns the i'th object of a given class (or of a descendant class), or NULL (an empty smart pointer) if not found.
235  * Example:
236  * \code
237  CSpherePtr obs = view.getByClass<CSphere>();
238  * \endcode
239  * By default (ith=0), the first observation is returned.
240  */
241  template <typename T>
242  typename T::Ptr getByClass( const size_t &ith = 0 ) const
243  {
244  MRPT_START
245  size_t foundCount = 0;
246  const mrpt::utils::TRuntimeClassId* class_ID = T::classinfo;
247  for (CListOpenGLObjects::const_iterator it = m_objects.begin();it!=m_objects.end();++it)
248  if ( (*it).present() && (*it)->GetRuntimeClass()->derivedFrom( class_ID ) )
249  if (foundCount++ == ith)
250  return typename T::Ptr(*it);
251 
252  // If not found directly, search recursively:
253  for (CListOpenGLObjects::const_iterator it=m_objects.begin();it!=m_objects.end();++it)
254  {
255  if ( (*it).present() && (*it)->GetRuntimeClass() == CLASS_ID_NAMESPACE(CSetOfObjects,mrpt::opengl))
256  {
257  typename T::Ptr o = CSetOfObjectsPtr(*it)->getByClass<T>(ith);
258  if (o.present()) return o;
259  }
260  }
261  return typename T::Ptr(); // Not found: return empty smart pointer
262  MRPT_END
263  }
264 
265  /** Removes the given object from the scene (it also deletes the object to free its memory).
266  */
267  void removeObject( const CRenderizablePtr & obj );
268 
269  /** Number of objects contained. */
270  inline size_t size() const { return m_objects.size(); }
271 
272  inline bool empty() const { return m_objects.empty(); }
273 
274  opengl::CCamera& getCamera() { return m_camera;} //!< Get a reference to the camera associated with this viewport.
275 
276  const opengl::CCamera & getCamera() const { return m_camera;} //!< Get a reference to the camera associated with this viewport.
277 
278  /** Evaluates the bounding box of this object (including possible children) in the coordinate frame of the object parent. */
279  void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const;
280 
281  /** @} */ // end of Contained objects set/get/search
282  // ------------------------------------------------------
283 
284 
285  virtual ~COpenGLViewport(); //!< Destructor: clears all objects.
286 
287 
288  protected:
289  /** Constructor, invoked from COpenGLScene only.
290  */
291  COpenGLViewport( COpenGLScene *parent=NULL, const std::string &name=std::string("") );
292 
293  /** Initializes all textures in the scene (See opengl::CTexturedPlane::loadTextureInOpenGL)
294  */
295  void initializeAllTextures();
296 
297  /** Retrieves a list of all objects in text form.
298  */
299  void dumpListOfObjects( mrpt::utils::CStringList &lst );
300 
301  /** Render the objects in this viewport (called from COpenGLScene only) */
302  void render( const int render_width, const int render_height ) const;
303 
304  /** The camera associated to the viewport */
306  utils::safe_ptr<COpenGLScene> m_parent; //!< The scene that contains this viewport.
307  bool m_isCloned; //!< Set by setCloneView
308  bool m_isClonedCamera; //!< Set by setCloneCamera
309  std::string m_clonedViewport; //!< Only if m_isCloned=true
310  std::string m_name; //!< The viewport's name
311  bool m_isTransparent; //!< Whether to clear color buffer.
312  uint32_t m_borderWidth; //!< Default=0, the border around the viewport.
313  double m_view_x, m_view_y,m_view_width,m_view_height; //!< The viewport position [0,1]
314  double m_clip_min,m_clip_max; //!< The min/max clip depth distances (default: 0.1 - 10000)
316  mrpt::utils::TColorf m_background_color; //!< used only if m_custom_backgb_color
317  bool m_isImageView; //!< Set by setImageView
318  //CRenderizablePtr m_imageview_quad ; //!< A mrpt::opengl::CTexturedPlane used after setImageView() is called
319  mrpt::utils::CImagePtr m_imageview_img; //!< The image to display, after calling \a setImageView()
320 
322  {
323  TLastProjectiveMatrixInfo() : eye(0,0,0),pointing(0,0,0),up(0,0,0), viewport_width(640), viewport_height(480), FOV(30), azimuth(0), elev(0), zoom(1),is_projective(true)
324  {}
325  mrpt::math::TPoint3D eye; //!< The camera is here.
326  mrpt::math::TPoint3D pointing; //!< The camera points to here
327  mrpt::math::TPoint3D up; //!< Up vector of the camera.
328  size_t viewport_width, viewport_height; //!< In pixels. This may be smaller than the total render window.
329  float FOV; //!< FOV in degrees.
330  float azimuth, elev; //!< Camera elev & azimuth, in radians.
331  float zoom;
332  bool is_projective; // true: projective, false: ortho
333  };
334  mutable TLastProjectiveMatrixInfo m_lastProjMat; //!< Info updated with each "render()" and used in "get3DRayForPixelCoord"
335 
336  /** The list of objects that comprise the 3D scene.
337  * Objects are automatically deleted when calling "clear" or in the destructor.
338  */
340 
341  void internal_setImageView_fast(const mrpt::utils::CImage &img, bool is_fast);
342 
343  // OpenGL global settings:
345 
346  std::vector<CLight> m_lights;
347  };
349  /**
350  * Inserts an openGL object into a viewport. Allows call chaining.
351  * \sa mrpt::opengl::COpenGLViewport::insert
352  */
353  inline COpenGLViewportPtr &operator<<(COpenGLViewportPtr &s,const CRenderizablePtr &r) {
354  s->insert(r);
355  return s;
356  }
357  /**
358  * Inserts any iterable set of openGL objects into a viewport. Allows call chaining.
359  * \sa mrpt::opengl::COpenGLViewport::insert
360  */
361  inline COpenGLViewportPtr &operator<<(COpenGLViewportPtr &s,const std::vector<CRenderizablePtr> &v) {
362  for (std::vector<CRenderizablePtr>::const_iterator it=v.begin();it!=v.end();++it) s->insert(*it);
363  return s;
364  }
365 
366 
367 
368  /** @name Events emitted by COpenGLViewport
369  @{ */
370 
371  /** An event sent by an mrpt::opengl::COpenGLViewport just after clearing the viewport and setting the GL_PROJECTION matrix, and before calling the scene OpenGL drawing primitives.
372  *
373  * While handling this event you can call OpenGL glBegin(),glEnd(),gl* functions or those in mrpt::opengl::gl_utils to draw stuff *in the back* of the normal
374  * objects contained in the COpenGLScene.
375  *
376  * After processing this event, COpenGLViewport will change the OpenGL matrix mode into "GL_MODELVIEW" and load an identity matrix to continue
377  * rendering the scene objects as usual. Any change done to the GL_PROJECTION will have effects, so do a glPushMatrix()/glPopMatrix() if that is not your intention.
378  *
379  *
380  * IMPORTANTE NOTICE: Event handlers in your observer class will most likely be invoked from an internal GUI thread of MRPT,
381  * so all your code in the handler must be thread safe.
382  */
384  {
385  protected:
386  void do_nothing() MRPT_OVERRIDE { } //!< Just to allow this class to be polymorphic
387  public:
388  inline mrptEventGLPreRender(const COpenGLViewport* obj) : source_viewport(obj) { }
390  }; // End of class def.
391 
392  /** An event sent by an mrpt::opengl::COpenGLViewport after calling the scene OpenGL drawing primitives and before doing a glSwapBuffers
393  *
394  * While handling this event you can call OpenGL glBegin(),glEnd(),gl* functions or those in mrpt::opengl::gl_utils to draw stuff *on the top* of the normal
395  * objects contained in the COpenGLScene.
396  *
397  * IMPORTANTE NOTICE: Event handlers in your observer class will most likely be invoked from an internal GUI thread of MRPT,
398  * so all your code in the handler must be thread safe.
399  */
401  {
402  protected:
403  void do_nothing() MRPT_OVERRIDE { } //!< Just to allow this class to be polymorphic
404  public:
405  inline mrptEventGLPostRender(const COpenGLViewport* obj) : source_viewport(obj) { }
407  }; // End of class def.
408 
409 
410  /** @} */
411 
412 
413 
414  } // end namespace
415 
416 } // End of namespace
417 
418 
419 #endif
opengl::CListOpenGLObjects m_objects
The list of objects that comprise the 3D scene.
void setBorderSize(unsigned int lineWidth)
Set the border size ("frame") of the viewport (default=0).
const COpenGLViewport *const source_viewport
const_iterator begin() const
mrpt::utils::CImagePtr m_imageview_img
The image to display, after calling setImageView()
bool m_isTransparent
Whether to clear color buffer.
opengl::CCamera & getCamera()
Get a reference to the camera associated with this viewport.
A set of object, which are referenced to the coordinates framework established in this object...
Definition: CSetOfObjects.h:32
uint32_t m_borderWidth
Default=0, the border around the viewport.
The virtual base class which provides a unified interface for all persistent objects in MRPT...
Definition: CSerializable.h:39
mrptEventGLPostRender(const COpenGLViewport *obj)
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
A class for storing images as grayscale or RGB bitmaps.
Definition: CImage.h:101
The basic event type for the observer-observable pattern in MRPT.
Definition: mrptEvent.h:34
std::vector< CLight > m_lights
#define ASSERT_BELOW_(__A, __B)
Scalar * iterator
Definition: eigen_plugins.h:23
std::deque< CRenderizablePtr > CListOpenGLObjects
A list of objects pointers, automatically managing memory free at destructor, and managing copies cor...
Definition: CRenderizable.h:33
CLight & getLight(const size_t i)
STL namespace.
const Scalar * const_iterator
Definition: eigen_plugins.h:24
const opengl::CCamera & getCamera() const
Get a reference to the camera associated with this viewport.
mrpt::utils::TColorf m_background_color
used only if m_custom_backgb_color
CListOpenGLObjects::iterator iterator
mrpt::math::TPoint3D eye
The camera is here.
GLdouble s
Definition: glext.h:3602
GLsizei GLsizei GLuint * obj
Definition: glext.h:3902
void clear()
Clear the contents of this container.
Definition: ts_hash_map.h:113
const CLight & getLight(const size_t i) const
A viewport within a COpenGLScene, containing a set of OpenGL objects to render.
void setCloneCamera(bool enable)
If set to true, and setCloneView() has been called, this viewport will be rendered using the camera o...
GLenum GLsizei width
Definition: glext.h:3513
Each of the possible lights of a 3D scene.
Definition: CLight.h:28
const COpenGLViewport *const source_viewport
bool m_isClonedCamera
Set by setCloneCamera.
void do_nothing() MRPT_OVERRIDE
Just to allow this class to be polymorphic.
GLuint color
Definition: glext.h:7093
A class for storing a list of text lines.
Definition: CStringList.h:32
bool m_isImageView
Set by setImageView.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
#define MRPT_END
GLint GLvoid * img
Definition: glext.h:3645
const_iterator end() const
mrpt::math::TPoint3D up
Up vector of the camera.
TLastProjectiveMatrixInfo m_lastProjMat
Info updated with each "render()" and used in "get3DRayForPixelCoord".
GLsizei const GLchar ** string
Definition: glext.h:3919
void do_nothing() MRPT_OVERRIDE
Just to allow this class to be polymorphic.
mrpt::math::TPoint3D pointing
The camera points to here.
size_t size() const
Number of objects contained.
mrptEventGLPreRender(const COpenGLViewport *obj)
#define CLASS_ID_NAMESPACE(class_name, namespaceName)
Access to runtime class ID for a defined class name.
Definition: CObject.h:86
#define MRPT_START
const GLdouble * v
Definition: glext.h:3603
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
GLdouble GLdouble GLdouble r
Definition: glext.h:3618
An event sent by an mrpt::opengl::COpenGLViewport just after clearing the viewport and setting the GL...
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Definition: CPose3D.h:72
float elev
Camera elev & azimuth, in radians.
An event sent by an mrpt::opengl::COpenGLViewport after calling the scene OpenGL drawing primitives a...
void enablePolygonNicest(bool enable=true)
Sets glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST) is enabled, or GL_FASTEST otherwise.
CListOpenGLObjects::const_iterator const_iterator
mrpt::utils::TColorf getCustomBackgroundColor() const
The namespace for 3D scene representation and rendering.
GLuint const GLchar * name
Definition: glext.h:3891
This class allows the user to create, load, save, and render 3D scenes using OpenGL primitives...
Definition: COpenGLScene.h:49
void setTransparent(bool trans)
Set the transparency, that is, whether the viewport will be rendered transparent over previous viewpo...
A RGB color - floats in the range [0,1].
Definition: TColor.h:80
std::string m_clonedViewport
Only if m_isCloned=true.
void lightsClearAll()
Removes all lights (and disables the global "GL_LIGHTING")
std::string getName()
Returns the name of the viewport.
void addLight(const CLight &l)
Append a new light to the scene.
GLenum GLint GLint y
Definition: glext.h:3516
T::Ptr getByClass(const size_t &ith=0) const
Returns the i&#39;th object of a given class (or of a descendant class), or NULL (an empty smart pointer)...
void setCustomBackgroundColor(const mrpt::utils::TColorf &color)
Set a background color different from that of the parent GUI window.
A structure that holds runtime class type information.
Definition: CObject.h:36
GLenum GLint x
Definition: glext.h:3516
Lightweight 3D point.
EIGEN_STRONG_INLINE void eye()
Make the matrix an identity matrix.
Definition: eigen_plugins.h:63
A camera: if added to a scene, the viewpoint defined by this camera will be used instead of the camer...
Definition: CCamera.h:31
GLenum GLsizei GLsizei height
Definition: glext.h:3523
unsigned __int32 uint32_t
Definition: rptypes.h:49
bool isTransparent()
Return whether the viewport will be rendered transparent over previous viewports. ...
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
utils::safe_ptr< COpenGLScene > m_parent
The scene that contains this viewport.
opengl::CCamera m_camera
The camera associated to the viewport.
A wrapper class for pointers that can be safely copied with "=" operator without problems.
Definition: safe_pointers.h:64
std::string m_name
The viewport&#39;s name.
bool m_isCloned
Set by setCloneView.
3D line, represented by a base point and a director vector.
void setNumberOfLights(const size_t N)
Allocates a number of lights, which must be correctly defined via getLight(i), etc.



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019