85 const Eigen::MatrixXd&)>;
95 bool auto_connect =
true,
96 size_t max_points = 256);
106 bool auto_connect =
true,
107 size_t max_points = 256);
121 void remove_point(
size_t index);
134 void set_points(
const std::vector<LineVertex>&
points);
144 void add_points(std::span<const LineVertex>
points);
156 void regenerate_topology();
168 void set_auto_connect(
bool enable);
174 void set_k_neighbors(
size_t k);
180 void set_connection_radius(
float radius);
187 void set_line_color(
const glm::vec3& color,
bool force_uniform =
true);
198 void force_uniform_color(
bool should_force);
210 void set_line_thickness(
float thickness,
bool force_uniform =
true);
216 void force_uniform_thickness(
bool should_force);
223 return m_points.size();
231 return m_connections.size();
239 return m_vertices.size();
250 [[nodiscard]] std::vector<LineVertex> get_points()
const;
257 return m_connections;
263 void compute_frame()
override;
277 void set_samples_per_segment(
size_t samples);
285 void set_arc_length_reparameterization(
bool enable);
299 return m_primitive_topology;
319 size_t m_samples_per_segment { 20 };
320 bool m_use_arc_length_reparameterization {};
323 size_t m_k_neighbors { 3 };
324 float m_connection_radius { 1.0F };
326 glm::vec3 m_line_color { 1.0F, 1.0F, 1.0F };
327 float m_line_thickness { 1.0F };
329 bool m_force_uniform_color {};
330 bool m_force_uniform_thickness {};
331 bool m_geometry_dirty {
true };
332 bool m_attributes_dirty {};
341#ifdef MAYAFLUX_PLATFORM_MACOS
342 std::vector<LineVertex> m_expand_cache;
346 void refresh_positions();
349 void refresh_attributes();
356 void write_path_attributes(std::span<const LineVertex>
points,
size_t num_points);
358 void build_vertex_buffer();
360 void build_interpolated_path(
361 std::span<LineVertex>
points,
364 void build_direct_connections(std::span<LineVertex>
points,
size_t num_points);
std::vector< glm::vec2 > * points
Reusable interpolation state for callers evaluating many curves.
Base class for nodes that generate 3D geometry data.
std::vector< LineVertex > m_vertices
const std::vector< std::pair< size_t, size_t > > & get_connections() const
Get connection edges (pairs of point indices)
std::function< std::vector< std::pair< size_t, size_t > >(const Eigen::MatrixXd &)> CustomConnectionFunction
Portal::Graphics::PrimitiveTopology get_primitive_topology() const override
Get primitive topology for rendering.
Kinesis::CurveEvaluator m_evaluator
CustomConnectionFunction m_custom_func
glm::vec3 get_line_color() const
Get current line color.
std::vector< std::pair< size_t, size_t > > m_connections
std::vector< double > m_curve_primary
Eigen::MatrixXd m_positions
std::vector< double > m_control_scratch
size_t get_connection_count() const
Get connection count (edge count)
std::vector< double > m_curve_secondary
std::vector< LineVertex > m_points
Points, newest first: index 0 is the most recently added.
bool should_force_uniform_color() const
Check if uniform color is forced.
Kinesis::ProximityMode m_mode
size_t get_vertex_count() const
Get total vertex count (after interpolation)
size_t get_point_count() const
Get point count.
void set_primitive_topology(Portal::Graphics::PrimitiveTopology topology)
Set primitive topology for rendering.
Generates dynamic mesh topology from sparse control points.
InterpolationMode
Mathematical interpolation methods.
PrimitiveTopology
Vertex assembly primitive topology.
Vertex type for line primitives (LINE_LIST / LINE_STRIP topology)