aboutsummaryrefslogtreecommitdiffstats
path: root/yage/experimental
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2018-05-18 19:56:58 +0100
committerYann Herklotz <ymherklotz@gmail.com>2018-05-18 19:56:58 +0100
commit41d0c68c9fadea552002613f0f62433c3858d0a2 (patch)
tree32fe3c8615c0226e38ae3faea52412a7ada8d0b8 /yage/experimental
parent5c4c0ca30911b5129b32142b430bb6be1baf0e47 (diff)
downloadYAGE-41d0c68c9fadea552002613f0f62433c3858d0a2.tar.gz
YAGE-41d0c68c9fadea552002613f0f62433c3858d0a2.zip
Deleting and cleaning up repository
Diffstat (limited to 'yage/experimental')
-rw-r--r--yage/experimental/camera3d.h15
-rw-r--r--yage/experimental/loader.cpp59
-rw-r--r--yage/experimental/loader.h19
3 files changed, 0 insertions, 93 deletions
diff --git a/yage/experimental/camera3d.h b/yage/experimental/camera3d.h
deleted file mode 100644
index 6a712a17..00000000
--- a/yage/experimental/camera3d.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef YAGE_EXPERIMENTAL_CAMERA3D_H
-#define YAGE_EXPERIMENTAL_CAMERA3D_H
-
-#include <glm/glm.hpp>
-
-class Camera3D
-{
-public:
- Camera3D() = default;
-
-private:
- glm::mat4
-};
-
-#endif
diff --git a/yage/experimental/loader.cpp b/yage/experimental/loader.cpp
deleted file mode 100644
index 1c815d41..00000000
--- a/yage/experimental/loader.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "loader.h"
-
-#include "../core/exception.h"
-
-#include <algorithm>
-#include <fstream>
-#include <regex>
-#include <sstream>
-
-namespace yage
-{
-
-const std::vector<std::regex> ele_regs({"^(\\d+)$", "^(\\d+)\\/(\\d+)$",
- "^(\\d+)\\/\\/(\\d+)$",
- "^(\\d+)\\/(\\d+)\\/(\\d+)$"});
-
-void load_obj(std::string filename, std::vector<glm::vec4> &vertices,
- std::vector<glm::vec3> &normals, std::vector<GLushort> &elements)
-{
- std::ifstream in(filename, std::ios::in);
-
- if (!in.is_open()) {
- throw FileLoadException("Could not load obj file '" + filename + "'");
- }
-
- std::string line;
-
- while (getline(in, line)) {
- if (line.substr(0, 2) == "v ") {
- std::istringstream s(line.substr(2));
- glm::vec4 v;
- s >> v.x >> v.y >> v.z;
- v.w = 1.f;
- vertices.push_back(v);
- } else if (line.substr(0, 2) == "f ") {
- std::istringstream s(line.substr(2));
- GLushort a, b, c;
- s >> a >> b >> c;
- a--, b--, c--;
- elements.push_back(a);
- elements.push_back(b);
- elements.push_back(c);
- } else if (line.substr(0, 2) == "vn ") {
- std::for_each(ele_regs.begin(), ele_regs.end(), [](std::regex re) {
-
- });
- std::istringstream s(line.substr(2));
- glm::vec3 v;
- s >> v.x >> v.y >> v.z;
- normals.push_back(v);
- } else {
- // do nothing otherwise
- }
- }
-
- in.close();
-}
-
-} // namespace yage
diff --git a/yage/experimental/loader.h b/yage/experimental/loader.h
deleted file mode 100644
index 9f076bb1..00000000
--- a/yage/experimental/loader.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef YAGE_EXPERIMENTAL_LOADER_H
-#define YAGE_EXPERIMENTAL_LOADER_H
-
-#include <string>
-#include <vector>
-
-#include <glad/glad.h>
-#include <glm/glm.hpp>
-
-namespace yage
-{
-
-extern void load_obj(std::string filename, std::vector<glm::vec4> &vertices,
- std::vector<glm::vec3> &normals,
- std::vector<GLushort> &elements);
-
-} // namespace yage
-
-#endif