6 #include "VectorMath.h"
15 namespace TimeParameterizationMethod
24 bool TryParseTimeParameterizationMethod(
const std::string& s, TimeParameterizationMethod::Values& out_value);
25 std::string ToString(
const TimeParameterizationMethod::Values value);
31 : Position(dv3::Zero())
49 void SetTimeParameterizationMethod(TimeParameterizationMethod::Values method);
51 void GetInterpolatedPositionInPlace(
double t,
dv3& out_position)
const;
54 int GetNumberOfPoints()
const {
return static_cast<int>(m_points.size()); }
55 const std::vector<CatmullRomSplinePoint>& GetPoints()
const {
return m_points; }
57 void AddPoint(
dv3 position);
58 void RemovePoint(
int index);
59 void RemoveLastPoint();
64 void RecalculateTimeParameters();
65 void RecalculateUniformTimeParameters();
66 void RecalculateEuclidianDistanceTimeParameters(
bool useCentripetal);
67 int GetPointIndexForT(
double t)
const;
68 void GetRelevantPointsForTime(
double t,
73 double& localT)
const;
75 TimeParameterizationMethod::Values m_timeParameterizationMethod;
76 std::vector<CatmullRomSplinePoint> m_points;
78 std::vector<double> m_scratchDoubles;