86 const Eigen::MatrixXd&)>;
96 bool auto_connect =
true,
97 size_t max_points = 256);
107 bool auto_connect =
true,
108 size_t max_points = 256);
122 void remove_point(
size_t index);
129 void update_point(
size_t index,
const LineVertex& point);
135 void set_points(
const std::vector<LineVertex>&
points);
147 void regenerate_topology();
159 void set_auto_connect(
bool enable);
165 void set_k_neighbors(
size_t k);
171 void set_connection_radius(
float radius);
178 void set_line_color(
const glm::vec3& color,
bool force_uniform =
true);
189 void force_uniform_color(
bool should_force);
201 void set_line_thickness(
float thickness,
bool force_uniform =
true);
207 void force_uniform_thickness(
bool should_force);
214 return m_points.size();
222 return m_connections.size();
230 return m_vertices.size();
236 [[nodiscard]]
const LineVertex& get_point(
size_t index)
const;
241 [[nodiscard]] std::vector<LineVertex> get_points()
const;
248 return m_connections;
254 void compute_frame()
override;
268 void set_samples_per_segment(
size_t samples);
276 void set_arc_length_reparameterization(
bool enable);
290 return m_primitive_topology;
302 size_t m_samples_per_segment { 20 };
303 bool m_use_arc_length_reparameterization {};
306 size_t m_k_neighbors { 3 };
307 float m_connection_radius { 1.0F };
309 glm::vec3 m_line_color { 1.0F, 1.0F, 1.0F };
310 float m_line_thickness { 1.0F };
312 bool m_force_uniform_color {};
313 bool m_force_uniform_thickness {};
315 void build_vertex_buffer();
317 void build_interpolated_path(
318 std::span<LineVertex>
points,
321 void build_direct_connections(std::span<LineVertex>
points,
size_t num_points);
323 Eigen::MatrixXd points_to_eigen()
const;
std::vector< glm::vec2 > * points
History buffer for difference equations and recursive relations.
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.
CustomConnectionFunction m_custom_func
glm::vec3 get_line_color() const
Get current line color.
std::vector< std::pair< size_t, size_t > > m_connections
size_t get_connection_count() const
Get connection count (edge count)
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.
Memory::HistoryBuffer< LineVertex > m_points
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)