mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(util): add wip C3Spline class to util
This commit is contained in:
parent
364fba9f34
commit
c59d0de8b5
20
src/util/C3Spline.cpp
Normal file
20
src/util/C3Spline.cpp
Normal 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
20
src/util/C3Spline.hpp
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user