23 float point_size = 1.0f;
25 bool use_group_point_size =
false;
27 bool measure_point_size_in_pixel =
true;
29 bool screen_aligned =
true;
35 float default_depth_offset = 0.0f;
37 float blend_width_in_pixel = 1.0f;
39 float halo_width_in_pixel = 0.0f;
41 float percentual_halo_width = 0.0f;
43 rgba halo_color = { 1.0f };
45 float halo_color_strength = 0.5f;
47 bool blend_points =
true;
54 bool has_point_sizes =
false;
55 bool has_group_point_sizes =
false;
56 bool has_indexed_colors =
false;
57 bool has_depth_offsets =
false;
58 float reference_point_size = 0.01f;
59 float y_view_angle = 45.0f;
70 void set_reference_point_size(
float _reference_point_size);
72 void set_y_view_angle(
float y_view_angle);
74 template <
typename T =
float>
75 void set_point_size_array(
const context& ctx,
const std::vector<T>& point_sizes) { has_point_sizes =
true; set_attribute_array(ctx,
"point_size", point_sizes); }
77 void remove_point_size_array(
const context& ctx);
79 template <
typename T =
float>
80 void set_depth_offset_array(
const context& ctx,
const std::vector<T>& depth_offsets) { has_depth_offsets =
true; set_attribute_array(ctx,
"depth_offset", depth_offsets); }
82 void remove_depth_offset_array(
const context& ctx);
84 template <
typename T =
unsigned,
typename C = cgv::media::color<
float,cgv::media::RGB,cgv::media::OPACITY> >
85 void set_indexed_color_array(
const context& ctx,
const std::vector<T>& color_indices,
const std::vector<C>& palette) {
86 has_indexed_colors =
true;
87 set_attribute_array(ctx,
"color_index", color_indices);
88 ref_prog().set_uniform_array(ctx,
"palette", palette);
91 void remove_indexed_color_array(
const context& ctx);
93 template <
typename T =
float>
94 void set_group_point_sizes(
const context& ctx,
const std::vector<T>& group_point_sizes) { has_group_point_sizes =
true; ref_prog().set_uniform_array(ctx,
"group_point_sizes", group_point_sizes); }
96 bool validate_attributes(
const context& ctx)
const override;
98 bool enable(context& ctx)
override;
100 bool disable(context& ctx)
override;
102 void draw(context& ctx,
size_t start,
size_t count,
103 bool use_strips =
false,
bool use_adjacency =
false, uint32_t strip_restart_index = -1)
override;
base class for all drawables, which is independent of the used rendering API.