feat(util): add wip C3Spline class to util

This commit is contained in:
fallenoak 2026-01-12 19:45:31 -06:00
parent 364fba9f34
commit c59d0de8b5
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 40 additions and 0 deletions

20
src/util/C3Spline.cpp Normal file
View File

@ -0,0 +1,20 @@
#include "util/C3Spline.hpp"
#include <tempest/vector/C3Vector.hpp>
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;
}

20
src/util/C3Spline.hpp Normal file
View File

@ -0,0 +1,20 @@
#ifndef UTIL_C3_SPLINE_HPP
#define UTIL_C3_SPLINE_HPP
#include <common/DataStore.hpp>
// 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