-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae699ad
commit 6a13c76
Showing
8 changed files
with
101 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef CAMERA_HPP | ||
#define CAMERA_HPP | ||
|
||
#include "Camera.hpp" | ||
#include "utils.hpp" | ||
|
||
class Camera { | ||
public: | ||
Point position; | ||
Point lookAt; | ||
Point up; | ||
int fov; | ||
float near; | ||
float far; | ||
|
||
Camera(); | ||
Camera(Point position, Point lookAt, Point up, int fov, float near, | ||
float far); | ||
}; | ||
|
||
#endif // CAMERA_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef CONFIGURATION_HPP | ||
#define CONFIGURATION_HPP | ||
|
||
#include <vector> | ||
|
||
#include "Camera.hpp" | ||
#include "Configuration.hpp" | ||
#include "Window.hpp" | ||
|
||
class Configuration { | ||
public: | ||
Window window; | ||
Camera camera; | ||
std::vector<char*> models; | ||
|
||
Configuration(Window window, Camera camera, std::vector<char*> models); | ||
}; | ||
|
||
#endif // CONFIGURATION_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#ifndef WINDOW_HPP | ||
#define WINDOW_HPP | ||
|
||
#include "Window.hpp" | ||
|
||
class Window { | ||
public: | ||
float width; | ||
float height; | ||
|
||
Window(); | ||
Window(float width, float height); | ||
}; | ||
|
||
#endif // WINDOW_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef PARSE_HPP | ||
#define PARSE_HPP | ||
|
||
#include "../../lib/rapidxml-1.13/rapidxml.hpp" | ||
#include "Configuration.hpp" | ||
#include "parse.hpp" | ||
|
||
Configuration parseConfig(char* filename); | ||
|
||
#endif // PARSE_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,20 @@ | ||
#include "utils.hpp" | ||
#include "Camera.hpp" | ||
|
||
class Camera { | ||
public: | ||
Point position; | ||
Point lookAt; | ||
Point up; | ||
int fov; | ||
float near; | ||
float far; | ||
Camera::Camera() { | ||
this->position = Point(); | ||
this->lookAt = Point(); | ||
this->up = Point(); | ||
this->fov = 0; | ||
this->near = 0; | ||
this->far = 0; | ||
} | ||
|
||
Camera() { | ||
this->position = Point(); | ||
this->lookAt = Point(); | ||
this->up = Point(); | ||
this->fov = 0; | ||
this->near = 0; | ||
this->far = 0; | ||
} | ||
|
||
Camera(Point position, Point lookAt, Point up, int fov, float near, | ||
float far) { | ||
this->position = position; | ||
this->lookAt = lookAt; | ||
this->up = up; | ||
this->fov = fov; | ||
this->near = near; | ||
this->far = far; | ||
} | ||
}; | ||
Camera::Camera(Point position, Point lookAt, Point up, int fov, float near, | ||
float far) { | ||
this->position = position; | ||
this->lookAt = lookAt; | ||
this->up = up; | ||
this->fov = fov; | ||
this->near = near; | ||
this->far = far; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
#include "Camera.cpp" | ||
#include "Window.cpp" | ||
#include "Configuration.hpp" | ||
|
||
class Configuration { | ||
public: | ||
Window window; | ||
Camera camera; | ||
std::vector<char*> models; | ||
|
||
Configuration(Window window, Camera camera, std::vector<char*> models) { | ||
this->window = window; | ||
this->camera = camera; | ||
this->models = models; | ||
} | ||
}; | ||
Configuration::Configuration(Window window, Camera camera, | ||
std::vector<char*> models) { | ||
this->window = window; | ||
this->camera = camera; | ||
this->models = models; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
class Window { | ||
public: | ||
float width; | ||
float height; | ||
#include "Window.hpp" | ||
|
||
Window() { | ||
this->width = 0; | ||
this->height = 0; | ||
} | ||
Window::Window() { | ||
this->width = 0; | ||
this->height = 0; | ||
} | ||
|
||
Window(float width, float height) { | ||
this->width = width; | ||
this->height = height; | ||
} | ||
}; | ||
Window::Window(float width, float height) { | ||
this->width = width; | ||
this->height = height; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters