3 #include "surface_renderer.h"
5 #include "gl/lib_begin.h"
9 class CGV_API arrow_renderer;
15 extern CGV_API arrow_renderer&
ref_arrow_renderer(context& ctx,
int ref_count_change = 0);
22 float radius_lower_bound;
25 float radius_relative_to_length;
29 float head_length_relative_to_radius;
31 float head_length_relative_to_length;
37 bool normalize_length;
39 float relative_location_of_position;
43 float inner_outer_lambda;
56 bool position_is_center;
57 bool direction_is_end_point;
69 void set_direction_array(
const context& ctx,
const std::vector<T>& directions) { has_directions =
true; direction_is_end_point =
false; set_attribute_array(ctx, ref_prog().get_attribute_location(ctx,
"direction"), directions); }
72 void set_direction_array(
const context& ctx,
const T* directions,
size_t nr_elements,
unsigned stride_in_bytes = 0) { has_directions =
true; direction_is_end_point =
false; set_attribute_array(ctx, ref_prog().get_attribute_location(ctx,
"direction"), directions, nr_elements, stride_in_bytes); }
75 void set_end_point_array(
const context& ctx,
const std::vector<T>& end_points) { has_directions =
true; direction_is_end_point =
true; set_attribute_array(ctx, ref_prog().get_attribute_location(ctx,
"direction"), end_points); }
78 void set_end_point_array(
const context& ctx,
const T* end_points,
size_t nr_elements,
unsigned stride_in_bytes = 0) { has_directions =
true; direction_is_end_point =
true; set_attribute_array(ctx, ref_prog().get_attribute_location(ctx,
"direction"), end_points, nr_elements, stride_in_bytes); }
82 bool validate_attributes(
const context& ctx)
const;
88 void draw(
context& ctx,
size_t start,
size_t count,
89 bool use_strips =
false,
bool use_adjacency =
false, uint32_t strip_restart_index = -1);
91 struct CGV_API arrow_render_style_reflect :
public arrow_render_style
99 #include <cgv/config/lib_end.h>
base class for all render styles
Definition: renderer.h:16
float head_radius_scale
scaling factor of head radius with respect to tail radius
Definition: arrow_renderer.h:27
void set_end_point_array(const context &ctx, const T *end_points, size_t nr_elements, unsigned stride_in_bytes=0)
templated method to set the end_point attribute from an array of end_points of type T,...
Definition: arrow_renderer.h:78
void set_end_point_array(const context &ctx, const std::vector< T > &end_points)
templated method to set the end_point attribute from a vector of end_points of type T,...
Definition: arrow_renderer.h:75
Definition: surface_renderer.h:26
attribute array manager used to upload arrays to gpu
Definition: renderer.h:21
Definition: reflection_handler.h:63
void set_direction_array(const context &ctx, const T *directions, size_t nr_elements, unsigned stride_in_bytes=0)
templated method to set the direction attribute from an array of directions of type T,...
Definition: arrow_renderer.h:72
void set_direction_array(const context &ctx, const std::vector< T > &directions)
templated method to set the direction attribute from a vector of directions of type T,...
Definition: arrow_renderer.h:69
arrow_renderer & ref_arrow_renderer(context &ctx, int ref_count_change)
reference to a singleton surfel renderer that can be shared among drawables
Definition: arrow_renderer.cxx:7
renderer that supports point splatting
Definition: arrow_renderer.h:53
base classes for renderers that support surface rendering
Definition: surface_renderer.h:43
this reflection traits implementation is used for external self_reflect implementations of instances ...
Definition: reflect_extern.h:28
the cgv namespace
Definition: vr_calib.cxx:9
Definition: context.h:525
Definition: arrow_renderer.h:19