Main MRPT website > C++ reference
MRPT logo
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

namespace  mrpt
 

This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.


namespace  mrpt::opengl
 

The namespace for 3D scene representation and rendering.


namespace  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:
void OPENGL_IMPEXP mrpt::opengl::gl_utils::checkOpenGLError ()
 Checks glGetError and throws an exception if an error situation is found.
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.
void OPENGL_IMPEXP mrpt::opengl::gl_utils::getCurrentRenderingInfo (TRenderInfo &ri)
 Gather useful information on the render parameters.
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.
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.
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().
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.
const OPENGL_IMPEXP std::stringmrpt::opengl::gl_utils::glGetFont ()
 returns the name of the currently active font
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.
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



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