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