MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ compute_arc_length()

MAYAFLUX_API double MayaFlux::Kinesis::compute_arc_length ( const Eigen::MatrixXd &  points)

Compute arc length of curve using trapezoidal rule.

Parameters
pointsColumns are sequential points along curve
Returns
Estimated arc length

Definition at line 887 of file MotionCurves.cpp.

888{
889 if (points.cols() < 2) {
890 return 0.0;
891 }
892
893 double length = 0.0;
894 for (Eigen::Index i = 1; i < points.cols(); ++i) {
895 length += (points.col(i) - points.col(i - 1)).norm();
896 }
897
898 return length;
899}
std::vector< glm::vec2 > * points

References compute_arc_length(), and points.

Referenced by compute_arc_length().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: