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 TOpenGLFontStyle m_text_style
#define IMPLEMENTS_SERIALIZABLE(class_name, base, NameSpace)
This must be inserted in all CSerializable classes implementation files.
GLenum GLenum GLenum GLenum GLenum scale
virtual ~CText3D()
Private, virtual destructor: only can be deleted from smart pointers.
uint8_t serializeGetVersion() const override
Must return the current versioning number of the object.
EIGEN_STRONG_INLINE void notifyChange() const
Must be called to notify that the object has changed (so, the display list must be updated) ...
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.
void glSetFont(const std::string &fontname)
sets the font to use for future font rendering commands.
mrpt::poses::CPose3D m_pose
6D pose wrt the parent coordinate reference.
std::shared_ptr< CText3D > Ptr
A renderizable object suitable for rendering with OpenGL's display lists.
#define MRPT_THROW_UNKNOWN_SERIALIZATION_VERSION(__V)
For use in CSerializable implementations.
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.
float m_scale_x
Scale components to apply to the object (default=1)
void writeToStreamRender(mrpt::serialization::CArchive &out) const
TOpenGLFontStyle
Different style for vectorized font rendering.
void serializeTo(mrpt::serialization::CArchive &out) const override
Pure virtual method for writing (serializing) to an abstract archive.
double x
X,Y,Z coordinates.
CRenderizable & setScale(float s)
Scale to apply to the object, in all three axes (default=1)
GLsizei const GLchar ** string
GLAPI void GLAPIENTRY glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
mrpt::img::TColor m_color
Color components in the range [0,255].
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Virtual base class for "archives": classes abstracting I/O streams.
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...
A 3D text (rendered with OpenGL primitives), with selectable font face and drawing style...
The namespace for 3D scene representation and rendering.
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...
void serializeFrom(mrpt::serialization::CArchive &in, uint8_t serial_version) override
Pure virtual method for reading (deserializing) from an abstract archive.
void render_dl() const override
Render.
unsigned __int32 uint32_t
void readFromStreamRender(mrpt::serialization::CArchive &in)