2023-01-23 08:02:13 +01:00
|
|
|
#ifndef TRAJECTORY_H
|
|
|
|
#define TRAJECTORY_H
|
|
|
|
|
|
|
|
#include <cstdint>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <num/num.h>
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
#include "point2D.h"
|
|
|
|
|
|
|
|
|
|
|
|
class Trajectory
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Trajectory( );
|
|
|
|
~Trajectory( );
|
|
|
|
|
2023-01-23 22:03:09 +01:00
|
|
|
void AddPoint( Point2D *p );
|
|
|
|
void CalculatePosition( float time, uint16_t speed, bool looped, int *xreturn, int *yreturn );
|
2023-01-23 08:02:13 +01:00
|
|
|
|
|
|
|
std::vector<Point2D*> ControlPoints;
|
|
|
|
bool isLoop;
|
2023-01-23 22:03:09 +01:00
|
|
|
float accumulatedTime;
|
2023-01-23 08:02:13 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|