98 Eigen::Index samples_per_segment = 32,
99 size_t max_control_points = 64,
100 double tension = 0.5);
110 Eigen::Index samples_per_segment = 32,
111 size_t max_control_points = 64);
120 void add_control_point(
const LineVertex& vertex);
138 void set_control_points(
const std::vector<LineVertex>& vertices);
145 void update_control_point(
size_t index,
const LineVertex& vertex);
152 [[nodiscard]]
LineVertex get_control_point(
size_t index)
const;
158 [[nodiscard]] std::vector<LineVertex> get_control_points()
const;
170 void set_path_color(
const glm::vec3& color,
bool force_uniform =
true);
176 void force_uniform_color(
bool should_force);
189 void set_path_thickness(
float thickness,
bool force_uniform =
true);
195 void force_uniform_thickness(
bool should_force);
201 [[nodiscard]]
const glm::vec3&
get_path_color()
const {
return m_current_color; }
220 void set_samples_per_segment(Eigen::Index samples);
226 void set_tension(
double tension);
232 void parameterize_arc_length(
bool enable);
262 [[nodiscard]]
const std::vector<LineVertex>&
get_all_vertices()
const {
return m_combined_cache; }
267 void compute_frame()
override;
289 return m_primitive_topology;
307 glm::vec3 m_current_color { 1.0F, 1.0F, 1.0F };
308 float m_current_thickness { 2.0F };
310 bool m_force_uniform_color {};
311 bool m_force_uniform_thickness {};
312 bool m_geometry_dirty {
true };
313 bool m_arc_length_parameterization {};
316 static constexpr size_t INVALID_SEGMENT { std::numeric_limits<size_t>::max() };
317 size_t m_dirty_segment_start { INVALID_SEGMENT };
318 size_t m_dirty_segment_end { INVALID_SEGMENT };
320 void generate_path_vertices();
321 void generate_direct_path();
322 void generate_custom_path();
323 void generate_interpolated_path();
324 void regenerate_geometry();
325 void regenerate_segment_range(
size_t start_ctrl_idx,
size_t end_ctrl_idx);
327 void generate_curve_segment(
328 const std::vector<LineVertex>& curve_verts,
330 std::vector<LineVertex>& output);
332 void append_line_segment(
335 std::vector<LineVertex>& output);
History buffer for difference equations and recursive relations.