mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-27 18:48:36 +02:00
add renderer window to make a path with timestamps
This commit is contained in:
45
includes/RT/Renderer.hpp
Normal file
45
includes/RT/Renderer.hpp
Normal file
@ -0,0 +1,45 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* Renderer.hpp :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/01/22 16:29:26 by tomoron #+# #+# */
|
||||
/* Updated: 2025/01/22 19:34:22 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#ifndef RENDERER_HPP
|
||||
# define RENDERER_HPP
|
||||
|
||||
# include "RT.hpp"
|
||||
|
||||
class Scene;
|
||||
class Window;
|
||||
|
||||
typedef struct s_pathPoint
|
||||
{
|
||||
glm::vec3 pos;
|
||||
glm::vec2 dir;
|
||||
float time;
|
||||
} t_pathPoint;
|
||||
|
||||
class Renderer
|
||||
{
|
||||
public:
|
||||
Renderer(Scene *scene, Window *win);
|
||||
void renderImgui(void);
|
||||
|
||||
private:
|
||||
void addPoint(void);
|
||||
|
||||
int _min;
|
||||
float _sec;
|
||||
int _samples;
|
||||
std::vector<t_pathPoint> _path;
|
||||
Scene *_scene;
|
||||
Window *_win;
|
||||
};
|
||||
|
||||
#endif
|
@ -6,7 +6,7 @@
|
||||
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/13 16:15:41 by TheRed #+# #+# */
|
||||
/* Updated: 2025/01/11 16:14:11 by tomoron ### ########.fr */
|
||||
/* Updated: 2025/01/23 00:39:11 by tomoron ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@ -26,7 +26,7 @@ class Window
|
||||
void display();
|
||||
void pollEvents();
|
||||
bool shouldClose();
|
||||
|
||||
|
||||
void process_input();
|
||||
|
||||
static void keyCallback(GLFWwindow *window, int key, int scancode, int action, int mods);
|
||||
@ -44,9 +44,12 @@ class Window
|
||||
|
||||
bool &getAccumulate(void);
|
||||
|
||||
void setFrameCount(int nb);
|
||||
|
||||
private:
|
||||
GLFWwindow *_window;
|
||||
Scene *_scene;
|
||||
Renderer *_renderer;
|
||||
|
||||
float _fps;
|
||||
float _delta;
|
||||
|
Reference in New Issue
Block a user