393{
395
397 for (size_t i = 0; i < num_points; ++i) {
401 }
402
403 const size_t num_segments = num_points - 1;
404 const auto total_samples = static_cast<Eigen::Index>(
406
408
410
415 }
416
417 const auto count =
static_cast<size_t>(total_samples);
419 return;
420 }
421
423
424 const double* x = curve->data();
425 const double* y = x +
count;
426 const double* z = y +
count;
427
428 for (
size_t i = 0; i + 1 <
count; ++i) {
430 static_cast<float>(x[i]), static_cast<float>(y[i]), static_cast<float>(z[i])
431 };
433 static_cast<float>(x[i + 1]), static_cast<float>(y[i + 1]), static_cast<float>(z[i + 1])
434 };
435 }
436
438}
std::vector< glm::vec2 > * points
void reparameterize_planar(std::span< const double > points, size_t dim, Eigen::Index point_count, Eigen::Index num_samples, std::vector< double > &out)
Resample a polyline to uniform arc length, coordinate-major.
void evaluate_planar(std::span< const double > control_points, size_t dim, Eigen::Index num_samples, std::vector< double > &out)
Evaluate a curve into a coordinate-major buffer.
void configure(InterpolationMode mode, double tension)
Re-resolve the kernel.
std::vector< LineVertex > m_vertices
Kinesis::CurveEvaluator m_evaluator
std::vector< double > m_curve_primary
std::vector< double > m_control_scratch
std::vector< double > m_curve_secondary
void write_path_attributes(std::span< const LineVertex > points, size_t num_points)
Write colour and thickness for the interpolated path.
size_t m_samples_per_segment
Controls smoothness vs performance.
bool m_use_arc_length_reparameterization
Optional constant-speed.
Kinesis::InterpolationMode m_path_interpolation_mode