97 Eigen::Index samples_per_segment = 32,
98 size_t max_control_points = 64,
99 double tension = 0.5);
109 Eigen::Index samples_per_segment = 32,
110 size_t max_control_points = 64);
119 void add_control_point(
const LineVertex& vertex);
137 void set_control_points(
const std::vector<LineVertex>& vertices);
157 [[nodiscard]] std::vector<LineVertex> get_control_points()
const;
169 void set_path_color(
const glm::vec3&
color,
bool force_uniform =
true);
175 void force_uniform_color(
bool should_force);
188 void set_path_thickness(
float thickness,
bool force_uniform =
true);
194 void force_uniform_thickness(
bool should_force);
200 [[nodiscard]]
const glm::vec3&
get_path_color()
const {
return m_current_color; }
219 void set_samples_per_segment(Eigen::Index samples);
225 void set_tension(
double tension);
231 void parameterize_arc_length(
bool enable);
261 [[nodiscard]]
const std::vector<LineVertex>&
get_all_vertices()
const {
return m_combined_cache; }
266 void compute_frame()
override;
305 glm::vec3 m_current_color { 1.0F, 1.0F, 1.0F };
306 float m_current_thickness { 2.0F };
308 bool m_force_uniform_color {};
309 bool m_force_uniform_thickness {};
310 bool m_geometry_dirty {
true };
311 bool m_path_dirty {
true };
312 bool m_arc_length_parameterization {};
313 bool m_attributes_dirty {};
315 static constexpr size_t INVALID_SEGMENT { std::numeric_limits<size_t>::max() };
316 size_t m_dirty_segment_start { INVALID_SEGMENT };
317 size_t m_dirty_segment_end { INVALID_SEGMENT };
320 [[nodiscard]]
size_t vertices_per_window()
const;
328 void write_curve_segment(
329 const std::vector<LineVertex>& curve_verts,
339 void write_segment_attributes(
340 const std::vector<LineVertex>& curve_verts,
345 void refresh_attributes();
347 void generate_path_vertices();
348 void generate_direct_path();
349 void generate_custom_path();
350 void generate_interpolated_path();
351 void regenerate_geometry();
352 void regenerate_segment_range(
size_t first_window,
size_t last_window);
354 void append_line_segment(
357 std::vector<LineVertex>& output);