-
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
6a13c76
commit c06244c
Showing
11 changed files
with
95 additions
and
12 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
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,19 +1,22 @@ | ||
#ifndef CONFIGURATION_HPP | ||
#define CONFIGURATION_HPP | ||
|
||
#include <vector> | ||
|
||
#include "Camera.hpp" | ||
#include "Configuration.hpp" | ||
#include "Window.hpp" | ||
|
||
#include <vector> | ||
#include <string> | ||
|
||
class Configuration { | ||
public: | ||
Window window; | ||
Camera camera; | ||
std::vector<char*> models; | ||
std::vector<std::string> models; | ||
|
||
Configuration(Window window, Camera camera, std::vector<std::string> models); | ||
|
||
Configuration(Window window, Camera camera, std::vector<char*> models); | ||
std::string toString(); | ||
}; | ||
|
||
#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
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
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
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
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,8 +1,27 @@ | ||
#include "Configuration.hpp" | ||
|
||
#include <string> | ||
#include <sstream> | ||
|
||
Configuration::Configuration(Window window, Camera camera, | ||
std::vector<char*> models) { | ||
std::vector<std::string> models) { | ||
this->window = window; | ||
this->camera = camera; | ||
this->models = models; | ||
} | ||
|
||
std::string vectorToString(std::vector<std::string> v) { | ||
std::stringstream ss; | ||
for (auto i : v) { | ||
ss << i << " "; | ||
} | ||
return ss.str(); | ||
} | ||
|
||
std::string Configuration::toString() { | ||
std::stringstream ss; | ||
ss << "Window:\n" << window.toString() << std::endl | ||
<< "Camera:\n" << camera.toString() << std::endl | ||
<< "Models: " << vectorToString(models) << std::endl; | ||
return ss.str(); | ||
} |
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
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
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
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 @@ | ||
<world> | ||
<window width="512" height="512" /> | ||
<camera> | ||
<position x="3" y="2" z="1" /> | ||
<lookAt x="0" y="0" z="0" /> | ||
<up x="0" y="1" z="0" /> | ||
<projection fov="60" near="1" far="1000" /> | ||
</camera> | ||
<group> | ||
<models> | ||
<model file="plane.3d" /> | ||
<model file="cone.3d" /> | ||
</models> | ||
</group> | ||
</world> |