Class cv::viz::Widget#

Base class of all widgets. Widget is implicitly shared.

Collaboration diagram for cv::viz::Widget:

Friends#

Return

Name

Description

struct

WidgetAccessor

Detailed Description#

Base class of all widgets. Widget is implicitly shared.

Constructor & Destructor Documentation#

Widget()#

cv::viz::Widget::Widget()

Widget()#

cv::viz::Widget::Widget(const Widget & other)

~Widget()#

cv::viz::Widget::~Widget()

Member Function Documentation#

cast()#

template<typename _W>
_W cv::viz::Widget::cast()

Casts a widget to another.

// Create a sphere widget
viz::WSphere sw(Point3f(0.0f,0.0f,0.0f), 0.5f);
// Cast sphere widget to cloud widget
viz::WCloud cw = sw.cast<viz::WCloud>();

Note

3D Widgets can only be cast to 3D Widgets. 2D Widgets can only be cast to 2D Widgets.

cast()#

Widget3D cv::viz::Widget::cast()

getRenderingProperty()#

double cv::viz::Widget::getRenderingProperty(int property)

Returns rendering property of the widget.

Rendering property can be one of the following:

  • POINT_SIZE

  • OPACITY

  • LINE_WIDTH

  • FONT_SIZE

  • AMBIENT

REPRESENTATION: Expected values are

  • REPRESENTATION_POINTS

  • REPRESENTATION_WIREFRAME

  • REPRESENTATION_SURFACE IMMEDIATE_RENDERING**:

  • Turn on immediate rendering by setting the value to 1.

  • Turn off immediate rendering by setting the value to 0.

SHADING: Expected values are

  • SHADING_FLAT

  • SHADING_GOURAUD

  • SHADING_PHONG

Parameters

  • property — Property.

operator=()#

Widget & cv::viz::Widget::operator=(const Widget & other)

setRenderingProperty()#

void cv::viz::Widget::setRenderingProperty(
int property,
double value )

Sets rendering property of the widget.

Rendering property can be one of the following:

  • POINT_SIZE

  • OPACITY

  • LINE_WIDTH

  • FONT_SIZE

REPRESENTATION: Expected values are

  • REPRESENTATION_POINTS

  • REPRESENTATION_WIREFRAME

  • REPRESENTATION_SURFACE

IMMEDIATE_RENDERING:

  • Turn on immediate rendering by setting the value to 1.

  • Turn off immediate rendering by setting the value to 0.

SHADING: Expected values are

  • SHADING_FLAT

  • SHADING_GOURAUD

  • SHADING_PHONG

Parameters

  • property — Property that will be modified.

  • value — The new value of the property.

fromPlyFile()#

static Widget cv::viz::Widget::fromPlyFile(const String & file_name)

Creates a widget from ply file.

Parameters

  • file_name — Ply file name.

Member Data Documentation#

impl_#

Impl * cv::viz::Widget::impl_

Source file#

The documentation for this class was generated from the following file: