A label defined in image space.
More...
#include <ilabel.h>
Inherits mi::base::Interface_declare< 0x641854bd, ... >.
|
virtual const char * | get_text () const =0 |
| Get the text of the label. More...
|
|
virtual void | set_text (const char *text)=0 |
| The Set text of the label. More...
|
|
virtual void | set_geometry (const mi::math::Vector_struct< mi::Float32, 3 > &position, const mi::math::Vector_struct< mi::Float32, 2 > &right_vector, const mi::math::Vector_struct< mi::Float32, 2 > &up_vector, mi::Float32 height, mi::Float32 width=-1.f)=0 |
| The position and orientation in object space is defined by an anchor point that lies inside plane that the label lies in and defines the label's lower left corner, the normal vector perpendicular to the label, and the up vector. More...
|
|
virtual void | get_geometry (mi::math::Vector_struct< mi::Float32, 3 > &position, mi::math::Vector_struct< mi::Float32, 2 > &right_vector, mi::math::Vector_struct< mi::Float32, 2 > &up_vector, mi::Float32 &height, mi::Float32 &width) const =0 |
| The position and orientation in object space is defined by an anchor point that lies inside plane the label lies in and defines the label's lower left corner, the right and up vectors to the label, and the up vector. More...
|
|
virtual mi::Float32 | compute_label_width (const IFont *font, const ILabel_layout *layout) const =0 |
| Compute the width of the label based on the given font. More...
|
|
A label defined in image space.
The label always faces towards the viewer, i.e., the label is parallel to the view plane. ILabel_2D is a part of the scene description. The dimension (position, height, ...) is defined in the 2D image space (2D screen space).
◆ compute_label_width()
virtual mi::Float32 nv::index::ILabel_2D::compute_label_width |
( |
const IFont * |
font, |
|
|
const ILabel_layout * |
layout |
|
) |
| const |
|
pure virtual |
Compute the width of the label based on the given font.
- Parameters
-
[in] | font | The font based on which the label width shall be computed. |
[in] | layout | The label layout used by this label. |
- Returns
- Returns the computed width of the label in image space.
◆ get_geometry()
virtual void nv::index::ILabel_2D::get_geometry |
( |
mi::math::Vector_struct< mi::Float32, 3 > & |
position, |
|
|
mi::math::Vector_struct< mi::Float32, 2 > & |
right_vector, |
|
|
mi::math::Vector_struct< mi::Float32, 2 > & |
up_vector, |
|
|
mi::Float32 & |
height, |
|
|
mi::Float32 & |
width |
|
) |
| const |
|
pure virtual |
The position and orientation in object space is defined by an anchor point that lies inside plane the label lies in and defines the label's lower left corner, the right and up vectors to the label, and the up vector.
The direction that the normal points to defines the front face of the label that displays the text.
- Parameters
-
[out] | position | The position defines the lower left corner of the label. |
[out] | right_vector | The right vector of the label together with the up vector defines the orientation of the label in 2D space. |
[out] | up_vector | The up vector of the label together with the right vector defines the orientation of the label in 2D space. |
[in] | height | The height of the label along the up vector in image space. The size is defined in the 2D image space. (pixels) |
[in] | width | The width of the label along the right vector in image space. The size is defined in the 2D image space. (pixels) |
◆ get_text()
virtual const char * nv::index::ILabel_2D::get_text |
( |
| ) |
const |
|
pure virtual |
Get the text of the label.
- Returns
- The text of the label.
◆ set_geometry()
virtual void nv::index::ILabel_2D::set_geometry |
( |
const mi::math::Vector_struct< mi::Float32, 3 > & |
position, |
|
|
const mi::math::Vector_struct< mi::Float32, 2 > & |
right_vector, |
|
|
const mi::math::Vector_struct< mi::Float32, 2 > & |
up_vector, |
|
|
mi::Float32 |
height, |
|
|
mi::Float32 |
width = -1.f |
|
) |
| |
|
pure virtual |
The position and orientation in object space is defined by an anchor point that lies inside plane that the label lies in and defines the label's lower left corner, the normal vector perpendicular to the label, and the up vector.
- Parameters
-
[in] | position | The position defines the lower left corner of the label. |
[in] | right_vector | The right vector of the label together with the up vector defines the orientation of the label in 2D image space. |
[in] | up_vector | The up vector of the label together with the right vector defines the orientation of the label in 2D image space. |
[in] | height | The height of the label along the up vector in image space. The size is defined in the 2D image space. (pixels) |
[in] | width | The width of the label along the right vector in image space. If the width is not set (or set to a negative value) then the width of the label will be computed automatically by the rendering system. The size is defined in the 2D image space. (pixels) |
◆ set_text()
virtual void nv::index::ILabel_2D::set_text |
( |
const char * |
text | ) |
|
|
pure virtual |
The Set text of the label.
- Parameters
-
text | The text of the label. |
The documentation for this class was generated from the following file: