diff --git a/src/util/C3Spline.cpp b/src/util/C3Spline.cpp new file mode 100644 index 0000000..e9c8e48 --- /dev/null +++ b/src/util/C3Spline.cpp @@ -0,0 +1,20 @@ +#include "util/C3Spline.hpp" +#include + +CDataStore& operator>>(CDataStore& msg, C3Spline_CatmullRom& spline) { + uint32_t pointCount = 0; + msg.Get(pointCount); + + void* points; + msg.GetDataInSitu(points, sizeof(C3Vector) * pointCount); + + uint8_t splineMode; + msg.Get(splineMode); + // TODO spline.splineMode = splineMode; + + if (pointCount && msg.IsValid()) { + // TODO spline.SetPoints() + } + + return msg; +} diff --git a/src/util/C3Spline.hpp b/src/util/C3Spline.hpp new file mode 100644 index 0000000..8a1c170 --- /dev/null +++ b/src/util/C3Spline.hpp @@ -0,0 +1,20 @@ +#ifndef UTIL_C3_SPLINE_HPP +#define UTIL_C3_SPLINE_HPP + +#include + +// TODO move these classes to typhoon +class C3Spline { + public: + // TODO +}; + +class C3Spline_CatmullRom : public C3Spline { + public: + // TODO +}; + +// TODO move this operator>> to util/DataStore.hpp +CDataStore& operator>>(CDataStore& msg, C3Spline_CatmullRom& spline); + +#endif