NVIDIA IndeX API nvidia_logo_transpbg.gif Up
nv::index::ILine_set Class Referenceabstract

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...
 

Detailed Description

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).

Member Enumeration Documentation

 Cap_style

Available cap styles for the line rendering.

Enumerator
CAP_STYLE_FLAT 

flat

CAP_STYLE_SQUARE 

square

CAP_STYLE_ROUND 

round

 Line_style

Available line styles for the line rendering.

Enumerator
LINE_STYLE_SOLID 

solid

LINE_STYLE_DASHED 

dashed

LINE_STYLE_DOTTED 

dotted

LINE_STYLE_CENTER 

centered

LINE_STYLE_HIDDEN 

hidden

LINE_STYLE_PHANTOM 

phantom

LINE_STYLE_DASHDOT 

dashed with dots

LINE_STYLE_BORDER 

border

LINE_STYLE_DIVIDE 

divide

 Line_type

Available line types for the line rendering.

Enumerator
LINE_TYPE_SEGMENTS 

separated line segments

LINE_TYPE_PATH 

one connected line path

LINE_TYPE_LOOP 

one connected and closed line path

Member Function Documentation

 get_cap_style()

virtual Cap_style nv::index::ILine_set::get_cap_style ( ) const
pure virtual

Get the line cap style.

Returns
The cap style used by stylized lines.

 get_colors()

virtual const mi::math::Color_struct * nv::index::ILine_set::get_colors ( ) const
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 =

  • N ( LINE_TYPE_SEGMENTS, color per line segment )
  • N + 1 ( LINE_TYPE_PATH, color per vertex )
  • N ( LINE_TYPE_LOOP, color per vertex )
Returns
The pointer to the array of colors per segment/vertex.

 get_line_style()

virtual Line_style nv::index::ILine_set::get_line_style ( ) const
pure virtual

Get the line style.

The line styles can be solid or a dashed or dotted style.

Returns
The line style used by stylized lines.

 get_line_type()

virtual Line_type nv::index::ILine_set::get_line_type ( ) const
pure virtual

Get the line type.

look Line_style enum for details.

Returns
The line type.

 get_lines()

virtual const mi::math::Vector_struct< mi::Float32, 3 > * nv::index::ILine_set::get_lines ( ) const
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 =

  • 2 * N ( LINE_TYPE_SEGMENTS )
  • N + 1 ( LINE_TYPE_PATH )
  • N ( LINE_TYPE_LOOP )
Returns
The pointer to the array of line vertices.

 get_nb_colors()

virtual mi::Size nv::index::ILine_set::get_nb_colors ( ) const
pure virtual

Get number of color values.

Returns
The number of color values.

 get_nb_lines()

virtual mi::Size nv::index::ILine_set::get_nb_lines ( ) const
pure virtual

Get number of line segments.

Deprecated:
Returns
The number of line.

 get_nb_vertices()

virtual mi::Size nv::index::ILine_set::get_nb_vertices ( ) const
pure virtual

Get number of line vertices.

This is the size of the line vertices buffer.

Returns
The number of vertices of the line.

 get_nb_widths()

virtual mi::Size nv::index::ILine_set::get_nb_widths ( ) const
pure virtual

Get number of line segment width.

Returns
The number of line segment width.

 get_widths()

virtual const mi::Float32 * nv::index::ILine_set::get_widths ( ) const
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 =

  • N ( LINE_TYPE_SEGMENTS, width per line segment )
  • N + 1 ( LINE_TYPE_PATH, width per vertex )
  • N ( LINE_TYPE_LOOP, width per vertex )
Returns
The pointer to the array of widths per segment/vertex.

 set_cap_style()

virtual void nv::index::ILine_set::set_cap_style ( Cap_style  style)
pure virtual

Set the line cap style.

Parameters
[in]styleThe line cap style used by stylized lines.

 set_colors()

virtual void nv::index::ILine_set::set_colors ( mi::math::Color_struct *  colors,
mi::Size  nb_colors 
)
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 =

  • N ( LINE_TYPE_SEGMENTS, color per line segment )
  • N + 1 ( LINE_TYPE_PATH, color per vertex )
  • N ( LINE_TYPE_LOOP, color per vertex )
Parameters
[in]colorsThe pointer to the array of colors per segment/vertex.
[in]nb_colorsThe number of colors. The length of array.

 set_line_style()

virtual void nv::index::ILine_set::set_line_style ( Line_style  style)
pure virtual

Set the line style.

The line styles can be solid or a dashed or dotted style.

Parameters
[in]styleThe line style used by stylized lines.

 set_line_type()

virtual void nv::index::ILine_set::set_line_type ( Line_type  type)
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.

Parameters
[in]typeThe line type.

 set_lines()

virtual void nv::index::ILine_set::set_lines ( mi::math::Vector_struct< mi::Float32, 3 > *  line_vertices,
mi::Size  nb_line_vertices 
)
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 =

  • 2 * N ( LINE_TYPE_SEGMENTS )
  • N + 1 ( LINE_TYPE_PATH )
  • N ( LINE_TYPE_LOOP )
Parameters
[in]line_verticesThe pointer to the array of line vertices.
[in]nb_line_verticesThe number of line vertices.

 set_widths()

virtual void nv::index::ILine_set::set_widths ( mi::Float32 *  widths,
mi::Size  nb_widths 
)
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 =

  • N ( LINE_TYPE_SEGMENTS, width per line segment )
  • N + 1 ( LINE_TYPE_PATH, width per vertex )
  • N ( LINE_TYPE_LOOP, width per vertex )
Parameters
[in]widthsThe pointer to the array of widths.
[in]nb_widthsThe number of widths. The length of array.

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