Go to the documentation of this file.
9 #ifndef CDisplayWindow3D_H
10 #define CDisplayWindow3D_H
25 class C3DWindowDialog;
26 class CMyGLCanvas_DisplayWindow3D;
84 friend class C3DWindowDialog;
85 friend class CMyGLCanvas_DisplayWindow3D;
96 void createOpenGLContext();
114 void internalSetMinMaxRange();
119 const std::string &windowCaption = std::string(),
120 unsigned int initialWindowWidth = 400,
121 unsigned int initialWindowHeight = 300 );
124 static CDisplayWindow3DPtr Create(
125 const std::string &windowCaption,
126 unsigned int initialWindowWidth = 400,
127 unsigned int initialWindowHeight = 300 );
134 opengl::COpenGLScenePtr & get3DSceneAndLock( );
138 void unlockAccess3DScene();
146 float getFOV()
const;
147 void setMinRange(
double new_min);
148 void setMaxRange(
double new_max);
149 void setFOV(
float v);
150 void resize(
unsigned int width,
unsigned int height)
MRPT_OVERRIDE;
153 void setCameraElevationDeg(
float deg );
154 void setCameraAzimuthDeg(
float deg );
155 void setCameraPointingToPoint(
float x,
float y,
float z );
156 void setCameraZoom(
float zoom );
157 void setCameraProjective(
bool isProjective );
158 float getCameraElevationDeg()
const;
159 float getCameraAzimuthDeg()
const;
160 void getCameraPointingToPoint(
float &x,
float &y,
float &z )
const;
161 float getCameraZoom()
const;
162 bool isCameraProjective()
const;
163 void useCameraFromScene(
bool useIt =
true);
165 virtual bool getLastMousePosition(
int &x,
int &y)
const MRPT_OVERRIDE;
166 virtual void setCursorCross(
bool cursorIsCross)
MRPT_OVERRIDE;
180 void grabImagesStart(
const std::string &grab_imgs_prefix = std::string(
"video_") );
185 void grabImagesStop();
190 void captureImagesStart();
195 void captureImagesStop();
212 mrpt::utils::CImagePtr getLastWindowImagePtr()
const;
217 std::string grabImageGetNextFile();
238 const std::string &text,
240 const size_t unique_index = 0,
249 const std::string &text,
251 const std::string &font_name,
252 const double font_size,
254 const size_t unique_index = 0,
255 const double font_spacing = 1.5,
256 const double font_kerning = 0.1,
257 const bool draw_shadow =
false,
265 void clearTextMessages();
277 mrpt::opengl::COpenGLViewportPtr getDefaultViewport();
294 void internal_setRenderingFPS(
double FPS);
295 void internal_emitGrabImageEvent(
const std::string &fil);
316 const std::string &_img_file
317 ) : source_object(obj), img_file(_img_file) { }
TOpenGLFont
Existing fonts for 2D texts in mrpt::opengl methods.
bool isCapturingImgs() const
TOpenGLFontStyle
Different style for vectorized font rendering.
renders glyphs filled with antialiased outlines
mrpt::utils::void_ptr_noncopy m_DisplayDeviceContext
CDisplayWindow3D * source_object
std::string m_grab_imgs_prefix
opengl::COpenGLScenePtr m_3Dscene
Internal OpenGL object (see general discussion in about usage of this object)
mrpt::utils::void_ptr_noncopy m_GLRenderingContext
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
A class for storing images as grayscale or RGB bitmaps.
double getRenderingFPS() const
Get the average Frames Per Second (FPS) value from the last 250 rendering events.
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
An event sent by a CDisplayWindow3D window when an image is saved after enabling this feature with CD...
The base class for GUI window classes.
virtual void do_nothing() MRPT_OVERRIDE
Just to allow this class to be polymorphic.
synch::CCriticalSection m_csAccess3DScene
Critical section for accesing m_3Dscene.
This class provides simple critical sections functionality.
mrpt::system::TTimeStamp m_lastFullScreen
mrpt::utils::CImagePtr m_last_captured_img
#define DEFINE_MRPT_OBJECT_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
mrptEvent3DWindowGrabImageFile(CDisplayWindow3D *obj, const std::string &_img_file)
A RGB color - floats in the range [0,1].
unsigned int m_grab_imgs_idx
3D line, represented by a base point and a director vector.
const std::string & img_file
The absolute path of the file that has been just saved.
A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
#define DEFINE_MRPT_OBJECT_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
#define DEFINE_MRPT_OBJECT(class_name)
This declaration must be inserted in all CObject classes definition, within the class declaration.
synch::CCriticalSection m_last_captured_img_cs
Page generated by Doxygen 1.8.16 for MRPT 1.4.0 SVN: at Mon Oct 14 23:11:08 UTC 2019 | | |