Main MRPT website > C++ reference for MRPT 1.5.9
Classes | Namespaces
gl_utils.h File Reference
#include <mrpt/utils/utils_defs.h>
#include <mrpt/opengl/opengl_fonts.h>
#include <mrpt/opengl/CRenderizable.h>
#include <mrpt/opengl/link_pragmas.h>
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 OPENGL_IMPEXP mrpt::opengl::gl_utils::renderSetOfObjects (const mrpt::opengl::CListOpenGLObjects &objs)
 For each object in the list: More...
 
void OPENGL_IMPEXP mrpt::opengl::gl_utils::checkOpenGLError ()
 Checks glGetError and throws an exception if an error situation is found. More...
 
void OPENGL_IMPEXP 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 OPENGL_IMPEXP mrpt::opengl::gl_utils::renderTriangleWithNormal (const mrpt::math::TPoint3Df &p1, const mrpt::math::TPoint3Df &p2, const mrpt::math::TPoint3Df &p3)
 
void OPENGL_IMPEXP 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 OPENGL_IMPEXP mrpt::opengl::gl_utils::getCurrentRenderingInfo (TRenderInfo &ri)
 Gather useful information on the render parameters. More...
 
void OPENGL_IMPEXP 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::utils::TColor &back_col=mrpt::utils::TColor(0, 0, 50, 150), const mrpt::utils::TColor &border_col=mrpt::utils::TColor(0, 0, 0, 140), const mrpt::utils::TColor &text_col=mrpt::utils::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 OPENGL_IMPEXP mrpt::opengl::gl_utils::renderTextBitmap (const char *str, void *fontStyle)
 This method is safe for calling from within ::render() methods. More...
 
int OPENGL_IMPEXP 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 OPENGL_IMPEXP mrpt::opengl::gl_utils::glSetFont (const std::string &fontname)
 sets the font to use for future font rendering commands. More...
 
const OPENGL_IMPEXP std::stringmrpt::opengl::gl_utils::glGetFont ()
 returns the name of the currently active font More...
 
mrpt::utils::TPixelCoordf OPENGL_IMPEXP 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::utils::TPixelCoordf OPENGL_IMPEXP 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.5.9 Git: 690a4699f Wed Apr 15 19:29:53 2020 +0200 at miƩ abr 15 19:30:12 CEST 2020