9 #ifndef CDisplayWindow3D_H 10 #define CDisplayWindow3D_H 22 class C3DWindowDialog;
23 class CMyGLCanvas_DisplayWindow3D;
106 friend class CMyGLCanvas_DisplayWindow3D;
111 void createOpenGLContext();
129 void internalSetMinMaxRange();
135 unsigned int initialWindowWidth = 400,
136 unsigned int initialWindowHeight = 300 );
139 static CDisplayWindow3DPtr Create(
141 unsigned int initialWindowWidth = 400,
142 unsigned int initialWindowHeight = 300 );
150 mrpt::opengl::COpenGLScenePtr & get3DSceneAndLock( );
154 void unlockAccess3DScene();
162 float getFOV()
const;
163 void setMinRange(
double new_min);
164 void setMaxRange(
double new_max);
165 void setFOV(
float v);
169 void setCameraElevationDeg(
float deg );
170 void setCameraAzimuthDeg(
float deg );
171 void setCameraPointingToPoint(
float x,
float y,
float z );
172 void setCameraZoom(
float zoom );
173 void setCameraProjective(
bool isProjective );
174 float getCameraElevationDeg()
const;
175 float getCameraAzimuthDeg()
const;
176 void getCameraPointingToPoint(
float &
x,
float &
y,
float &
z )
const;
177 float getCameraZoom()
const;
178 bool isCameraProjective()
const;
179 void useCameraFromScene(
bool useIt =
true);
182 virtual void setCursorCross(
bool cursorIsCross)
MRPT_OVERRIDE;
201 void grabImagesStop();
206 void captureImagesStart();
211 void captureImagesStop();
228 mrpt::utils::CImagePtr getLastWindowImagePtr()
const;
256 const size_t unique_index = 0,
268 const double font_size,
270 const size_t unique_index = 0,
271 const double font_spacing = 1.5,
272 const double font_kerning = 0.1,
273 const bool draw_shadow =
false,
281 void clearTextMessages();
293 mrpt::opengl::COpenGLViewportPtr getDefaultViewport();
312 void internal_setRenderingFPS(
double FPS);
313 void internal_emitGrabImageEvent(
const std::string &fil);
335 ) : source_object(
obj), img_file(_img_file) { }
Recursive mutex: allow recursive locks by the owner thread.
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
virtual void do_nothing() MRPT_OVERRIDE
Just to allow this class to be polymorphic.
mrpt::utils::CImagePtr m_last_captured_img
An event sent by a CDisplayWindow3D window when an image is saved after enabling this feature with CD...
Auxiliary class for safely claiming the 3DScene of a mrpt::gui::CDisplayWindow3D. ...
This class provides simple critical sections functionality.
mrpt::opengl::COpenGLScenePtr m_3Dscene
Internal OpenGL object (see general discussion in about usage of this object)
bool isCapturingImgs() const
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
A class for storing images as grayscale or RGB bitmaps.
CDisplayWindow3D * source_object
GLsizei GLsizei GLuint * obj
mrpt::synch::CCriticalSectionRecursive m_csAccess3DScene
Critical section for accesing m_3Dscene.
double getRenderingFPS() const
Get the average Frames Per Second (FPS) value from the last 250 rendering events. ...
const std::string & img_file
The absolute path of the file that has been just saved.
TOpenGLFont
Existing fonts for 2D texts in mrpt::opengl methods.
TOpenGLFontStyle
Different style for vectorized font rendering.
#define DEFINE_MRPT_OBJECT(class_name)
This declaration must be inserted in all CObject classes definition, within the class declaration...
#define DEFINE_MRPT_OBJECT_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
unsigned int m_grab_imgs_idx
std::string m_grab_imgs_prefix
GLsizei const GLchar ** string
#define DEFINE_MRPT_OBJECT_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
mrptEvent3DWindowGrabImageFile(CDisplayWindow3D *obj, const std::string &_img_file)
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
mrpt::system::TTimeStamp m_lastFullScreen
mrpt::utils::void_ptr_noncopy m_GLRenderingContext
synch::CCriticalSection m_last_captured_img_cs
renders glyphs filled with antialiased outlines
A RGB color - floats in the range [0,1].
mrpt::utils::void_ptr_noncopy m_DisplayDeviceContext
GLenum GLsizei GLsizei height
The base class for GUI window classes.
A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.
3D line, represented by a base point and a director vector.