From 623fa24590e86508c901eb6a1fa72be459ec50cb Mon Sep 17 00:00:00 2001 From: Peter Schaefer Date: Mon, 11 May 2015 20:22:21 +0200 Subject: [PATCH] moved Overlap to own file new BBoxTree moved GLM out of Graphix --- Weave/BBoxTree.cpp | 0 Weave/BBoxTree.h | 0 Weave/Events.cpp | 2 +- Weave/{Graphix => }/GLM.cpp | 0 Weave/{Graphix => }/GLM.h | 0 Weave/Game.cpp | 2 +- Weave/Graphix/Graphix.cpp | 1 - Weave/Graphix/Graphix.h | 9 +- Weave/Graphix/Model/BBox.cpp | 2 + Weave/Graphix/Model/BBox.h | 2 + Weave/Graphix/Model/IMesh.cpp | 29 ++++- Weave/Graphix/Model/IMesh.h | 4 +- Weave/Graphix/Model/IMetaMesh.cpp | 2 + Weave/Graphix/Model/IMetaMesh.h | 3 +- Weave/Graphix/Model/Model.cpp | 177 ++++++++++++++---------------- Weave/Graphix/Model/Model.h | 35 ++---- Weave/Graphix/Model/SkyBox.cpp | 1 + Weave/Graphix/Model/SkyBox.h | 1 + Weave/Graphix/Texture.cpp | 2 +- Weave/Graphix/Texture.h | 2 +- Weave/Graphix/ViewPort.cpp | 2 +- Weave/Graphix/ViewPort.h | 2 +- Weave/Overlap.cpp | 84 ++++++++++++++ Weave/Overlap.h | 28 +++++ Weave/Scene/EventBox.cpp | 2 + Weave/Scene/EventBox.h | 2 + Weave/Scene/Marvin.cpp | 1 + Weave/Scene/Marvin.h | 2 +- Weave/Scene/Scene.cpp | 4 +- Weave/Scene/Scene.h | 2 +- Weave/Scene/SceneObject.cpp | 3 +- Weave/Scene/SceneObject.h | 3 +- Weave/Scene/Sky.cpp | 2 + Weave/Scene/Sky.h | 2 +- Weave/Weave.vcxproj | 8 +- Weave/Weave.vcxproj.filters | 24 +++- 36 files changed, 290 insertions(+), 155 deletions(-) create mode 100644 Weave/BBoxTree.cpp create mode 100644 Weave/BBoxTree.h rename Weave/{Graphix => }/GLM.cpp (100%) rename Weave/{Graphix => }/GLM.h (100%) create mode 100644 Weave/Overlap.cpp create mode 100644 Weave/Overlap.h diff --git a/Weave/BBoxTree.cpp b/Weave/BBoxTree.cpp new file mode 100644 index 0000000..e69de29 diff --git a/Weave/BBoxTree.h b/Weave/BBoxTree.h new file mode 100644 index 0000000..e69de29 diff --git a/Weave/Events.cpp b/Weave/Events.cpp index 6c31b0e..dae30aa 100644 --- a/Weave/Events.cpp +++ b/Weave/Events.cpp @@ -3,7 +3,7 @@ #include "Graphix\Graphix.h" -#include "Graphix\GLM.h" +#include "GLM.h" #include using std::cout; diff --git a/Weave/Graphix/GLM.cpp b/Weave/GLM.cpp similarity index 100% rename from Weave/Graphix/GLM.cpp rename to Weave/GLM.cpp diff --git a/Weave/Graphix/GLM.h b/Weave/GLM.h similarity index 100% rename from Weave/Graphix/GLM.h rename to Weave/GLM.h diff --git a/Weave/Game.cpp b/Weave/Game.cpp index badaf12..f3bee9b 100644 --- a/Weave/Game.cpp +++ b/Weave/Game.cpp @@ -2,7 +2,7 @@ #include -#include "Graphix\GLM.h" +#include "GLM.h" #include #include diff --git a/Weave/Graphix/Graphix.cpp b/Weave/Graphix/Graphix.cpp index f6dfb75..ba41ceb 100644 --- a/Weave/Graphix/Graphix.cpp +++ b/Weave/Graphix/Graphix.cpp @@ -6,7 +6,6 @@ using std::string; - void Graphix::setWindowSize(unsigned int _width, unsigned int _height) { width = _width; diff --git a/Weave/Graphix/Graphix.h b/Weave/Graphix/Graphix.h index 7a9f23b..d45b642 100644 --- a/Weave/Graphix/Graphix.h +++ b/Weave/Graphix/Graphix.h @@ -1,15 +1,10 @@ #pragma once -#include #include #include -//#include -//#include "Drawable.h" -//#include "Scene.h" +#include -using std::string; -//using std::unordered_map; class Shader; @@ -41,7 +36,7 @@ private: static unsigned int xpos; static unsigned int ypos; - static string windowTitle; + static std::string windowTitle; static Uint32 windowFlags; static Uint32 sdlFlags; diff --git a/Weave/Graphix/Model/BBox.cpp b/Weave/Graphix/Model/BBox.cpp index 70a7478..7ec7e53 100644 --- a/Weave/Graphix/Model/BBox.cpp +++ b/Weave/Graphix/Model/BBox.cpp @@ -1,5 +1,7 @@ #include "BBox.h" + #include "GL\glew.h" +#include "../../GLM.h" BBox::BBox() diff --git a/Weave/Graphix/Model/BBox.h b/Weave/Graphix/Model/BBox.h index 35f8d92..a9a7c5c 100644 --- a/Weave/Graphix/Model/BBox.h +++ b/Weave/Graphix/Model/BBox.h @@ -1,5 +1,7 @@ #pragma once + #include "Model.h" + class BBox : public Model { diff --git a/Weave/Graphix/Model/IMesh.cpp b/Weave/Graphix/Model/IMesh.cpp index bb20144..6445c77 100644 --- a/Weave/Graphix/Model/IMesh.cpp +++ b/Weave/Graphix/Model/IMesh.cpp @@ -5,6 +5,8 @@ #include #include +#include "../../GLM.h" + #include "../Shader.h" #include "../Texture.h" #include "../../Message.h" @@ -147,7 +149,21 @@ Overlap IMesh::checkColS2O(const mat4& _mMat, const Model* _model, const mat4& _ return firstBB; //Inner Mesh - + //call _model->checkColO2STriangle + //vec3 pos; + //mat3 direction; + //Overlap secondT,tmp; + //for (uint i = 0; i < numfaces; ++i) + //{ + // pos = vec3(vertex[3 * index[3 * i]], vertex[3 * index[3 * i] + 1], vertex[3 * index[3 * i] + 2]); + // direction[1] = vec3(vertex[3 * index[3 * i + 1]], vertex[3 * index[3 * i + 1] + 1], vertex[3 * index[3 * i + 1] + 2]) - pos; + // direction[2] = vec3(vertex[3 * index[3 * i + 2]], vertex[3 * index[3 * i + 2] + 1], vertex[3 * index[3 * i + 2] + 2]) - pos; + // direction[0] = normalize(cross(direction[1], direction[2])); + // tmp = _model->checkColO2STriangle(_modelMat, pos, direction); + // if (tmp) + // secondT.update(tmp); + // } + //return secondT; } Overlap IMesh::checkColO2SBox(const mat4& _mMat, const vec3& _pos, const vec3& _size, const mat4& _modelMat) const @@ -158,9 +174,20 @@ Overlap IMesh::checkColO2SBox(const mat4& _mMat, const vec3& _pos, const vec3& _ return firstBB; //Inner Mesh + //call checkColO2STriangle } +Overlap IMesh::checkColO2STriangle(const mat4& _mMat, const vec3& _posB, const mat3& _directionsB) const +{ + Overlap firstBB = Model::checkColO2STriangle(_mMat, _posB, _directionsB); + //if (!firstBB) + return firstBB; + + //Inner Mesh + +} + IMesh::operator string() const { return "IMesh"; diff --git a/Weave/Graphix/Model/IMesh.h b/Weave/Graphix/Model/IMesh.h index 155b867..d04f166 100644 --- a/Weave/Graphix/Model/IMesh.h +++ b/Weave/Graphix/Model/IMesh.h @@ -1,7 +1,8 @@ #pragma once #include -#include "../GLM.h" +#include "../../GLM.h" +#include "../../Overlap.h" #include "Model.h" @@ -25,6 +26,7 @@ public: Overlap checkColS2O(const mat4& mMat, const Model* model, const mat4& modelMat) const override; Overlap checkColO2SBox(const mat4& mMat, const vec3& pos, const vec3& size, const mat4& modelMat) const override; + Overlap checkColO2STriangle(const mat4& mMat, const vec3& pos, const mat3& directions) const override; operator std::string() const override; diff --git a/Weave/Graphix/Model/IMetaMesh.cpp b/Weave/Graphix/Model/IMetaMesh.cpp index 052b1b4..7e7f14b 100644 --- a/Weave/Graphix/Model/IMetaMesh.cpp +++ b/Weave/Graphix/Model/IMetaMesh.cpp @@ -4,6 +4,8 @@ #include #include +#include "../../GLM.h" + #include "IMesh.h" #include "../Shader.h" #include "../../Message.h" diff --git a/Weave/Graphix/Model/IMetaMesh.h b/Weave/Graphix/Model/IMetaMesh.h index 8cedb25..ac9987b 100644 --- a/Weave/Graphix/Model/IMetaMesh.h +++ b/Weave/Graphix/Model/IMetaMesh.h @@ -4,7 +4,8 @@ #include #include -#include "../GLM.h" +#include "../../GLM.h" +#include "../../Overlap.h" class IMesh; class Shader; diff --git a/Weave/Graphix/Model/Model.cpp b/Weave/Graphix/Model/Model.cpp index b447307..412bbc0 100644 --- a/Weave/Graphix/Model/Model.cpp +++ b/Weave/Graphix/Model/Model.cpp @@ -290,7 +290,7 @@ Overlap Model::checkColS2O(const mat4& _mMat, const Model* _model, const mat4& _ return stepBB; } -Overlap Model::checkColO2SBox(const mat4& _mMat, const vec3& _posB, const vec3& _sizeB, const mat4& _modelMat) const +Overlap Model::checkColO2SBox(const mat4& _mMat, const vec3& _posB, const vec3& _sizeB, const mat4& _modelMatB) const { vec3 scale = getScale(_mMat); vec3 posA = BBposition; @@ -300,8 +300,8 @@ Overlap Model::checkColO2SBox(const mat4& _mMat, const vec3& _posB, const vec3& mat4 mMat = removeScale(_mMat); - mat4 modelAR = glm::inverse(_modelMat)*mMat; - mat4 modelBR = glm::inverse(mMat)*_modelMat; + mat4 modelAR = glm::inverse(_modelMatB)*mMat; + mat4 modelBR = glm::inverse(mMat)*_modelMatB; vec3 posAR = (vec3)(modelAR*vec4(posA, 1.f)); vec3 posBR = (vec3)(modelBR*vec4(_posB, 1.f)); @@ -321,21 +321,82 @@ Overlap Model::checkColO2SBox(const mat4& _mMat, const vec3& _posB, const vec3& return ret; } -void Model::checkCollideByAxis(float& _overlap, float& _inside, uint dim, const float* posA, const float* posB, const float* sizeA,const float* sizeB) +Overlap Model::checkColO2STriangle(const mat4& _mMat, const vec3& _posB, const mat3& _directionsB) const { - _overlap = INFINITY; - _inside = INFINITY; + + vec3 posA = BBposition; + vec3 sizeA = BBsize; + + vec3 scale = getScale(_mMat); + scaleVec3(posA, scale); + scaleVec3(sizeA, scale); + + mat4 invmMat = glm::inverse(removeScale(_mMat)); + + vec3 posBR = (vec3)(invmMat*vec4(_posB, 1.f)); + mat3 directionsBR = (mat3)invmMat*_directionsB; + + + //Triangle Face Distance + float nDist = (posA-posBR).length(); + float nSize = directSize(sizeA,_directionsB[0]); + float overlap = nSize - nDist; + Overlap ret(overlap,overlap); + if (!ret) + return ret; + + + //Box to Triangle Distance + vec3 sizeBRP(0.f), sizeBRM(0.f); + for (int i = 0; i < 3; ++i) + { + sizeBRP[i] = max(-directionsBR[i][1],-directionsBR[i][2]); + sizeBRM[i] = max(directionsBR[i][1], directionsBR[i][2]); + if (sizeBRP[i] < 0) + sizeBRP[i] = 0; + if (sizeBRM[i] < 0) + sizeBRM[i] = 0; + } + overlap = sizeBRM[0] + sizeA[0] + sizeBRP[0]; + for (int i = 0; i < 3; ++i) + { + if (posBR[i]>=0) + { + overlap = min(sizeBRP[i] + sizeA[i] - posBR[i],overlap); + } + else + { + overlap = min(sizeBRM[i] + sizeA[i] + posBR[i],overlap); + } + if (overlap < 0) + { + overlap = -1; + break; + } + } + + return Overlap(overlap, overlap); + +} + +void Model::checkCollideByAxis(float& _overlap, float& _inside, uint dim, const float* posA, const float* posB, const float* sizeA, const float* sizeB) +{ + _overlap = sizeA[0] + sizeB[0]; + _inside = sizeA[0] + sizeB[0]; for (uint i = 0; i < dim; ++i) { + _overlap = min(sizeA[i] + sizeB[i] - abs(posA[i] - posB[i]), _overlap); - if (_inside >= 0) - _inside = min(abs(sizeA[i] - sizeB[i]) - abs(posA[i] - posB[i]), _inside); + if (_overlap < 0) { _overlap = -1; _inside = -1; return; - } + } + if (_inside >= 0) + _inside = min(abs(sizeA[i] - sizeB[i]) - abs(posA[i] - posB[i]), _inside); + } if (_inside < 0) _inside = -1; @@ -355,6 +416,16 @@ vec3 Model::rotateSize(const vec3& _size, const mat4& _modelMat) return Size; } +float Model::directSize(const vec3& _size, const vec3& _direction) +{ + float ret(0.f); + for (auto i = 0; i < 3; ++i) + { + ret += abs(_size[i]*_direction[i]); + } + return ret; +} + void Model::scaleVec3(vec3& _vec, const vec3& _scale) { for (uint i = 0; i < 3; ++i) @@ -423,7 +494,7 @@ void Model::deleteIMetaModel(const string& _modelpath) delete ptr; ptr = nullptr; } - + } @@ -437,7 +508,7 @@ float Model::getPDistHit(const vec3& _P, const vec3& _direction) const //vec3 posAR = (vec3)(modelAR*vec4(posA, 1.f)); //vec3 posBR = (vec3)(modelBR*vec4(posB, 1.f)); - + return 1; } @@ -445,87 +516,3 @@ Model* Model::BoundingBox = nullptr; Model* Model::SkyBoxModel = nullptr; std::unordered_map Model::IMetaModel; std::unordered_map Model::IMetaModel_count; - - - -Overlap::Overlap() : unset(true) -{ -} - -Overlap::Overlap(float _over, float _in) : in(_in), over(_over), unset(false) -{ -} - -Overlap::~Overlap() -{ -} - -float Overlap::overlap() const -{ - if (unset) - return -1; - else - return over; -} - -float Overlap::inside() const -{ - if (unset) - return -1; - else - return in; -} - -Overlap::operator bool() const -{ - if (unset) - return false; - else - return over>=0; -} - -void Overlap::update(float _over, float _in) -{ - if (unset) - { - over = _over; - in = _in; - unset = true; - return; - } - - // select closest distance - if (over > _over) - { - over = _over; - } - - //sync inside - in = min(in, _in); -} - -void Overlap::update(const Overlap& _other) -{ - if (unset) - { - *this = _other; - return; - } - - // select closest distance - if (over > _other.over) - { - over = _other.over; - } - - //sync inside - in = min(in, _other.in); -} - -Overlap Overlap::merge(const Overlap& _first, const Overlap& _second) -{ - // select closest distance - Overlap ret = _first; - ret.update(_second); - return ret; -} \ No newline at end of file diff --git a/Weave/Graphix/Model/Model.h b/Weave/Graphix/Model/Model.h index 02b2076..b7f2cdc 100644 --- a/Weave/Graphix/Model/Model.h +++ b/Weave/Graphix/Model/Model.h @@ -1,9 +1,11 @@ #pragma once -#include "../GLM.h" +#include "../../GLM.h" #include #include +#include "../../Overlap.h" + class Shader; class Texture; class Overlap; @@ -35,7 +37,7 @@ public: /* test self against other*/ virtual Overlap checkColS2O(const mat4& mMat, const Model* model, const mat4& modelMat) const; virtual Overlap checkColO2SBox(const mat4& mMat, const vec3& pos, const vec3& size, const mat4& modelMat) const; - //virtual void checkColO2STriangle() const; + virtual Overlap checkColO2STriangle(const mat4& mMat, const vec3& pos, const mat3& directions) const; static Model* getBBoxModel(); static Model* getSkyBoxModel(); @@ -75,37 +77,14 @@ protected: static std::unordered_map IMetaModel; static std::unordered_map IMetaModel_count; - static vec3 rotateSize(const vec3& size, const mat4& modelMat); + static void checkCollideByAxis(float& overlap, float& inside, uint dim, const float* posA, const float* posB, const float* sizeA, const float* sizeB); static void scaleVec3(vec3& vec, const vec3& scale); + static vec3 rotateSize(const vec3& size, const mat4& modelMat); + static float directSize(const vec3& size, const vec3& direction); private: vec3 BBmin, BBmax; vec3 BBsize, BBposition; -}; - -class Overlap -{ -public: - Overlap(); - Overlap(float over, float in); - ~Overlap(); - - float overlap() const; - float inside() const; - - operator bool() const; - - static Overlap merge(const Overlap& first, const Overlap& second); - void update(float over, float in); - void update(const Overlap& other); - -protected: - bool unset; - float over; - float in; - - vec3 center; - vec3 normal; }; \ No newline at end of file diff --git a/Weave/Graphix/Model/SkyBox.cpp b/Weave/Graphix/Model/SkyBox.cpp index c91970c..ab1a57d 100644 --- a/Weave/Graphix/Model/SkyBox.cpp +++ b/Weave/Graphix/Model/SkyBox.cpp @@ -2,6 +2,7 @@ #include "GL/glew.h" #include "../Graphix.h" +#include "../../GLM.h" SkyBox::SkyBox() diff --git a/Weave/Graphix/Model/SkyBox.h b/Weave/Graphix/Model/SkyBox.h index 1b56702..0941718 100644 --- a/Weave/Graphix/Model/SkyBox.h +++ b/Weave/Graphix/Model/SkyBox.h @@ -1,6 +1,7 @@ #pragma once #include "Model.h" +#include "../../GLM.h" class SkyBox : public Model diff --git a/Weave/Graphix/Texture.cpp b/Weave/Graphix/Texture.cpp index 23e3782..2793649 100644 --- a/Weave/Graphix/Texture.cpp +++ b/Weave/Graphix/Texture.cpp @@ -2,7 +2,7 @@ #include #include "FreeImage.h" #include -#include "GLM.h" +#include "../GLM.h" #include "../Message.h" #include "Graphix.h" diff --git a/Weave/Graphix/Texture.h b/Weave/Graphix/Texture.h index f0eaa10..d884713 100644 --- a/Weave/Graphix/Texture.h +++ b/Weave/Graphix/Texture.h @@ -1,6 +1,6 @@ #pragma once -#include "GLM.h" +#include "../GLM.h" #include #include diff --git a/Weave/Graphix/ViewPort.cpp b/Weave/Graphix/ViewPort.cpp index c9ce4a7..904f4bb 100644 --- a/Weave/Graphix/ViewPort.cpp +++ b/Weave/Graphix/ViewPort.cpp @@ -1,7 +1,7 @@ #include "ViewPort.h" #include -#include "GLM.h" +#include "../GLM.h" #include "Shader.h" diff --git a/Weave/Graphix/ViewPort.h b/Weave/Graphix/ViewPort.h index fdb0a4e..a4c28f4 100644 --- a/Weave/Graphix/ViewPort.h +++ b/Weave/Graphix/ViewPort.h @@ -1,7 +1,7 @@ #pragma once //#include "Drawable.h" -#include "GLM.h" +#include "../GLM.h" class Shader; diff --git a/Weave/Overlap.cpp b/Weave/Overlap.cpp new file mode 100644 index 0000000..4c4f772 --- /dev/null +++ b/Weave/Overlap.cpp @@ -0,0 +1,84 @@ + +#include "Overlap.h" + +Overlap::Overlap() : unset(true) +{ +} + +Overlap::Overlap(float _over, float _in) : in(_in), over(_over), unset(false) +{ +} + +Overlap::~Overlap() +{ +} + +float Overlap::overlap() const +{ + if (unset) + return -1; + else + return over; +} + +float Overlap::inside() const +{ + if (unset) + return -1; + else + return in; +} + +Overlap::operator bool() const +{ + if (unset) + return false; + else + return over >= 0; +} + +void Overlap::update(float _over, float _in) +{ + if (unset) + { + over = _over; + in = _in; + unset = true; + return; + } + + // select closest distance + if (over > _over) + { + over = _over; + } + + //sync inside + in = min(in, _in); +} + +void Overlap::update(const Overlap& _other) +{ + if (unset) + { + *this = _other; + return; + } + + // select closest distance + if (over > _other.over) + { + over = _other.over; + } + + //sync inside + in = min(in, _other.in); +} + +Overlap Overlap::merge(const Overlap& _first, const Overlap& _second) +{ + // select closest distance + Overlap ret = _first; + ret.update(_second); + return ret; +} \ No newline at end of file diff --git a/Weave/Overlap.h b/Weave/Overlap.h new file mode 100644 index 0000000..079e7e9 --- /dev/null +++ b/Weave/Overlap.h @@ -0,0 +1,28 @@ +#pragma once + +#include "GLM.h" + +class Overlap +{ +public: + Overlap(); + Overlap(float over, float in); + ~Overlap(); + + float overlap() const; + float inside() const; + + operator bool() const; + + static Overlap merge(const Overlap& first, const Overlap& second); + void update(float over, float in); + void update(const Overlap& other); + +protected: + bool unset; + float over; + float in; + + vec3 center; + vec3 normal; +}; \ No newline at end of file diff --git a/Weave/Scene/EventBox.cpp b/Weave/Scene/EventBox.cpp index 420d66c..ceeed9c 100644 --- a/Weave/Scene/EventBox.cpp +++ b/Weave/Scene/EventBox.cpp @@ -8,6 +8,8 @@ #include "../Message.h" +#include "../GLM.h" + EventBox::EventBox(const mat4& _modelMat, uint _EB_TYPE) : SceneObject(Graphix::shader_BBox, _modelMat, vec4(0.f), Model::getBBoxModel(), ""), diff --git a/Weave/Scene/EventBox.h b/Weave/Scene/EventBox.h index d7e5d68..dd8fc49 100644 --- a/Weave/Scene/EventBox.h +++ b/Weave/Scene/EventBox.h @@ -1,5 +1,7 @@ #pragma once + #include "SceneObject.h" +#include "../GLM.h" #define EB_WINZONE 1 diff --git a/Weave/Scene/Marvin.cpp b/Weave/Scene/Marvin.cpp index e0ec59d..1f0c141 100644 --- a/Weave/Scene/Marvin.cpp +++ b/Weave/Scene/Marvin.cpp @@ -1,6 +1,7 @@ #include "Marvin.h" #include "../Graphix/Shader.h" +#include "../GLM.h" Marvin::Marvin(Shader* _shader, const mat4& _modelMat) : SceneObject(_shader, _modelMat, vec4(7.0f, 0.7f, 1.0f, 3.0f), "Player.dae", "model_player_2D.png") diff --git a/Weave/Scene/Marvin.h b/Weave/Scene/Marvin.h index ed44973..3493a97 100644 --- a/Weave/Scene/Marvin.h +++ b/Weave/Scene/Marvin.h @@ -1,7 +1,7 @@ #pragma once #include "SceneObject.h" -#include "../Graphix/GLM.h" +#include "../GLM.h" class Shader; diff --git a/Weave/Scene/Scene.cpp b/Weave/Scene/Scene.cpp index d12e815..3f6ef29 100644 --- a/Weave/Scene/Scene.cpp +++ b/Weave/Scene/Scene.cpp @@ -3,7 +3,7 @@ #include "Sky.h" #include -#include "../Graphix/GLM.h" +#include "../GLM.h" #include "../Graphix/Graphix.h" #include "../Graphix/Shader.h" @@ -12,6 +12,8 @@ #include "../Message.h" #include "../Events.h" +#include "../Overlap.h" + #include using std::list; diff --git a/Weave/Scene/Scene.h b/Weave/Scene/Scene.h index ae2402c..827e74a 100644 --- a/Weave/Scene/Scene.h +++ b/Weave/Scene/Scene.h @@ -1,6 +1,6 @@ #pragma once -#include "../Graphix/GLM.h" +#include "../GLM.h" #include "../Graphix/ViewPort.h" #include "Sky.h" diff --git a/Weave/Scene/SceneObject.cpp b/Weave/Scene/SceneObject.cpp index 4784e5b..e0b99ed 100644 --- a/Weave/Scene/SceneObject.cpp +++ b/Weave/Scene/SceneObject.cpp @@ -3,7 +3,8 @@ #include -#include "../Graphix/GLM.h" +#include "../GLM.h" +#include "../Overlap.h" #include "../Graphix/Graphix.h" #include "../Graphix/Shader.h" diff --git a/Weave/Scene/SceneObject.h b/Weave/Scene/SceneObject.h index f129077..4cc765f 100644 --- a/Weave/Scene/SceneObject.h +++ b/Weave/Scene/SceneObject.h @@ -1,7 +1,6 @@ #pragma once -#include "../Graphix/GLM.h" - +#include "../GLM.h" #include using std::string; diff --git a/Weave/Scene/Sky.cpp b/Weave/Scene/Sky.cpp index b71400c..b27ceba 100644 --- a/Weave/Scene/Sky.cpp +++ b/Weave/Scene/Sky.cpp @@ -3,6 +3,8 @@ #include "../Graphix/Shader.h" #include "../Graphix/Model.h" +#include "../GLM.h" + Sky::Sky() : SceneObject(new Shader("skybox_VS.hlsl","skybox_color_FS.hlsl"), mat4(1.f), vec4(1.f), Model::getSkyBoxModel(), "") { diff --git a/Weave/Scene/Sky.h b/Weave/Scene/Sky.h index 0156bb2..7b108ed 100644 --- a/Weave/Scene/Sky.h +++ b/Weave/Scene/Sky.h @@ -1,7 +1,7 @@ #pragma once #include "SceneObject.h" -#include "../Graphix/GLM.h" +#include "../GLM.h" class Shader; diff --git a/Weave/Weave.vcxproj b/Weave/Weave.vcxproj index 968c17c..be339e2 100644 --- a/Weave/Weave.vcxproj +++ b/Weave/Weave.vcxproj @@ -92,16 +92,18 @@ + - + + @@ -115,17 +117,19 @@ + - + + diff --git a/Weave/Weave.vcxproj.filters b/Weave/Weave.vcxproj.filters index 509b1b4..db09c28 100644 --- a/Weave/Weave.vcxproj.filters +++ b/Weave/Weave.vcxproj.filters @@ -30,9 +30,6 @@ Source Files - - Source Files - Source Files @@ -75,6 +72,15 @@ Source Files + + Source Files + + + Source Files + + + Source Files + @@ -92,9 +98,6 @@ Header Files - - Header Files - Header Files @@ -143,5 +146,14 @@ Header Files + + Header Files + + + Header Files + + + Header Files + \ No newline at end of file -- 2.47.3