start changing parsing of arguments to add settings and start a render with no input

This commit is contained in:
2025-02-04 03:19:29 +01:00
parent 9ddce8b6d0
commit 2264ed7a8f
16 changed files with 396 additions and 148 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/01/22 16:29:26 by tomoron #+# #+# */
/* Updated: 2025/01/30 22:15:55 by tomoron ### ########.fr */
/* Updated: 2025/02/04 00:41:10 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -37,21 +37,28 @@ class Renderer
{
public:
Renderer(Scene *scene, Window *win);
Renderer(Scene *scene, Window *win, std::string filename);
void renderImgui(void);
void update(Shader &shader);
int rendering(void) const;
bool shouldClose(void) const;
private:
void addPoint(float time);
void init(Scene *scene, Window *win);
void savePath(void);
void rawRead(std::ifstream &file, void *buf, size_t len);
void loadPath(std::string filename);
void makeMovement(float timeFromStart, float curSplitTimeReset);
void initRender();
void addImageToRender(Shader &shader);
void endRender(void);
void imguiPathCreation(void);
void imguiRenderInfo(void);
std::string floatToTime(float timef);
void imguiRenderSettings(void);
std::string floatToTime(double timef);
glm::vec2 bezierSphereInterpolate(glm::vec4 control, glm::vec2 from, glm::vec2 to, float time);
void updateAvailableCodecs(void);
void updateAvailableCodecs(int mode, AVCodecID id);
void fillGoodCodecList(std::vector<AVCodecID> &lst);
glm::vec3 hermiteInterpolate(glm::vec3 points[4], double alpha);
@ -69,6 +76,10 @@ class Renderer
std::vector<const AVCodec *> _codecList;
std::vector<const char *> _codecListStr;
int _codecIndex;
bool _renderSettings;
bool _ignoreUnavailableCodec;
bool _headless;
bool _shouldClose;
int _curPathIndex;
int _destPathIndex;