Adds handling to the path manager so it can deal with both looping and non-looping paths

This commit is contained in:
Areloch 2020-11-02 23:26:50 -06:00
parent 036c7c2c75
commit 0a962342ac
3 changed files with 128 additions and 12 deletions

View file

@ -49,6 +49,7 @@ class PathManager
private:
struct PathEntry {
U32 totalTime;
bool looping;
Vector<Point3F> positions;
Vector<QuatF> rotations;
@ -85,6 +86,8 @@ class PathManager
U32 getPathTotalTime(const U32 id) const;
U32 getPathNumWaypoints(const U32 id) const;
U32 getWaypointTime(const U32 id, const U32 wayPoint) const;
F64 getClosestTimeToPoint(const U32 id, const Point3F p);
F64 getClosestTimeToPoint(const U32 id, const Point3F p, const F64 tMin, const F64 tMax);
U32 getPathTimeBits(const U32 id);
U32 getPathWaypointBits(const U32 id);
@ -97,7 +100,7 @@ class PathManager
void transmitPath(U32);
U32 allocatePathId();
void updatePath(const U32 id, const Vector<Point3F>&, const Vector<QuatF>&, const Vector<U32> &, const Vector<U32>&);
void updatePath(const U32 id, const Vector<Point3F>&, const Vector<QuatF>&, const Vector<U32>&, const Vector<U32>&, const bool looping);
//-------------------------------------- State dumping/reading
public: