class cv::viz::WText3D

Overview

This 3D Widget represents 3D text. The text always faces the camera. Moreā€¦

#include <widgets.hpp>

class WText3D: public cv::viz::Widget3D
{
public:
    // construction

    WText3D(
        const String& text,
        const Point3d& position,
        double text_scale = 1.,
        bool face_camera = true,
        const Color& color = Color::white()
        );

    // methods

    String
    getText() const;

    void
    setText(const String& text);
};

Inherited Members

public:
    // methods

    template <typename _W>
    _W
    cast();

    Widget2D
    cast();

    WWidgetMerger
    cast();

    double
    getRenderingProperty(int property) const;

    Widget&
    operator=(const Widget& other);

    void
    setRenderingProperty(
        int property,
        double value
        );

    static
    Widget
    fromPlyFile(const String& file_name);

    void
    applyTransform(const Affine3d& transform);

    Affine3d
    getPose() const;

    void
    setColor(const Color& color);

    void
    setPose(const Affine3d& pose);

    void
    updatePose(const Affine3d& pose);

Detailed Documentation

This 3D Widget represents 3D text. The text always faces the camera.

Construction

WText3D(
    const String& text,
    const Point3d& position,
    double text_scale = 1.,
    bool face_camera = true,
    const Color& color = Color::white()
    )

Constructs a WText3D.

Parameters:

text Text content of the widget.
position Position of the text.
text_scale Size of the text.
face_camera If true, text always faces the camera.
color Color of the text.

Methods

String
getText() const

Returns the current text content of the widget.

void
setText(const String& text)

Sets the text content of the widget.

Parameters:

text Text content of the widget.