MayaFlux 1.0.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 1027 of file MotionCurves.cpp.

1028{
1029 if (points.cols() < 2) {
1030 return 0.0;
1031 }
1032
1033 double length = 0.0;
1034 for (Eigen::Index i = 1; i < points.cols(); ++i) {
1035 length += (points.col(i) - points.col(i - 1)).norm();
1036 }
1037
1038 return length;
1039}
uint64_t length
Definition Composite.cpp:11
std::vector< glm::vec2 > * points

References compute_arc_length(), length, and points.

Referenced by compute_arc_length().

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