|
cgv
|
Render data for line geometry with support for the line_renderer. More...
#include <line_render_data.h>
Public Member Functions | |
| void | clear () |
| void | add_normal (const vec3 &normal) |
| void | add_width (const float width) |
| void | add_segment_normal (const vec3 &normal) |
| void | add_segment_width (const float width) |
| void | add_segment_color (const ColorType &color) |
| void | add (const vec3 &start_position, const vec3 &end_position) |
| void | add (const vec3 &start_position, const vec3 &end_position, const ColorType &color) |
| void | add (const vec3 &start_position, const vec3 &end_position, const vec3 &normal) |
| void | add (const vec3 &start_position, const vec3 &end_position, const float width) |
| void | add (const vec3 &start_position, const vec3 &end_position, const ColorType &color, const float width) |
| void | add (const float start_width, const float end_width) |
| void | add (const ColorType &start_color, const ColorType &end_color) |
| void | fill_normals (const vec3 &normal) |
| void | fill_widths (const float width) |
| void | add (const vec3 &position, const ColorType &color) |
| Public Member Functions inherited from cgv::render::render_data_base< line_renderer, line_render_style, rgb > | |
| size_t | size () |
| Return the number of stored positions. | |
| bool | empty () const |
| Return whether this render data is empty. | |
| void | clear () |
| Clear the stored data and set state out of date. | |
| void | set_out_of_date () |
| Notify the render data about state changes. | |
| size_t | render_count () |
| Return the number of vertices that will be rendered. | |
| const attribute_array_manager & | ref_attribute_array_manager () const |
| Constant access to the private attribute_array_manager. | |
| bool | init (context &ctx) |
| Initialize the attribute array manager and increase the reference count of the used renderer singleton. | |
| void | destruct (context &ctx) |
| Destruct the attribute array manager and decrease the reference count of the used renderer singleton. | |
| void | early_transfer (context &ctx, line_renderer &r) |
| Perform a transfer of the stored data to the attribute_array right now. | |
| bool | enable (context &ctx, line_renderer &r, const line_render_style &s) |
| Enable the render data for rendering. | |
| bool | disable (context &ctx, line_renderer &r) |
| Disable the renderer and attribute_array. | |
| void | draw (context &ctx, renderer &r, unsigned offset=0, int count=-1) |
| Draw the stored geometry using the given renderer. | |
| void | render (context &ctx, unsigned offset=0, int count=-1) |
| Render the stored geometry. | |
| void | add_index (const uint32_t index) |
| void | add_position (const vec3 &position) |
| void | add_color (const rgb &color) |
| void | add (const vec3 &position, const rgb &color) |
| void | fill_colors (const rgb &color) |
Public Attributes | |
| std::vector< vec3 > | normals |
| array of normals | |
| std::vector< float > | widths |
| array of widths | |
| Public Attributes inherited from cgv::render::render_data_base< line_renderer, line_render_style, rgb > | |
| line_render_style | style |
| the default render style | |
| std::vector< uint32_t > | indices |
| array of indices used for optional indexed rendering | |
| std::vector< vec3 > | positions |
| array of positions | |
| std::vector< rgb > | colors |
| array of colors | |
| cgv::data::optional< rgb > | const_color |
| optional constant color used for all elements | |
Protected Member Functions | |
| bool | transfer (context &ctx, line_renderer &r) override |
| See render_data_base::transfer. | |
| Protected Member Functions inherited from cgv::render::render_data_base< line_renderer, line_render_style, rgb > | |
| virtual void | set_const_attributes (context &ctx, line_renderer &r) |
| Set constant vertex attributes if present. | |
| void | fill (std::vector< T > &vector, const T &value) |
| Template for filling a member array to the size of the render data. | |
Render data for line geometry with support for the line_renderer.
See render_data_base.
| ColorType | The type used to represent colors. Must be cgv::render::rgb or cgv::render::rgba. |
Definition at line 12 of file line_render_data.h.
|
inline |
Definition at line 101 of file line_render_data.h.
|
inline |
Definition at line 96 of file line_render_data.h.
|
inline |
Definition at line 362 of file render_data_base.h.
|
inline |
Definition at line 70 of file line_render_data.h.
|
inline |
Definition at line 75 of file line_render_data.h.
|
inline |
Definition at line 90 of file line_render_data.h.
|
inline |
Definition at line 85 of file line_render_data.h.
|
inline |
Definition at line 80 of file line_render_data.h.
|
inline |
Definition at line 44 of file line_render_data.h.
|
inline |
Definition at line 62 of file line_render_data.h.
|
inline |
Definition at line 52 of file line_render_data.h.
|
inline |
Definition at line 57 of file line_render_data.h.
|
inline |
Definition at line 48 of file line_render_data.h.
|
inline |
Definition at line 38 of file line_render_data.h.
|
inline |
Definition at line 106 of file line_render_data.h.
|
inline |
Definition at line 110 of file line_render_data.h.
|
inlineoverrideprotectedvirtual |
See render_data_base::transfer.
Reimplemented from cgv::render::render_data_base< line_renderer, line_render_style, rgb >.
Definition at line 23 of file line_render_data.h.
References normals, cgv::render::render_data_base< line_renderer, line_render_style, ColorType >::transfer(), and widths.
| std::vector<vec3> cgv::render::line_render_data< ColorType >::normals |
| std::vector<float> cgv::render::line_render_data< ColorType >::widths |