mirror of
https://github.com/Team4388/auto_planner.git
synced 2026-06-09 00:38:06 -06:00
Add files via upload
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
|
||||
#include "motion.h"
|
||||
#include "math/bezier.h"
|
||||
#include "../include/SDL.h"
|
||||
|
||||
typedef struct {
|
||||
enum {
|
||||
PATH_MOTION,
|
||||
PATH_BEZIER
|
||||
} type;
|
||||
|
||||
union {
|
||||
MotionPath motion;
|
||||
BezierPath bezier;
|
||||
};
|
||||
|
||||
rect bounding_box;
|
||||
} MultiPath;
|
||||
|
||||
#define WRAP_MOTION(path) (MultiPath) { PATH_MOTION, .motion = path };
|
||||
#define WRAP_BEZIER(path) (MultiPath) { PATH_BEZIER, .bezier = path };
|
||||
|
||||
typedef struct {
|
||||
Field field;
|
||||
float zoom_level;
|
||||
int x_offset;
|
||||
int y_offset;
|
||||
|
||||
struct {
|
||||
int cap;
|
||||
int len;
|
||||
MultiPath *arr;
|
||||
int selected;
|
||||
} paths;
|
||||
|
||||
enum {
|
||||
MODE_RECORD,
|
||||
MODE_EDIT,
|
||||
MODE_PLAYBACK,
|
||||
} mode;
|
||||
} PlannerState;
|
||||
|
||||
void init_planner(StartPos start);
|
||||
void path_playback(bool start, MotionPath *path);
|
||||
void save_correct_format(MultiPath *path);
|
||||
void planner_loop(SDL_Event *e);
|
||||
Reference in New Issue
Block a user