Main MRPT website > C++ reference
MRPT logo
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends
mrpt::gui::CDisplayWindow3D Class Reference

Detailed Description

A graphical user interface (GUI) for efficiently rendering 3D scenes in real-time.

This class always contains internally an instance of opengl::COpenGLScene, which the objects, viewports, etc. to be rendered.

Images can be grabbed automatically to disk for easy creation of videos. See CDisplayWindow3D::grabImagesStart (and for creating videos, mrpt::utils::CVideoFileWriter).

Since the 3D rendering is performed in a detached thread, especial care must be taken when updating the 3D scene to be rendered. The process involves an internal critical section and it must always consist of these steps:

   CDisplayWindow3D     win("My window");

   // Adquire the scene:
   opengl::COpenGLScenePtr &ptrScene = win.get3DSceneAndLock();

   // Modify the scene:
   ptrScene->...
   // or replace by another scene:
   ptrScene = otherScene;

   // Unlock it, so the window can use it for redraw:
   win.unlockAccess3DScene();

   // Update window, if required
   win.forceRepaint();

An alternative way of updating the scene is by creating, before locking the 3D window, a new object of class COpenGLScene, then locking the window only for replacing the smart pointer. This may be advantageous is generating the 3D scene takes a long time, since while the window is locked it will not be responsive to the user input or window redraw.

The window can also display a set of 2D text messages overlapped to the 3D scene. See CDisplayWindow3D::add2DTextMessage

For a list of supported events with the observer/observable pattern, see the discussion in mrpt::gui::CBaseGUIWindow. In addition to those events, this class introduces mrpt::gui::mrptEvent3DWindowGrabImageFile

See also:
The example /samples/display3D, the tutorial only.

#include <mrpt/gui/CDisplayWindow3D.h>

Inheritance diagram for mrpt::gui::CDisplayWindow3D:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CDisplayWindow3D (const std::string &windowCaption=std::string(), unsigned int initialWindowWidth=400, unsigned int initialWindowHeight=300)
 Constructor.
virtual ~CDisplayWindow3D ()
 Destructor.
opengl::COpenGLScenePtrget3DSceneAndLock ()
 Gets a reference to the smart shared pointer that holds the internal scene (carefuly read introduction in gui::CDisplayWindow3D before use!) This also locks the critical section for accesing the scene, thus the window will not be repainted until it is unlocked.
void unlockAccess3DScene ()
 Unlocks the access to the internal 3D scene.
void forceRepaint ()
 Repaints the window.
void repaint ()
 Repaints the window.
void updateWindow ()
 Repaints the window.
float getFOV () const
 Return the camera field of view (in degrees) (used for gluPerspective).
void setMinRange (float v)
 Changes the camera min range (z) (used for gluPerspective).
void setMaxRange (float v)
 Changes the camera max range (z) (used for gluPerspective).
void setFOV (float v)
 Changes the camera field of view (in degrees) (used for gluPerspective).
void resize (unsigned int width, unsigned int height)
 Resizes the window, stretching the image to fit into the display area.
void setPos (int x, int y)
 Changes the position of the window on the screen.
void setWindowTitle (const std::string &str)
 Changes the window title.
void setCameraElevationDeg (float deg)
 Changes the camera parameters programatically.
void setCameraAzimuthDeg (float deg)
 Changes the camera parameters programatically.
void setCameraPointingToPoint (float x, float y, float z)
 Changes the camera parameters programatically.
void setCameraZoom (float zoom)
 Changes the camera parameters programatically.
void setCameraProjective (bool isProjective)
 Sets the camera as projective, or orthogonal.
float getCameraElevationDeg () const
 Get camera parameters programatically.
float getCameraAzimuthDeg () const
 Get camera parameters programatically.
void getCameraPointingToPoint (float &x, float &y, float &z) const
 Get camera parameters programatically.
float getCameraZoom () const
 Get camera parameters programatically.
bool isCameraProjective () const
 Sets the camera as projective, or orthogonal.
void useCameraFromScene (bool useIt=true)
 If set to true (default = false), the mouse-based scene navigation will be disabled and the camera position will be determined by the opengl viewports in the 3D scene.
bool getLastMousePositionRay (mrpt::math::TLine3D &ray) const
 Gets the 3D ray for the direction line of the pixel where the mouse cursor is at.
virtual bool getLastMousePosition (int &x, int &y) const
 Gets the last x,y pixel coordinates of the mouse.
virtual void setCursorCross (bool cursorIsCross)
 Set cursor style to default (cursorIsCross=false) or to a cross (cursorIsCross=true)
void grabImagesStart (const std::string &grab_imgs_prefix=std::string("video_"))
 Start to save rendered images to disk.
void grabImagesStop ()
 Stops image grabbing started by grabImagesStart.
void captureImagesStart ()
 Enables the grabbing of CImage objects from screenshots of the window.
void captureImagesStop ()
 Stop image grabbing.
void getLastWindowImage (mrpt::utils::CImage &out_img) const
 Retrieve the last captured image from the window.
mrpt::utils::CImagePtr getLastWindowImagePtr () const
 Retrieve the last captured image from the window, as a smart pointer.
std::string grabImageGetNextFile ()
 Increments by one the image counter and return the next image file name (Users normally don't want to call this method).
bool isCapturingImgs () const
void addTextMessage (const double x, const double y, const std::string &text, const mrpt::utils::TColorf &color=mrpt::utils::TColorf(1.0, 1.0, 1.0), const size_t unique_index=0, const TOpenGLFont font=MRPT_GLUT_BITMAP_TIMES_ROMAN_24)
 Add 2D text messages overlapped to the 3D rendered scene.
void addTextMessage (const double x_frac, const double y_frac, const std::string &text, const mrpt::utils::TColorf &color, const std::string &font_name, const double font_size, const mrpt::opengl::TOpenGLFontStyle font_style=mrpt::opengl::NICE, const size_t unique_index=0, const double font_spacing=1.5, const double font_kerning=0.1)
void clearTextMessages ()
 Clear all text messages created with addTextMessage().
double getRenderingFPS () const
 Get the average Frames Per Second (FPS) value from the last 250 rendering events.
void * getWxObject ()
 Read-only access to the wxDialog object.
void notifyChildWindowDestruction ()
 Called by wx main thread to set m_hwnd to NULL.
void notifySemThreadReady ()
 Called by wx main thread to signal the semaphore that the wx window is built and ready.
bool isOpen ()
 Returns false if the user has already closed the window.
int waitForKey (bool ignoreControlKeys=true, mrptKeyModifier *out_pushModifier=NULL)
 Waits for any key to be pushed on the image or the console, and returns the key code.
bool keyHit () const
 Returns true if a key has been pushed, without blocking waiting for a new key being pushed.
void clearKeyHitFlag ()
 Assure that "keyHit" will return false until the next pushed key.
int getPushedKey (mrptKeyModifier *out_pushModifier=NULL)
 Returns the latest pushed key, or 0 if there is no new key stroke.
mrpt::utils::CObjectPtr duplicateGetSmartPtr () const
 Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).
CObjectclone () const
 Cloning interface for smart pointers.

Static Public Member Functions

static CDisplayWindow3DPtr Create (const std::string &windowCaption=std::string(), unsigned int initialWindowWidth=400, unsigned int initialWindowHeight=300)
 Class factory returning a smart pointer.

Static Public Attributes

static const
mrpt::utils::TRuntimeClassId 
classCObject

Protected Member Functions

void createOpenGLContext ()
 Throws an exception on initialization error.
void doRender ()
void internalSetMinMaxRange ()
void internal_setRenderingFPS (double FPS)
 Set the rendering FPS (users don't call this, the method is for internal MRPT objects only)
void internal_emitGrabImageEvent (const std::string &fil)
 called by CMyGLCanvas_DisplayWindow3D::OnPostRenderSwapBuffers
void createWxWindow (unsigned int initialWidth, unsigned int initialHeight)
 Must be called by child classes just within the constructor.
void destroyWxWindow ()
 Must be called by child classes in their destructors. The code cannot be put into this class' destructor.
void publishEvent (const mrptEvent &e) const
 Called when you want this object to emit an event to all the observers currently subscribed to this object.
bool hasSubscribers () const
 Can be called by a derived class before preparing an event for publishing with publishEvent to determine if there is no one subscribed, so it can save the wasted time preparing an event that will be not read.

Protected Attributes

float m_FOV
opengl::COpenGLScenePtr m_3Dscene
 Internal OpenGL object (see general discussion in about usage of this object)
synch::CCriticalSection m_csAccess3DScene
 Critical section for accesing m_3Dscene.
void_ptr_noncopy m_DisplayDeviceContext
void_ptr_noncopy m_GLRenderingContext
std::string m_grab_imgs_prefix
unsigned int m_grab_imgs_idx
bool m_is_capturing_imgs
CImagePtr m_last_captured_img
synch::CCriticalSection m_last_captured_img_cs
mrpt::system::TTimeStamp m_lastFullScreen
double m_last_FPS
synch::CSemaphore m_semThreadReady
 This semaphore will be signaled when the wx window is built and ready.
synch::CSemaphore m_semWindowDestroyed
 This semaphore will be signaled when the wx window is destroyed.
std::string m_caption
 The caption of the window.
void_ptr_noncopy m_hwnd
 The window handle.
volatile bool m_keyPushed
volatile int m_keyPushedCode
volatile mrptKeyModifier m_keyPushedModifier

Friends

class C3DWindowDialog
class CMyGLCanvas_DisplayWindow3D
class CWindowDialog
class CWindowDialogPlots

RTTI stuff

static const
mrpt::utils::TRuntimeClassId 
classCBaseGUIWindow
class mrpt::utils::CStream

RTTI stuff

typedef CDisplayWindow3DPtr SmartPtr
static mrpt::utils::CLASSINIT _init_CDisplayWindow3D
static mrpt::utils::TRuntimeClassId classCDisplayWindow3D
static const
mrpt::utils::TRuntimeClassId
classinfo
static const
mrpt::utils::TRuntimeClassId
_GetBaseClass ()
virtual const
mrpt::utils::TRuntimeClassId
GetRuntimeClass () const
 Returns information about the class of an object in runtime.
virtual mrpt::utils::CObjectduplicate () const
 Returns a copy of the object, indepently of its class.
static mrpt::utils::CObjectCreateObject ()
static CDisplayWindow3DPtr Create ()

Member Typedef Documentation

A typedef for the associated smart pointer

Definition at line 98 of file CDisplayWindow3D.h.


Constructor & Destructor Documentation

mrpt::gui::CDisplayWindow3D::CDisplayWindow3D ( const std::string windowCaption = std::string(),
unsigned int  initialWindowWidth = 400,
unsigned int  initialWindowHeight = 300 
)

Constructor.

virtual mrpt::gui::CDisplayWindow3D::~CDisplayWindow3D ( ) [virtual]

Destructor.


Member Function Documentation

static const mrpt::utils::TRuntimeClassId* mrpt::gui::CDisplayWindow3D::_GetBaseClass ( ) [static, protected]

Reimplemented from mrpt::gui::CBaseGUIWindow.

void mrpt::gui::CDisplayWindow3D::addTextMessage ( const double  x,
const double  y,
const std::string text,
const mrpt::utils::TColorf color = mrpt::utils::TColorf(1.0, 1.0, 1.0),
const size_t  unique_index = 0,
const TOpenGLFont  font = MRPT_GLUT_BITMAP_TIMES_ROMAN_24 
)

Add 2D text messages overlapped to the 3D rendered scene.

The string will remain displayed in the 3D window until it's changed with subsequent calls to this same method, or all the texts are cleared with clearTextMessages().

Parameters:
xThe X position, interpreted as absolute pixels from the left if X>=1, absolute pixels from the left if X<0 or as a width factor if in the range [0,1[.
yThe Y position, interpreted as absolute pixels from the bottom if Y>=1, absolute pixels from the top if Y<0 or as a height factor if in the range [0,1[.
textThe text string to display.
colorThe text color. For example: TColorf(1.0,1.0,1.0)
unique_indexAn "index" for this text message, so that subsequent calls with the same index will overwrite this text message instead of creating new ones.

You'll need to refresh the display manually with forceRepaint().

See also:
clearTextMessages
void mrpt::gui::CDisplayWindow3D::addTextMessage ( const double  x_frac,
const double  y_frac,
const std::string text,
const mrpt::utils::TColorf color,
const std::string font_name,
const double  font_size,
const mrpt::opengl::TOpenGLFontStyle  font_style = mrpt::opengl::NICE,
const size_t  unique_index = 0,
const double  font_spacing = 1.5,
const double  font_kerning = 0.1 
)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void mrpt::gui::CDisplayWindow3D::captureImagesStart ( )

Enables the grabbing of CImage objects from screenshots of the window.

See also:
getLastWindowImage
void mrpt::gui::CDisplayWindow3D::captureImagesStop ( )

Stop image grabbing.

See also:
captureImagesStart
void mrpt::gui::CBaseGUIWindow::clearKeyHitFlag ( ) [inline, inherited]

Assure that "keyHit" will return false until the next pushed key.

See also:
keyHit, waitForKey

Definition at line 149 of file CBaseGUIWindow.h.

void mrpt::gui::CDisplayWindow3D::clearTextMessages ( )

Clear all text messages created with addTextMessage().

You'll need to refresh the display manually with forceRepaint().

See also:
addTextMessage
CObject* mrpt::utils::CObject::clone ( ) const [inline, inherited]

Cloning interface for smart pointers.

Reimplemented in mrpt::opengl::CRenderizable, and mrpt::opengl::CRenderizableDisplayList.

Definition at line 154 of file CObject.h.

static CDisplayWindow3DPtr mrpt::gui::CDisplayWindow3D::Create ( ) [static]
static CDisplayWindow3DPtr mrpt::gui::CDisplayWindow3D::Create ( const std::string windowCaption = std::string(),
unsigned int  initialWindowWidth = 400,
unsigned int  initialWindowHeight = 300 
) [inline, static]

Class factory returning a smart pointer.

Definition at line 147 of file CDisplayWindow3D.h.

static mrpt::utils::CObject* mrpt::gui::CDisplayWindow3D::CreateObject ( ) [static]
void mrpt::gui::CDisplayWindow3D::createOpenGLContext ( ) [protected]

Throws an exception on initialization error.

void mrpt::gui::CBaseGUIWindow::createWxWindow ( unsigned int  initialWidth,
unsigned int  initialHeight 
) [protected, inherited]

Must be called by child classes just within the constructor.

void mrpt::gui::CBaseGUIWindow::destroyWxWindow ( ) [protected, inherited]

Must be called by child classes in their destructors. The code cannot be put into this class' destructor.

void mrpt::gui::CDisplayWindow3D::doRender ( ) [protected]
virtual mrpt::utils::CObject* mrpt::gui::CDisplayWindow3D::duplicate ( ) const [virtual]

Returns a copy of the object, indepently of its class.

Implements mrpt::utils::CObject.

mrpt::utils::CObjectPtr mrpt::utils::CObject::duplicateGetSmartPtr ( ) const [inline, inherited]

Returns a copy of the object, indepently of its class, as a smart pointer (the newly created object will exist as long as any copy of this smart pointer).

Definition at line 151 of file CObject.h.

void mrpt::gui::CDisplayWindow3D::forceRepaint ( )

Repaints the window.

forceRepaint, repaint and updateWindow are all aliases of the same method.

opengl::COpenGLScenePtr& mrpt::gui::CDisplayWindow3D::get3DSceneAndLock ( )

Gets a reference to the smart shared pointer that holds the internal scene (carefuly read introduction in gui::CDisplayWindow3D before use!) This also locks the critical section for accesing the scene, thus the window will not be repainted until it is unlocked.

float mrpt::gui::CDisplayWindow3D::getCameraAzimuthDeg ( ) const

Get camera parameters programatically.

float mrpt::gui::CDisplayWindow3D::getCameraElevationDeg ( ) const

Get camera parameters programatically.

void mrpt::gui::CDisplayWindow3D::getCameraPointingToPoint ( float &  x,
float &  y,
float &  z 
) const

Get camera parameters programatically.

float mrpt::gui::CDisplayWindow3D::getCameraZoom ( ) const

Get camera parameters programatically.

float mrpt::gui::CDisplayWindow3D::getFOV ( ) const [inline]

Return the camera field of view (in degrees) (used for gluPerspective).

Definition at line 186 of file CDisplayWindow3D.h.

virtual bool mrpt::gui::CDisplayWindow3D::getLastMousePosition ( int &  x,
int &  y 
) const [virtual]

Gets the last x,y pixel coordinates of the mouse.

Returns:
False if the window is closed.
See also:
getLastMousePositionRay

Implements mrpt::gui::CBaseGUIWindow.

bool mrpt::gui::CDisplayWindow3D::getLastMousePositionRay ( mrpt::math::TLine3D ray) const

Gets the 3D ray for the direction line of the pixel where the mouse cursor is at.

Returns:
False if the window is closed.
See also:
getLastMousePosition
void mrpt::gui::CDisplayWindow3D::getLastWindowImage ( mrpt::utils::CImage out_img) const

Retrieve the last captured image from the window.

You MUST CALL FIRST captureImagesStart to enable image grabbing.

See also:
captureImagesStart, getLastWindowImagePtr
mrpt::utils::CImagePtr mrpt::gui::CDisplayWindow3D::getLastWindowImagePtr ( ) const

Retrieve the last captured image from the window, as a smart pointer.

This method is more efficient than getLastWindowImage since only a copy of the pointer is performed, while getLastWindowImage would copy the entire image.

You MUST CALL FIRST captureImagesStart to enable image grabbing.

See also:
captureImagesStart, getLastWindowImage
int mrpt::gui::CBaseGUIWindow::getPushedKey ( mrptKeyModifier out_pushModifier = NULL) [inherited]

Returns the latest pushed key, or 0 if there is no new key stroke.

Parameters:
out_pushModifierIf set to !=NULL, the modifiers of the key stroke will be saved here.
Returns:
The virtual key code, as defined in <mrpt/gui/keycodes.h> (a replication of wxWidgets key codes).
See also:
keyHit, waitForKey
double mrpt::gui::CDisplayWindow3D::getRenderingFPS ( ) const [inline]

Get the average Frames Per Second (FPS) value from the last 250 rendering events.

Definition at line 358 of file CDisplayWindow3D.h.

virtual const mrpt::utils::TRuntimeClassId* mrpt::gui::CDisplayWindow3D::GetRuntimeClass ( ) const [virtual]

Returns information about the class of an object in runtime.

Reimplemented from mrpt::gui::CBaseGUIWindow.

void* mrpt::gui::CBaseGUIWindow::getWxObject ( ) [inline, inherited]

Read-only access to the wxDialog object.

Definition at line 97 of file CBaseGUIWindow.h.

References mrpt::utils::non_copiable_ptr_basic::get().

std::string mrpt::gui::CDisplayWindow3D::grabImageGetNextFile ( )

Increments by one the image counter and return the next image file name (Users normally don't want to call this method).

See also:
grabImagesStart
void mrpt::gui::CDisplayWindow3D::grabImagesStart ( const std::string grab_imgs_prefix = std::string("video_"))

Start to save rendered images to disk.

Images will be saved independently as png files, depending on the template path passed to this method. For example:

path_prefix: "./video_"

Will generate "./video_000001.png", etc.

If this feature is enabled, the window will emit events of the type mrpt::gui::mrptEvent3DWindowGrabImageFile() which you can subscribe to.

See also:
grabImagesStop
void mrpt::gui::CDisplayWindow3D::grabImagesStop ( )

Stops image grabbing started by grabImagesStart.

See also:
grabImagesStart
bool mrpt::utils::CObservable::hasSubscribers ( ) const [inline, protected, inherited]

Can be called by a derived class before preparing an event for publishing with publishEvent to determine if there is no one subscribed, so it can save the wasted time preparing an event that will be not read.

Definition at line 69 of file CObservable.h.

void mrpt::gui::CDisplayWindow3D::internal_emitGrabImageEvent ( const std::string fil) [protected]

called by CMyGLCanvas_DisplayWindow3D::OnPostRenderSwapBuffers

void mrpt::gui::CDisplayWindow3D::internal_setRenderingFPS ( double  FPS) [protected]

Set the rendering FPS (users don't call this, the method is for internal MRPT objects only)

See also:
getRenderingFPS
void mrpt::gui::CDisplayWindow3D::internalSetMinMaxRange ( ) [protected]
bool mrpt::gui::CDisplayWindow3D::isCameraProjective ( ) const

Sets the camera as projective, or orthogonal.

bool mrpt::gui::CDisplayWindow3D::isCapturingImgs ( ) const [inline]

Definition at line 312 of file CDisplayWindow3D.h.

bool mrpt::gui::CBaseGUIWindow::isOpen ( ) [inherited]

Returns false if the user has already closed the window.

bool mrpt::gui::CBaseGUIWindow::keyHit ( ) const [inline, inherited]

Returns true if a key has been pushed, without blocking waiting for a new key being pushed.

See also:
waitForKey, clearKeyHitFlag

Definition at line 144 of file CBaseGUIWindow.h.

void mrpt::gui::CBaseGUIWindow::notifyChildWindowDestruction ( ) [inherited]

Called by wx main thread to set m_hwnd to NULL.

void mrpt::gui::CBaseGUIWindow::notifySemThreadReady ( ) [inherited]

Called by wx main thread to signal the semaphore that the wx window is built and ready.

void mrpt::utils::CObservable::publishEvent ( const mrptEvent e) const [protected, inherited]

Called when you want this object to emit an event to all the observers currently subscribed to this object.

void mrpt::gui::CDisplayWindow3D::repaint ( ) [inline]

Repaints the window.

forceRepaint, repaint and updateWindow are all aliases of the same method.

Definition at line 177 of file CDisplayWindow3D.h.

void mrpt::gui::CDisplayWindow3D::resize ( unsigned int  width,
unsigned int  height 
) [virtual]

Resizes the window, stretching the image to fit into the display area.

Implements mrpt::gui::CBaseGUIWindow.

void mrpt::gui::CDisplayWindow3D::setCameraAzimuthDeg ( float  deg)

Changes the camera parameters programatically.

void mrpt::gui::CDisplayWindow3D::setCameraElevationDeg ( float  deg)

Changes the camera parameters programatically.

void mrpt::gui::CDisplayWindow3D::setCameraPointingToPoint ( float  x,
float  y,
float  z 
)

Changes the camera parameters programatically.

void mrpt::gui::CDisplayWindow3D::setCameraProjective ( bool  isProjective)

Sets the camera as projective, or orthogonal.

void mrpt::gui::CDisplayWindow3D::setCameraZoom ( float  zoom)

Changes the camera parameters programatically.

virtual void mrpt::gui::CDisplayWindow3D::setCursorCross ( bool  cursorIsCross) [virtual]

Set cursor style to default (cursorIsCross=false) or to a cross (cursorIsCross=true)

See also:
getLastMousePositionRay

Implements mrpt::gui::CBaseGUIWindow.

void mrpt::gui::CDisplayWindow3D::setFOV ( float  v) [inline]

Changes the camera field of view (in degrees) (used for gluPerspective).

The window is not updated with this method, call "forceRepaint" to update the 3D view.

Definition at line 201 of file CDisplayWindow3D.h.

void mrpt::gui::CDisplayWindow3D::setMaxRange ( float  v)

Changes the camera max range (z) (used for gluPerspective).

The window is not updated with this method, call "forceRepaint" to update the 3D view.

void mrpt::gui::CDisplayWindow3D::setMinRange ( float  v)

Changes the camera min range (z) (used for gluPerspective).

The window is not updated with this method, call "forceRepaint" to update the 3D view.

void mrpt::gui::CDisplayWindow3D::setPos ( int  x,
int  y 
) [virtual]

Changes the position of the window on the screen.

Implements mrpt::gui::CBaseGUIWindow.

void mrpt::gui::CDisplayWindow3D::setWindowTitle ( const std::string str) [virtual]

Changes the window title.

Implements mrpt::gui::CBaseGUIWindow.

void mrpt::gui::CDisplayWindow3D::unlockAccess3DScene ( )

Unlocks the access to the internal 3D scene.

Typically user will want to call forceRepaint after updating the scene.

void mrpt::gui::CDisplayWindow3D::updateWindow ( ) [inline]

Repaints the window.

forceRepaint, repaint and updateWindow are all aliases of the same method.

Definition at line 182 of file CDisplayWindow3D.h.

void mrpt::gui::CDisplayWindow3D::useCameraFromScene ( bool  useIt = true)

If set to true (default = false), the mouse-based scene navigation will be disabled and the camera position will be determined by the opengl viewports in the 3D scene.

int mrpt::gui::CBaseGUIWindow::waitForKey ( bool  ignoreControlKeys = true,
mrptKeyModifier out_pushModifier = NULL 
) [inherited]

Waits for any key to be pushed on the image or the console, and returns the key code.

This method remove key strokes previous to its call, so it will always wait. To get the latest pushed key, see

Parameters:
ignoreControlKeysIf set to false, any push of shift, cmd, control, etc... will make this method to return.
out_pushModifierIf set to !=NULL, the modifiers of the key stroke will be saved here.
Returns:
The virtual key code, as defined in mrptKeyCode (a replication of wxWidgets key codes).
See also:
getPushedKey, Key codes in the enum mrptKeyCode

Friends And Related Function Documentation

friend class C3DWindowDialog [friend]

Reimplemented from mrpt::gui::CBaseGUIWindow.

Definition at line 101 of file CDisplayWindow3D.h.

friend class CMyGLCanvas_DisplayWindow3D [friend]

Definition at line 102 of file CDisplayWindow3D.h.

friend class CWindowDialog [friend, inherited]

Definition at line 73 of file CBaseGUIWindow.h.

friend class CWindowDialogPlots [friend, inherited]

Reimplemented in mrpt::gui::CDisplayWindowPlots.

Definition at line 75 of file CBaseGUIWindow.h.

friend class mrpt::utils::CStream [friend, inherited]

Definition at line 71 of file CBaseGUIWindow.h.


Member Data Documentation

Definition at line 98 of file CDisplayWindow3D.h.

Definition at line 71 of file CBaseGUIWindow.h.

Definition at line 98 of file CDisplayWindow3D.h.

Definition at line 139 of file CObject.h.

Definition at line 98 of file CDisplayWindow3D.h.

Internal OpenGL object (see general discussion in about usage of this object)

Definition at line 110 of file CDisplayWindow3D.h.

The caption of the window.

Definition at line 85 of file CBaseGUIWindow.h.

Critical section for accesing m_3Dscene.

Definition at line 114 of file CDisplayWindow3D.h.

Definition at line 120 of file CDisplayWindow3D.h.

Definition at line 105 of file CDisplayWindow3D.h.

Definition at line 121 of file CDisplayWindow3D.h.

Definition at line 124 of file CDisplayWindow3D.h.

Definition at line 123 of file CDisplayWindow3D.h.

The window handle.

Definition at line 86 of file CBaseGUIWindow.h.

Definition at line 126 of file CDisplayWindow3D.h.

volatile bool mrpt::gui::CBaseGUIWindow::m_keyPushed [protected, inherited]

Definition at line 89 of file CBaseGUIWindow.h.

volatile int mrpt::gui::CBaseGUIWindow::m_keyPushedCode [protected, inherited]

Definition at line 90 of file CBaseGUIWindow.h.

Definition at line 91 of file CBaseGUIWindow.h.

Definition at line 127 of file CDisplayWindow3D.h.

Definition at line 128 of file CDisplayWindow3D.h.

See also:
getRenderingFPS

Definition at line 134 of file CDisplayWindow3D.h.

Definition at line 132 of file CDisplayWindow3D.h.

This semaphore will be signaled when the wx window is built and ready.

Definition at line 83 of file CBaseGUIWindow.h.

This semaphore will be signaled when the wx window is destroyed.

Definition at line 84 of file CBaseGUIWindow.h.




Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011