6 #include "VectorMath.h"
18 Point3Spline(
const std::vector<v3>& points,
const std::vector<float>& splineParams,
float splineLength,
const Bounds3D& bounds);
19 const std::vector<v3>& Points()
const {
return m_points; }
20 const std::vector<float>& SplineParams()
const {
return m_splineParams; }
21 float SplineLength()
const {
return m_splineLength; }
22 int Count()
const {
return static_cast<int>(m_points.size()); }
23 const Bounds3D& Bounds()
const {
return m_bounds; }
25 v3 GetInterpolatedPoint(
float t)
const;
27 float DistanceToPoint(
const v3& point,
float& out_paramAtClosestApproach)
const;
29 float DistanceToLineSegment(
const v3& pointA,
const v3& pointB,
float& out_paramOnSpline,
float& paramOnLineSegment)
const;
31 float DistanceNearestPointToLineSegment(
const v3& pointA,
const v3& pointB,
float& out_paramOnSpline,
float& paramOnLineSegment)
const;
33 int IndexImmediatelyBefore(
float param)
const;
37 bool IntersectsCapsule(
const v3& capsulePointA,
const v3& capsulePointB,
const float capsuleRadius)
const;
39 v3 GetTangentAt(
float t)
const;
41 static Point3Spline* CreateFromPoints(
const std::vector<v3>& points);
42 static Point3Spline BuildFromPoints(
const std::vector<v3>& points);
47 std::vector<v3> m_points;
48 std::vector<float> m_splineParams;