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);
std::shared_ptr< Core::VKImage > output
History buffer for difference equations and recursive relations.
Base class for nodes that generate 3D geometry data.
const std::vector< LineVertex > & get_all_vertices() const
Get all generated vertices (control points + completed strokes + in-progress stroke)
const float & get_path_thickness() const
Get current path thickness.
std::vector< LineVertex > m_draw_window
bool should_force_uniform_color() const
Check if uniform color mode is enabled.
size_t get_control_point_capacity() const
Get maximum control point capacity.
void set_primitive_topology(Portal::Graphics::PrimitiveTopology topology)
Set primitive topology for rendering.
Kinesis::InterpolationMode m_mode
std::function< glm::vec3(std::span< const LineVertex >, double)> CustomPathFunction
size_t get_generated_vertex_count() const
Get number of generated vertices.
size_t get_all_vertex_count() const
Get combined vertex count (control points + completed strokes + in-progress stroke)
Eigen::Index m_samples_per_segment
Memory::HistoryBuffer< LineVertex > m_control_points
std::vector< LineVertex > m_completed_draws
CustomPathFunction m_custom_func
std::vector< LineVertex > m_vertices
size_t get_control_point_count() const
Get number of control points currently stored.
std::vector< LineVertex > m_draw_vertices
Portal::Graphics::PrimitiveTopology get_primitive_topology() const override
Get primitive topology for rendering.
std::vector< LineVertex > m_combined_cache
const glm::vec3 & get_path_color() const
Get current path color.
Generates dense vertex paths from sparse control points or freehand drawing.
InterpolationMode
Mathematical interpolation methods.
PrimitiveTopology
Vertex assembly primitive topology.
Vertex type for line primitives (LINE_LIST / LINE_STRIP topology)