Go to the documentation of this file.
25 const std::
string& str, const std::
string& fontName, const
double scale,
27 const
double text_kerning)
31 str, fontName,
scale, text_style, text_spacing, text_kerning));
39 const double text_kerning)
42 m_text_style(text_style),
43 m_text_spacing(text_spacing),
44 m_text_kerning(text_kerning)
58 #if MRPT_HAS_OPENGL_GLUT
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
TOpenGLFontStyle
Different style for vectorized font rendering.
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
CRenderizable & setScale(float s)
Scale to apply to the object, in all three axes (default=1)
GLAPI void GLAPIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
mrpt::img::TPixelCoordf 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.
A renderizable object suitable for rendering with OpenGL's display lists.
void glSetFont(const std::string &fontname)
sets the font to use for future font rendering commands.
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated)
void render_dl() const override
Render.
std::shared_ptr< CRenderizable > Ptr
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void getBoundingBox(mrpt::math::TPoint3D &bb_min, mrpt::math::TPoint3D &bb_max) const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of th...
Virtual base class for "archives": classes abstracting I/O streams.
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference.
mrpt::img::TColor m_color
Color components in the range [0,255].
double x
X,Y,Z coordinates.
virtual ~CText3D()
Private, virtual destructor: only can be deleted from smart pointers.
TOpenGLFontStyle m_text_style
float m_scale_x
Scale components to apply to the object (default=1)
CText3D(const std::string &str=std::string(""), const std::string &fontName=std::string("sans"), const double scale=1.0, const mrpt::opengl::TOpenGLFontStyle text_style=mrpt::opengl::NICE, const double text_spacing=1.5, const double text_kerning=0.1)
Constructor.
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
GLenum GLenum GLenum GLenum GLenum scale
void composePoint(double lx, double ly, double lz, double &gx, double &gy, double &gz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dpose=nullptr, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dse3=nullptr, bool use_small_rot_approx=false) const
An alternative, slightly more efficient way of doing with G and L being 3D points and P this 6D pose...
std::shared_ptr< CText3D > Ptr
GLsizei const GLchar ** string
A 3D text (rendered with OpenGL primitives), with selectable font face and drawing style.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
void writeToStreamRender(mrpt::serialization::CArchive &out) const
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
The namespace for 3D scene representation and rendering.
void readFromStreamRender(mrpt::serialization::CArchive &in)
unsigned __int32 uint32_t
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at mié 12 jul 2023 10:03:34 CEST | |