An example of line set that contains 3D line segments (stored as vertices in a array) and a color as well as as a line width/radius per line segment (per-segment attributes). More...
#include <attribute_line_set.h>
Public Member Functions | |
Attribute_line_set (const std::vector< mi::math::Vector_struct< mi::Float32, 3 > > &line_segments_vec, const std::vector< mi::Float32 > &attribute_vec) | |
constructor More... | |
Attribute_line_set () | |
Constructing the attribute line set shape for serialization. More... | |
void | set_attribute (std::vector< mi::Float32 > const &attribute_vec) |
set line attribute More... | |
virtual Cap_style | get_cap_style () const |
Get the line cap style. More... | |
virtual void | set_cap_style (Cap_style style) |
Set the line cap style. More... | |
virtual mi::Size | get_nb_lines () const |
Get number of line segment in this line set. More... | |
virtual mi::Size | get_nb_vertices () const |
Get number of line segment in this line set. More... | |
virtual const mi::math::Vector_struct< mi::Float32, 3 > * | get_lines () const |
Get the pointer to the array of line vertices (two vertices per line segment) More... | |
virtual mi::Size | get_nb_colors () const |
Get number of color values. More... | |
virtual const mi::math::Color_struct * | get_colors () const |
Get the pointer to the array of per-segment color values. More... | |
virtual mi::Size | get_nb_widths () const |
Get number of radii. More... | |
virtual const mi::Float32 * | get_widths () const |
Get the pointer to the array of per-segment widths (for rasterized lines) or radii (for ray traced cylinders). More... | |
virtual nv::index::ILine_set::Line_style | get_line_style () const |
Get the line style. More... | |
virtual nv::index::ILine_set::Line_type | get_line_type () const |
Get the line style. More... | |
virtual bool | get_pickable () const |
Each shape may be set pickable, i.e., the ray cast through the scene can intersect the shape. More... | |
virtual void | set_pickable (bool pickable) |
virtual void | set_enabled (bool is_enable) |
Set graphical representation can be enabled or disabled from rendering. More... | |
virtual bool | get_enabled () const |
get rendering mode More... | |
virtual void | set_meta_data (mi::neuraylib::Tag_struct tag) |
Each scene element can store additional user-defined meta data. More... | |
virtual mi::neuraylib::Tag_struct | get_meta_data () const |
Retrieve the scene element's reference to the user-defined meta data. More... | |
virtual mi::neuraylib::IElement * | copy () const |
virtual const char * | get_class_name () const |
virtual void | serialize (mi::neuraylib::ISerializer *serializer) const |
virtual void | deserialize (mi::neuraylib::IDeserializer *deserializer) |
virtual void | get_references (mi::neuraylib::ITag_set *result) const |
Protected Member Functions | |
mi::math::Color_struct | get_color_from_attribute (mi::Float32 attrib) |
attribute to color map example More... | |
mi::Float32 | get_width_from_attribute (mi::Float32 attrib) |
attribute to width map example More... | |
An example of line set that contains 3D line segments (stored as vertices in a array) and a color as well as as a line width/radius per line segment (per-segment attributes).
Definition at line 22 of file attribute_line_set.h.
Attribute_line_set::Attribute_line_set | ( | const std::vector< mi::math::Vector_struct< mi::Float32, 3 > > & | line_segments_vec, |
const std::vector< mi::Float32 > & | attribute_vec | ||
) |
constructor
[in] | line_segments_vec | coordinates vector of vertices |
[in] | attribute_vec | attribute vector of vertices. They are mapped to colors and radii. |
Definition at line 10 of file attribute_line_set.cpp.
|
inline |
Constructing the attribute line set shape for serialization.
Definition at line 36 of file attribute_line_set.h.
|
virtual |
Definition at line 120 of file attribute_line_set.cpp.
|
virtual |
Definition at line 157 of file attribute_line_set.cpp.
|
virtual |
Get the line cap style.
Definition at line 45 of file attribute_line_set.cpp.
|
virtual |
Definition at line 135 of file attribute_line_set.cpp.
|
protected |
attribute to color map example
[in] | attrib | attribute value |
Definition at line 177 of file attribute_line_set.cpp.
|
virtual |
Get the pointer to the array of per-segment color values.
Definition at line 77 of file attribute_line_set.cpp.
|
virtual |
get rendering mode
Definition at line 114 of file attribute_line_set.cpp.
|
virtual |
Get the line style.
The line styles can be solid or a dashed or dotted style.
Definition at line 95 of file attribute_line_set.cpp.
|
virtual |
Get the line style.
The line styles can be solid or a dashed or dotted style.
Definition at line 102 of file attribute_line_set.cpp.
|
virtual |
Get the pointer to the array of line vertices (two vertices per line segment)
Definition at line 68 of file attribute_line_set.cpp.
|
inlinevirtual |
Retrieve the scene element's reference to the user-defined meta data.
Definition at line 157 of file attribute_line_set.h.
|
inlinevirtual |
Get number of color values.
Definition at line 84 of file attribute_line_set.h.
|
virtual |
Get number of line segment in this line set.
Definition at line 56 of file attribute_line_set.cpp.
|
virtual |
Get number of line segment in this line set.
Definition at line 62 of file attribute_line_set.cpp.
|
inlinevirtual |
Get number of radii.
Definition at line 96 of file attribute_line_set.h.
|
inlinevirtual |
Each shape may be set pickable, i.e., the ray cast through the scene can intersect the shape.
The intersection information will be returned by the pick operation.
Definition at line 125 of file attribute_line_set.h.
|
inlinevirtual |
Definition at line 166 of file attribute_line_set.h.
|
protected |
attribute to width map example
[in] | attrib | attribute value |
Definition at line 191 of file attribute_line_set.cpp.
|
virtual |
Get the pointer to the array of per-segment widths (for rasterized lines) or radii (for ray traced cylinders).
Definition at line 86 of file attribute_line_set.cpp.
|
virtual |
Definition at line 141 of file attribute_line_set.cpp.
void Attribute_line_set::set_attribute | ( | std::vector< mi::Float32 > const & | attribute_vec | ) |
set line attribute
[in] | attribute_vec | attribute vec for line segments |
Definition at line 25 of file attribute_line_set.cpp.
|
virtual |
Set the line cap style.
[in] | style | The line cap style used by stylized lines. |
Definition at line 50 of file attribute_line_set.cpp.
|
virtual |
Set graphical representation can be enabled or disabled from rendering.
[in] | is_enable | true when rendering is enabled. |
Definition at line 108 of file attribute_line_set.cpp.
|
inlinevirtual |
Each scene element can store additional user-defined meta data.
Meta data, for instance, may include a string representing the scene element's name or domain specific attributes. A class that represents meta data has to be a database element and the scene element then referes to the database element by means of a tag.
[in] | tag | The tag that refers to the user-defined meta data associated with the scene element. |
Definition at line 150 of file attribute_line_set.h.
|
inlinevirtual |
Definition at line 126 of file attribute_line_set.h.