10 #ifndef opengl_CText3D_H 11 #define opengl_CText3D_H 48 std::
string m_fontName;
50 double m_text_spacing;
51 double m_text_kerning;
55 inline
void setString( const
std::
string &s ) {
60 inline const std::string &
getString()
const {
return m_str; }
63 inline void setFont(
const std::string &font ) {
68 inline const std::string &
getFont()
const {
return m_fontName; }
72 m_text_style = text_style;
79 m_text_spacing = text_spacing;
85 m_text_kerning = text_kerning;
92 void render_dl()
const;
98 static CText3DPtr Create(
99 const std::string &str,
100 const std::string &fontName = std::string(
"sans"),
101 const double scale = 1.0,
103 const double text_spacing = 1.5,
104 const double text_kerning = 0.1 );
109 const std::string &str = std::string(
""),
110 const std::string &fontName = std::string(
"sans"),
111 const double scale = 1.0,
113 const double text_spacing = 1.5,
114 const double text_kerning = 0.1 );
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
void setFont(const std::string &font)
Changes the font name, among accepted values: "sans", "mono", "serif".
A renderizable object suitable for rendering with OpenGL's display lists.
const std::string & getString() const
Returns the currently text associated to this object.
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
TOpenGLFontStyle
Different style for vectorized font rendering.
double setTextKerning() const
void setTextKerning(const double text_kerning)
void setTextStyle(const mrpt::opengl::TOpenGLFontStyle text_style)
Change drawing style: FILL, OUTLINE, NICE.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
mrpt::opengl::TOpenGLFontStyle getTextStyle() const
Gets the current drawing style.
renders glyphs filled with antialiased outlines
A 3D text (rendered with OpenGL primitives), with selectable font face and drawing style...
const std::string & getFont() const
Returns the text font.
void setTextSpacing(const double text_spacing)
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE_LINKAGE(class_name, base_name, _LINKAGE_)
renders glyphs as filled polygons
double setTextSpacing() const