10#include <framework/geometry/B2Vector3.h>
24 if (measurements.size() < 3)
return 0;
25 float sumOfCurvature = 0.;
26 for (
unsigned int i = 0; i < measurements.size() - 2; ++i) {
27 B2Vector3D ab = measurements.
at(i + 1)->getPosition() - measurements.at(i)->getPosition();
29 B2Vector3D bc = measurements.
at(i + 2)->getPosition() - measurements.at(i + 1)->getPosition();
34 return (0 < sumOfCurvature) - (sumOfCurvature < 0);
B2Vector3< DataType > Orthogonal() const
Vector orthogonal to this one.
void SetZ(DataType z)
set Z/3rd-coordinate
DataType at(unsigned i) const
safe member access (with boundary check!)
short calcCurvatureSignum(std::vector< SpacePoint const * > const &measurements)
Calculate curvature based on triplets of measurements.
Abstract base class for different kinds of events.