Interface class for line geometry, which is a scene element and can be added to the scene description. More...
#include <iline_set.h>
Inherits mi::base::Interface_declare< 0xdd11bb4e, ... >.
Public Types | |
enum | Line_type { LINE_TYPE_SEGMENTS = 0 , LINE_TYPE_PATH = 1 , LINE_TYPE_LOOP = 2 } |
Available line types for the line rendering. More... | |
enum | Line_style { LINE_STYLE_SOLID = 0 , LINE_STYLE_DASHED = 1 , LINE_STYLE_DOTTED = 2 , LINE_STYLE_CENTER = 3 , LINE_STYLE_HIDDEN = 4 , LINE_STYLE_PHANTOM = 5 , LINE_STYLE_DASHDOT = 6 , LINE_STYLE_BORDER = 7 , LINE_STYLE_DIVIDE = 8 } |
Available line styles for the line rendering. More... | |
enum | Cap_style { CAP_STYLE_FLAT = 0 , CAP_STYLE_SQUARE = 1 , CAP_STYLE_ROUND = 2 } |
Available cap styles for the line rendering. More... | |
Public Member Functions | |
virtual Line_type | get_line_type () const =0 |
Get the line type. More... | |
virtual void | set_line_type (Line_type type)=0 |
Set the line type. More... | |
virtual Line_style | get_line_style () const =0 |
Get the line style. More... | |
virtual void | set_line_style (Line_style style)=0 |
Set the line style. More... | |
virtual Cap_style | get_cap_style () const =0 |
Get the line cap style. More... | |
virtual void | set_cap_style (Cap_style style)=0 |
Set the line cap style. More... | |
virtual mi::Size | get_nb_lines () const =0 |
Get number of line segments. More... | |
virtual mi::Size | get_nb_vertices () const =0 |
Get number of line vertices. More... | |
virtual const mi::math::Vector_struct< mi::Float32, 3 > * | get_lines () const =0 |
Get the pointer to the array of line vertices (points). More... | |
virtual void | set_lines (mi::math::Vector_struct< mi::Float32, 3 > *line_vertices, mi::Size nb_line_vertices)=0 |
Set the line vertices (points). More... | |
virtual const mi::math::Color_struct * | get_colors () const =0 |
Get the pointer to the array of colors per segment/vertex. More... | |
virtual mi::Size | get_nb_colors () const =0 |
Get number of color values. More... | |
virtual void | set_colors (mi::math::Color_struct *colors, mi::Size nb_colors)=0 |
Set the pointer to the array of colors per segment/vertex. More... | |
virtual const mi::Float32 * | get_widths () const =0 |
Get the pointer to the array of widths per segment/vertex. More... | |
virtual mi::Size | get_nb_widths () const =0 |
Get number of line segment width. More... | |
virtual void | set_widths (mi::Float32 *widths, mi::Size nb_widths)=0 |
Set the pointer to the array of widths per segment/vertex. More... | |
Interface class for line geometry, which is a scene element and can be added to the scene description.
A line set is a set of line segments. Each segment has its own color and width/radius.
Applications can derive from the interface class to implement user-defined line geometry that may have arbitrary (per-segment) attributes that impact the rendering attributes (such as 3D position, color and width/radius).
|
pure virtual |
Get the line cap style.
|
pure virtual |
Get the pointer to the array of colors per segment/vertex.
It depends on the line type:
if N = number of line segments, then
number of colors =
|
pure virtual |
Get the line style.
The line styles can be solid or a dashed or dotted style.
|
pure virtual |
Get the line type.
look Line_style enum for details.
|
pure virtual |
Get the pointer to the array of line vertices (points).
The number of vertices depend on the line type:
if N = number of line segments, then
number of vertices =
|
pure virtual |
Get number of color values.
|
pure virtual |
|
pure virtual |
Get number of line vertices.
This is the size of the line vertices buffer.
|
pure virtual |
Get number of line segment width.
|
pure virtual |
Get the pointer to the array of widths per segment/vertex.
It depends on the line type:
if N = number of line segments, then
number of widths =
|
pure virtual |
Set the line cap style.
[in] | style | The line cap style used by stylized lines. |
|
pure virtual |
Set the pointer to the array of colors per segment/vertex.
It depends on the line type:
if N = number of line segments, then
number of colors =
[in] | colors | The pointer to the array of colors per segment/vertex. |
[in] | nb_colors | The number of colors. The length of array. |
|
pure virtual |
Set the line style.
The line styles can be solid or a dashed or dotted style.
[in] | style | The line style used by stylized lines. |
|
pure virtual |
Set the line type.
look Line_style enum for details. The application needs to call this once for initialization. Once a line_type was set, a change is not supported.
[in] | type | The line type. |
|
pure virtual |
Set the line vertices (points).
The number of vertices depend on the line type:
if N = number of line segments, then
number of vertices =
[in] | line_vertices | The pointer to the array of line vertices. |
[in] | nb_line_vertices | The number of line vertices. |
|
pure virtual |
Set the pointer to the array of widths per segment/vertex.
It depends on the line type:
if N = number of line segments, then
number of widths =
[in] | widths | The pointer to the array of widths. |
[in] | nb_widths | The number of widths. The length of array. |