MRPT  1.9.9
gl_utils.h File Reference
Include dependency graph for gl_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mrpt::opengl::gl_utils::TRenderInfo
 Information about the rendering process being issued. More...
 

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::opengl
 The namespace for 3D scene representation and rendering.
 
 mrpt::opengl::gl_utils
 A set of auxiliary functions that can be called to render OpenGL primitives from MRPT or user code.
 

Functions

Miscellaneous rendering methods
void mrpt::opengl::gl_utils::renderSetOfObjects (const mrpt::opengl::CListOpenGLObjects &objs)
 For each object in the list: More...
 
void mrpt::opengl::gl_utils::checkOpenGLError ()
 Checks glGetError and throws an exception if an error situation is found. More...
 
void mrpt::opengl::gl_utils::renderTriangleWithNormal (const mrpt::math::TPoint3D &p1, const mrpt::math::TPoint3D &p2, const mrpt::math::TPoint3D &p3)
 Can be used by derived classes to draw a triangle with a normal vector computed automatically - to be called within a glBegin()-glEnd() block. More...
 
void mrpt::opengl::gl_utils::renderTriangleWithNormal (const mrpt::math::TPoint3Df &p1, const mrpt::math::TPoint3Df &p2, const mrpt::math::TPoint3Df &p3)
 
void mrpt::opengl::gl_utils::renderQuadWithNormal (const mrpt::math::TPoint3Df &p1, const mrpt::math::TPoint3Df &p2, const mrpt::math::TPoint3Df &p3, const mrpt::math::TPoint3Df &p4)
 Can be used by derived classes to draw a quad with a normal vector computed automatically - to be called within a glBegin()-glEnd() block. More...
 
void mrpt::opengl::gl_utils::getCurrentRenderingInfo (TRenderInfo &ri)
 Gather useful information on the render parameters. More...
 
void mrpt::opengl::gl_utils::renderMessageBox (const float msg_x, const float msg_y, const float msg_w, const float msg_h, const std::string &text, float text_scale, const mrpt::img::TColor &back_col=mrpt::img::TColor(0, 0, 50, 150), const mrpt::img::TColor &border_col=mrpt::img::TColor(0, 0, 0, 140), const mrpt::img::TColor &text_col=mrpt::img::TColor(255, 255, 255, 220), const float border_width=4.0f, const std::string &text_font=std::string("sans"), mrpt::opengl::TOpenGLFontStyle text_style=mrpt::opengl::FILL, const double text_spacing=1.5, const double text_kerning=0.1)
 Draws a message box with a centered (possibly multi-lined) text. More...
 
OpenGL bitmapped 2D fonts
void mrpt::opengl::gl_utils::renderTextBitmap (const char *str, void *fontStyle)
 This method is safe for calling from within ::render() methods. More...
 
int mrpt::opengl::gl_utils::textBitmapWidth (const std::string &str, mrpt::opengl::TOpenGLFont font=mrpt::opengl::MRPT_GLUT_BITMAP_TIMES_ROMAN_24)
 Return the exact width in pixels for a given string, as will be rendered by renderTextBitmap(). More...
 
OpenGL vector 3D fonts
void mrpt::opengl::gl_utils::glSetFont (const std::string &fontname)
 sets the font to use for future font rendering commands. More...
 
const std::stringmrpt::opengl::gl_utils::glGetFont ()
 returns the name of the currently active font More...
 
mrpt::img::TPixelCoordf mrpt::opengl::gl_utils::glDrawText (const std::string &text, const double textScale, enum TOpenGLFontStyle style=NICE, double spacing=1.5, double kerning=0.1)
 renders a string in GL using the current settings. More...
 
mrpt::img::TPixelCoordf mrpt::opengl::gl_utils::glGetExtends (const std::string &text, const double textScale, double spacing=1.5, double kerning=0.1)
 returns the size of the bounding box of a text to be rendered, similar to glDrawText but without any visual output More...
 



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020