Class CText
Defined in File CText.h
Inheritance Relationships
Base Type
public mrpt::viz::CVisualObject(Class CVisualObject)
Class Documentation
-
class CText : public mrpt::viz::CVisualObject
A 2D text that always “faces the observer” despite it having a real 3D position, used to compute its position on the screen, and depth (so it can be occluded).
Use setString() and setFont() to change the text and its appareance.

See also
CText3D, opengl::Scene
Public Functions
-
inline void setString(const std::string &s)
Sets the text to display
-
inline std::string getString() const
Return the current text associated to this label
-
inline void setFont(const std::string &s, int height)
Sets the font among “sans”, “serif”, “mono”.
-
inline std::string getFont() const
-
virtual mrpt::math::TBoundingBoxf internalBoundingBoxLocal() const override
Evaluates the bounding box of this object (including possible children) in the coordinate frame of the object parent.
-
inline CText(const std::string &str = std::string(""))
Constructor
-
virtual ~CText() override
-
std::pair<double, double> computeTextExtension() const
-
virtual void toYAMLMap(mrpt::containers::yaml &propertiesMap) const override
Used from Scene::asYAML().
Note
(New in MRPT 2.4.2)
-
inline void setString(const std::string &s)