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;
288 return m_primitive_topology;
321#ifdef MAYAFLUX_PLATFORM_MACOS
322 std::vector<LineVertex> m_expand_cache;
325 glm::vec3 m_current_color { 1.0F, 1.0F, 1.0F };
326 float m_current_thickness { 2.0F };
328 bool m_force_uniform_color {};
329 bool m_force_uniform_thickness {};
330 bool m_geometry_dirty {
true };
331 bool m_arc_length_parameterization {};
332 bool m_attributes_dirty {};
335 static constexpr size_t INVALID_SEGMENT { std::numeric_limits<size_t>::max() };
336 size_t m_dirty_segment_start { INVALID_SEGMENT };
337 size_t m_dirty_segment_end { INVALID_SEGMENT };
340 [[nodiscard]]
size_t vertices_per_window()
const;
348 void write_curve_segment(
349 const std::vector<LineVertex>& curve_verts,
359 void write_segment_attributes(
360 const std::vector<LineVertex>& curve_verts,
365 void refresh_attributes();
367 void generate_path_vertices();
368 void generate_direct_path();
369 void generate_custom_path();
370 void generate_interpolated_path();
371 void regenerate_geometry();
372 void regenerate_segment_range(
size_t start_ctrl_idx,
size_t end_ctrl_idx);
374 void append_line_segment(
377 std::vector<LineVertex>&
output);
std::shared_ptr< Core::VKImage > output
Reusable interpolation state for callers evaluating many curves.
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)
std::array< double, 12 > m_segment_controls
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.
Kinesis::CurveEvaluator m_evaluator
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.
std::vector< LineVertex > m_control_points
Control points, newest first: index 0 is the most recently added.
size_t get_all_vertex_count() const
Get combined vertex count (control points + completed strokes + in-progress stroke)
Eigen::Index m_samples_per_segment
std::vector< LineVertex > m_completed_draws
CustomPathFunction m_custom_func
std::vector< LineVertex > m_vertices
std::vector< LineVertex > m_range_cache
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
size_t m_max_control_points
const glm::vec3 & get_path_color() const
Get current path color.
std::vector< double > m_curve_primary
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)