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 AHLM_RELATIVE_TO_RADIUS = 1,
23 AHLM_RELATIVE_TO_LENGTH = 2,
24 AHLM_MINIMUM_OF_RADIUS_AND_LENGTH = 3
35 float radius_relative_to_length;
41 float head_length_relative_to_radius;
43 float head_length_relative_to_length;
49 bool normalize_length;
51 float relative_location_of_position;
64 bool position_is_center;
65 bool direction_is_end_point;
79 void set_direction_array(
const context& ctx,
const std::vector<T>& directions) { has_directions =
true; direction_is_end_point =
false; set_attribute_array(ctx,
"direction", directions); }
82 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,
"direction", directions, nr_elements, stride_in_bytes); }
84 void remove_direction_array(
const context& ctx);
87 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,
"direction", end_points); }
90 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,
"direction", end_points, nr_elements, stride_in_bytes); }
92 void remove_end_point_array(
const context& ctx);
94 bool validate_attributes(
const context& ctx)
const;
100 void draw(
context& ctx,
size_t start,
size_t count,
101 bool use_strips =
false,
bool use_adjacency =
false, uint32_t strip_restart_index = -1);
111#include <cgv/config/lib_end.h>
the self reflection handler is passed to the virtual self_reflect() method of cgv::base::base.
renderer that supports point splatting
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,...
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,...
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,...
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,...
attribute array manager used to upload arrays to gpu
base class for all drawables, which is independent of the used rendering API.
a shader program combines several shader code fragments to a complete definition of the shading pipel...
base classes for renderers that support surface rendering
std::map< std::string, std::string > shader_define_map
typedef for shader define map data structure
arrow_renderer & ref_arrow_renderer(context &ctx, int ref_count_change)
reference to a singleton surfel renderer that can be shared among drawables
ArrowHeadLengthMode
different modes to compute the head length of an arrow
this reflection traits implementation is used for external self_reflect implementations of instances ...
float head_radius_scale
scaling factor of head radius with respect to tail radius
float radius_lower_bound
smallest value for the radius
base class for all render styles