diff --git a/.gitignore b/.gitignore index e58a2d9..bb91970 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ # Build Folders (you can keep bin if you'd like, to store dlls and pdbs) -bin -obj +bin/ +obj/ # Visual Studio files *.[Oo]bj @@ -25,7 +25,6 @@ obj *.opensdf *.unsuccessfulbuild ipch/ -obj/ [Bb]in [Dd]ebug*/ [Rr]elease*/ diff --git a/Escape-the-Dawn.sln b/Escape-the-Dawn.sln index 213283c..a932c57 100644 --- a/Escape-the-Dawn.sln +++ b/Escape-the-Dawn.sln @@ -3,13 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2012 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Escape-the-Dawn", "Escape-the-Dawn\Escape-the-Dawn.vcxproj", "{FE405CFA-8FCE-4867-92CF-797E73B36482}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Tests", "Tests\Tests.vcxproj", "{B9A8F4AA-BE85-45EA-84DD-652D13DD22BE}" - ProjectSection(ProjectDependencies) = postProject - {A9755CAA-62DC-442D-B82C-F548546CFD38} = {A9755CAA-62DC-442D-B82C-F548546CFD38} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Executable", "Executable\Executable.vcxproj", "{A9755CAA-62DC-442D-B82C-F548546CFD38}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -20,14 +13,6 @@ Global {FE405CFA-8FCE-4867-92CF-797E73B36482}.Debug|Win32.Build.0 = Debug|Win32 {FE405CFA-8FCE-4867-92CF-797E73B36482}.Release|Win32.ActiveCfg = Release|Win32 {FE405CFA-8FCE-4867-92CF-797E73B36482}.Release|Win32.Build.0 = Release|Win32 - {B9A8F4AA-BE85-45EA-84DD-652D13DD22BE}.Debug|Win32.ActiveCfg = Debug|Win32 - {B9A8F4AA-BE85-45EA-84DD-652D13DD22BE}.Debug|Win32.Build.0 = Debug|Win32 - {B9A8F4AA-BE85-45EA-84DD-652D13DD22BE}.Release|Win32.ActiveCfg = Release|Win32 - {B9A8F4AA-BE85-45EA-84DD-652D13DD22BE}.Release|Win32.Build.0 = Release|Win32 - {A9755CAA-62DC-442D-B82C-F548546CFD38}.Debug|Win32.ActiveCfg = Debug|Win32 - {A9755CAA-62DC-442D-B82C-F548546CFD38}.Debug|Win32.Build.0 = Debug|Win32 - {A9755CAA-62DC-442D-B82C-F548546CFD38}.Release|Win32.ActiveCfg = Release|Win32 - {A9755CAA-62DC-442D-B82C-F548546CFD38}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Escape-the-Dawn/Camera.cpp b/Escape-the-Dawn/Camera.cpp new file mode 100644 index 0000000..542864d --- /dev/null +++ b/Escape-the-Dawn/Camera.cpp @@ -0,0 +1,80 @@ +#include "Camera.h" + +Camera::Camera(float yFOV, float aspectRatio, float nearClip, float farClip) +{ + m_FOV = yFOV; + m_AspectRatio = aspectRatio; + m_NearClip = nearClip; + m_FarClip = farClip; + + m_Position = glm::vec3(0.0); + /*m_Pitch = 0.f; + m_Yaw = 0.f;*/ + + UpdateProjectionMatrix(); + UpdateViewMatrix(); +} + +//glm::vec3 Camera::Forward() +//{ +// return glm::rotate(glm::vec3(0.f, 0.f, -1.f), -m_Yaw, glm::vec3(0.f, 1.f, 0.f)); +//} +// +//glm::vec3 Camera::Right() +//{ +// return glm::rotate(glm::vec3(1.f, 0.f, 0.f), -m_Yaw, glm::vec3(0.f, 1.f, 0.f)); +//} + +//glm::mat4 Camera::Orientation() +//{ +// glm::mat4 orientation(1.f); +// orientation = glm::rotate(orientation, m_Pitch, glm::vec3(1.f, 0.f, 0.f)); +// orientation = glm::rotate(orientation, m_Yaw, glm::vec3(0.f, 1.f, 0.f)); +// return orientation; +//} + +void Camera::AspectRatio(float val) +{ + m_AspectRatio = val; + UpdateProjectionMatrix(); +} + +void Camera::Position(glm::vec3 val) +{ + m_Position = val; + UpdateViewMatrix(); +} + + +void Camera::Orientation(glm::quat val) +{ + m_Orientation = val; + UpdateViewMatrix(); +} + +//void Camera::Pitch(float val) +//{ +// m_Pitch = val; +// UpdateViewMatrix(); +//} +// +//void Camera::Yaw(float val) +//{ +// m_Yaw = val; +// UpdateViewMatrix(); +//} + +void Camera::UpdateProjectionMatrix() +{ + m_ProjectionMatrix = glm::perspective( + m_FOV, + m_AspectRatio, + m_NearClip, + m_FarClip + ); +} + +void Camera::UpdateViewMatrix() +{ + m_ViewMatrix = glm::translate(glm::toMat4(m_Orientation), -m_Position); +} diff --git a/Escape-the-Dawn/Camera.h b/Escape-the-Dawn/Camera.h new file mode 100644 index 0000000..baea8a5 --- /dev/null +++ b/Escape-the-Dawn/Camera.h @@ -0,0 +1,69 @@ +#ifndef Camera_h__ +#define Camera_h__ + +#define GLM_FORCE_RADIANS +#include +#include +#include +#include +#include +#include + +class Camera +{ +public: + Camera(float yFOV, float aspectRatio, float nearClip, float farClip); + + glm::vec3 Forward(); + glm::vec3 Right(); + glm::quat Orientation(); + + float AspectRatio() const { return m_AspectRatio; } + void AspectRatio(float val); + + glm::vec3 Position() const { return m_Position; } + void Position(glm::vec3 val); + + glm::quat Orientation() const { return m_Orientation; } + void Orientation(glm::quat val); + + /*float Pitch() const { return m_Pitch; } + void Pitch(float val); + float Yaw() const { return m_Yaw; } + void Yaw(float val);*/ + + glm::mat4 ProjectionMatrix() const { return m_ProjectionMatrix; } + void ProjectionMatrix(glm::mat4 val) { m_ProjectionMatrix = val; } + + glm::mat4 ViewMatrix() const { return m_ViewMatrix; } + void ViewMatrix(glm::mat4 val) { m_ViewMatrix = val; } + + float FOV() const { return m_FOV; } + void FOV(float val) { m_FOV = val; } + + float NearClip() const { return m_NearClip; } + void NearClip(float val) { m_NearClip = val; } + + float FarClip() const { return m_FarClip; } + void FarClip(float val) { m_FarClip = val; } + +private: + void UpdateProjectionMatrix(); + void UpdateViewMatrix(); + + float m_FOV; + float m_AspectRatio; + float m_NearClip; + float m_FarClip; + + + glm::vec3 m_Position; + glm::quat m_Orientation; + //float m_Pitch; + //float m_Yaw; + + glm::mat4 m_ProjectionMatrix; + glm::mat4 m_ViewMatrix; +}; + +#endif // Camera_h__ diff --git a/Escape-the-Dawn/Components/Bounds.h b/Escape-the-Dawn/Components/Bounds.h index 591165b..3845485 100644 --- a/Escape-the-Dawn/Components/Bounds.h +++ b/Escape-the-Dawn/Components/Bounds.h @@ -4,15 +4,14 @@ #include "Component.h" #include - namespace Components { struct Bounds : Component { - //Axis Aligned Bounding Box - glm::vec3 origin; - glm::vec3 volumeVector; //The vector that defines the volume of the BB, it goes from one corner to the opposite one + //Axis Aligned Bounding Box + glm::vec3 Origin; + glm::vec3 VolumeVector; //The vector that defines the volume of the BB, it goes from one corner to the opposite one }; } diff --git a/Escape-the-Dawn/Components/Camera.h b/Escape-the-Dawn/Components/Camera.h index c836df4..62d6905 100644 --- a/Escape-the-Dawn/Components/Camera.h +++ b/Escape-the-Dawn/Components/Camera.h @@ -8,9 +8,9 @@ namespace Components struct Camera : Component { - int FOV; - int NearClip; - int FarClip; + float FOV; + float NearClip; + float FarClip; }; } diff --git a/Escape-the-Dawn/Components/Collision.h b/Escape-the-Dawn/Components/Collision.h index b9f44a5..83450a4 100644 --- a/Escape-the-Dawn/Components/Collision.h +++ b/Escape-the-Dawn/Components/Collision.h @@ -10,7 +10,10 @@ namespace Components struct Collision : Component { + Collision() : Phantom(false), Interested(false) { } + bool Phantom; + bool Interested; std::vector CollidingEntities; }; diff --git a/Escape-the-Dawn/Components/Model.h b/Escape-the-Dawn/Components/Model.h index ce27b3b..11297da 100644 --- a/Escape-the-Dawn/Components/Model.h +++ b/Escape-the-Dawn/Components/Model.h @@ -11,7 +11,7 @@ namespace Components struct Model : Component { - std::string ModelFile; + const char* ModelFile; Color Color; }; diff --git a/Escape-the-Dawn/Components/PointLight.h b/Escape-the-Dawn/Components/PointLight.h index daf3aa9..a7a5d4a 100644 --- a/Escape-the-Dawn/Components/PointLight.h +++ b/Escape-the-Dawn/Components/PointLight.h @@ -11,8 +11,11 @@ struct PointLight : Component { float Intensity; float MaxRange; - float SpecularIntensity; - Color Color; + glm::vec3 Specular; + glm::vec3 Diffuse; + float constantAttenuation, linearAttenuation, quadraticAttenuation; + float spotExponent; + Color color; }; } diff --git a/Escape-the-Dawn/Components/SoundEmitter.h b/Escape-the-Dawn/Components/SoundEmitter.h index 01772cd..d325dac 100644 --- a/Escape-the-Dawn/Components/SoundEmitter.h +++ b/Escape-the-Dawn/Components/SoundEmitter.h @@ -10,9 +10,12 @@ namespace Components struct SoundEmitter : Component { - std::string SoundFile; - float Volume; - float MaxRange; + float Gain; + //float MaxDistance; + float ReferenceDistance; + float Pitch; + bool Loop; + std::string Path; }; } diff --git a/Escape-the-Dawn/Components/Transform.h b/Escape-the-Dawn/Components/Transform.h index 9f2df7a..5d20a67 100644 --- a/Escape-the-Dawn/Components/Transform.h +++ b/Escape-the-Dawn/Components/Transform.h @@ -9,9 +9,13 @@ namespace Components struct Transform : Component { + Transform() + : Scale(glm::vec3(1.f)) { } + glm::vec3 Position; glm::quat Orientation; glm::vec3 Velocity; + glm::vec3 Scale; }; } diff --git a/Escape-the-Dawn/Engine.h b/Escape-the-Dawn/Engine.h index 968dfed..283aa54 100644 --- a/Escape-the-Dawn/Engine.h +++ b/Escape-the-Dawn/Engine.h @@ -1,17 +1,12 @@ #include #include -#include -#define GLFW_INCLUDE_GLU -#include -#include +#include "Renderer.h" +#include "GameWorld.h" #include "logging.h" #include "glerror.h" -#include "Renderer.h" -#include "GameWorld.h" - class Engine { public: diff --git a/Escape-the-Dawn/Escape-the-Dawn.vcxproj b/Escape-the-Dawn/Escape-the-Dawn.vcxproj index 1e118da..7f9c2d5 100644 --- a/Escape-the-Dawn/Escape-the-Dawn.vcxproj +++ b/Escape-the-Dawn/Escape-the-Dawn.vcxproj @@ -16,13 +16,13 @@ - StaticLibrary + Application true MultiByte v110 - StaticLibrary + Application false true MultiByte @@ -40,17 +40,17 @@ - $(SolutionDir)\Libraries\SOIL\lib\Debug;$(SolutionDir)\Libraries\glew-1.10.0\lib\Debug\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Debug;$(LibraryPath) + $(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Debug;$(SolutionDir)\Libraries\SOIL\lib\Debug;$(SolutionDir)\Libraries\glew-1.10.0\lib\Debug\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Debug;$(LibraryPath) $(SolutionDir)bin\ $(SolutionDir)obj\$(ProjectName)\ $(ProjectName)-$(Configuration) - $(SolutionDir)\Libraries\SOIL\src;\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) + $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) - $(SolutionDir)\Libraries\SOIL\src;\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) + $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) - $(SolutionDir)\Libraries\SOIL\lib\Release;$(SolutionDir)\Libraries\glew-1.10.0\lib\Release\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Release;$(LibraryPath) + $(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Release;$(SolutionDir)\Libraries\SOIL\lib\Release;$(SolutionDir)\Libraries\glew-1.10.0\lib\Release\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Release;$(LibraryPath) $(SolutionDir)bin\ $(SolutionDir)obj\$(ProjectName)\ $(ProjectName)-$(Configuration) @@ -65,12 +65,12 @@ true Console - opengl32.lib;glu32.lib;glew32sd.lib;glfw3.lib;%(AdditionalDependencies) + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32sd.lib;glfw3.lib;%(AdditionalDependencies) - opengl32.lib;glu32.lib;SOIL.lib;glew32sd.lib;glfw3.lib + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32sd.lib;glfw3.lib @@ -82,27 +82,31 @@ MaxSpeed true true - GLEW_STATIC;%(PreprocessorDefinitions) + GLEW_STATIC;DEBUG;%(PreprocessorDefinitions) NotUsing - None + ProgramDatabase + true - false true true - opengl32.lib;glu32.lib;glew32s.lib;glfw3.lib;%(AdditionalDependencies) + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32s.lib;glfw3.lib;%(AdditionalDependencies) - opengl32.lib;glu32.lib;SOIL.lib;glew32s.lib;glfw3.lib; + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32s.lib;glfw3.lib; + + + + @@ -117,6 +121,7 @@ + @@ -144,6 +149,8 @@ + + @@ -159,7 +166,15 @@ + + + + + + + + diff --git a/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters b/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters index 3baef62..7740421 100644 --- a/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters +++ b/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters @@ -43,6 +43,10 @@ GUI + + + + @@ -141,6 +145,9 @@ + + + @@ -149,6 +156,30 @@ Shaders + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + diff --git a/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters.orig b/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters.orig new file mode 100644 index 0000000..80f772b --- /dev/null +++ b/Escape-the-Dawn/Escape-the-Dawn.vcxproj.filters.orig @@ -0,0 +1,204 @@ + + + + + + Systems + + + Systems + + + Systems + + + Systems + + + Systems + + + Systems + + + Systems + + + + + + GUI + + + + + GUI + + + GUI + + + GUI + + + GUI + + + + + + + + + + + + + Systems + + + Systems + + + Systems + + + Systems + + + Systems + + + Systems + + + Systems + + + + Components + + + + Components + + + Components + + + Components + + + Components + + + Components + + + Components + + + Components + + + Components + + + Components + + + + + Components + + + Components + + + Components + + + Components + + + Util + + + Util + + + + + GUI + + + GUI + + + GUI + + + GUI + + + GUI + + +<<<<<<< HEAD + +======= + + + +>>>>>>> d0320477a978a38d87e94afbea65dc08fd10c860 + + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + Shaders + + + + + {657e11f4-52e7-4336-b77f-80f00b85c33f} + + + {59929465-a139-43b9-9c75-48121d156e78} + + + {54f1eb6f-dc00-4e97-a3ef-ac255d755e2e} + + + {d985d7a7-c041-46fe-ae03-aa40295a7aad} + + + {7bdb0f69-049e-4f16-b271-2495e02e4b28} + + + \ No newline at end of file diff --git a/Escape-the-Dawn/Escape-the-Dawn.vcxproj.orig b/Escape-the-Dawn/Escape-the-Dawn.vcxproj.orig new file mode 100644 index 0000000..7f9c2d5 --- /dev/null +++ b/Escape-the-Dawn/Escape-the-Dawn.vcxproj.orig @@ -0,0 +1,183 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {FE405CFA-8FCE-4867-92CF-797E73B36482} + EscapetheDawn + + + + Application + true + MultiByte + v110 + + + Application + false + true + MultiByte + v110 + + + + + + + + + + + + + + $(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Debug;$(SolutionDir)\Libraries\SOIL\lib\Debug;$(SolutionDir)\Libraries\glew-1.10.0\lib\Debug\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Debug;$(LibraryPath) + $(SolutionDir)bin\ + $(SolutionDir)obj\$(ProjectName)\ + $(ProjectName)-$(Configuration) + $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) + + + $(BOOST_ROOT);$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\include;$(SolutionDir)\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) + + + $(BOOST_ROOT)\lib32-msvc-11.0;$(SolutionDir)\Libraries\openal-soft-1.15.1-bin\lib\Win32\Release;$(SolutionDir)\Libraries\SOIL\lib\Release;$(SolutionDir)\Libraries\glew-1.10.0\lib\Release\Win32;$(SolutionDir)\Libraries\glfw-3.0.4\lib\Release;$(LibraryPath) + $(SolutionDir)bin\ + $(SolutionDir)obj\$(ProjectName)\ + $(ProjectName)-$(Configuration) + + + + Level3 + Disabled + GLEW_STATIC;DEBUG;%(PreprocessorDefinitions) + NotUsing + + + true + Console + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32sd.lib;glfw3.lib;%(AdditionalDependencies) + + + + + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32sd.lib;glfw3.lib + + + + + + + + Level3 + MaxSpeed + true + true + GLEW_STATIC;DEBUG;%(PreprocessorDefinitions) + NotUsing + ProgramDatabase + true + + + true + true + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32s.lib;glfw3.lib;%(AdditionalDependencies) + + + OpenAL32.lib;opengl32.lib;glu32.lib;SOIL.lib;glew32s.lib;glfw3.lib; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Escape-the-Dawn/Fragment2.glsl b/Escape-the-Dawn/Fragment2.glsl new file mode 100644 index 0000000..e0f4160 --- /dev/null +++ b/Escape-the-Dawn/Fragment2.glsl @@ -0,0 +1,71 @@ +uniform mat4 model; +uniform mat4 view; + +layout(binding=0) uniform sampler2D texture; + +const int numberOfLights = 2; +lightSource lights[numberOfLights]; + +uniform vec4 position[numberOfLights]; +uniform vec4 specular[numberOfLights]; +uniform vec4 diffuse[numberOfLights]; +uniform float constantAttenuation[numberOfLights]; +uniform float linearAttenuation[numberOfLights]; +uniform float quadraticAttenuation[numberOfLights]; +uniform float spotExponent[numberOfLights]; + + in VertexData { + vec3 Position; + vec3 Normal; + vec2 TextureCoord; +} Input; + +vec4 scene_ambient = vec4(0.2, 0.2, 0.2, 1.0); + +out vec4 fragmentColor; + +void main() +{ + + vec4 texel = texture2D(texture, Input.TextureCoord); + + vec3 normalDirection = normalize(Normal); + vec3 viewDirection = normalize(vec3(v_inv * vec4(0.0, 0.0, 0.0, 1.0) - Position)); + vec3 lightDirection; + float attenuation; + + // initialize total lighting with ambient lighting + vec3 totalLighting = vec3(scene_ambient) * vec3(frontMaterial.ambient); + + for (int index = 0; index < numberOfLights; index++) // for all light sources + { + vec3 positionToLightSource = vec3(position[index] - Position); + float distance = length(positionToLightSource); + lightDirection = normalize(positionToLightSource); + + attenuation = 1.0 / (constantAttenuation[index] + + linearAttenuation[index] * distance + + quadraticAttenuation[index] * distance * distance); + + attenuation = attenuation * pow(clampedCosine, spotExponent[index]); + + vec3 diffuseReflection = attenuation + * vec3(diffuse[index]) * vec3(frontMaterial.diffuse) + * max(0.0, dot(normalDirection, lightDirection)); + + vec3 specularReflection; + if (dot(normalDirection, lightDirection) < 0.0) // light source on the wrong side? + { + specularReflection = vec3(0.0, 0.0, 0.0); // no specular reflection + } + else // light source on the right side + { + specularReflection = attenuation * vec3(specular[index]) * vec3(frontMaterial.specular) + * pow(max(0.0, dot(reflect(-lightDirection, normalDirection), viewDirection)), frontMaterial.shininess); + } + + totalLighting = totalLighting + diffuseReflection + specularReflection; + } + + fragmentColor = vec4(totalLighting, 1.0) * texel; +} \ No newline at end of file diff --git a/Escape-the-Dawn/GameWorld.cpp b/Escape-the-Dawn/GameWorld.cpp new file mode 100644 index 0000000..31c2855 --- /dev/null +++ b/Escape-the-Dawn/GameWorld.cpp @@ -0,0 +1,155 @@ +#include "GameWorld.h" + + +void GameWorld::Initialize() +{ + World::Initialize(); + + AddSystem("LevelGenerationSystem"); + AddSystem("InputSystem"); + AddSystem("CollisionSystem"); + //AddSystem("ParticleSystem"); + AddSystem("PlayerSystem"); + AddSystem("SoundSystem"); + AddSystem("RenderSystem"); + + std::shared_ptr transform; + std::shared_ptr model; + std::shared_ptr pointLight; + std::shared_ptr camera; + std::shared_ptr bounds; + std::shared_ptr collision; + EntityID ent; + + + + + // Fucking lights + ent = CreateEntity(); + transform = AddComponent(ent, "Transform"); + transform->Position = glm::vec3(0.f, 7.f, 0.f); + pointLight = AddComponent(ent, "PointLight"); + pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); + pointLight->Diffuse = glm::vec3(0.0, 0.0, 5.0); + pointLight->constantAttenuation = 0.f; + pointLight->linearAttenuation = 1.f; + pointLight->quadraticAttenuation = 0.f; + pointLight->spotExponent = 0.0f; + model = AddComponent(ent, "Model"); + model->ModelFile = "Models/sphere.obj"; + ent = CreateEntity(); + transform = AddComponent(ent, "Transform"); + transform->Position = glm::vec3(10.f, 7.f, 0.f); + pointLight = AddComponent(ent, "PointLight"); + pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); + pointLight->Diffuse = glm::vec3(0.0, 5.0, 0.0); + pointLight->constantAttenuation = 0.f; + pointLight->linearAttenuation = 1.f; + pointLight->quadraticAttenuation = 0.f; + pointLight->spotExponent = 0.0f; + model = AddComponent(ent, "Model"); + model->ModelFile = "Models/sphere.obj"; + ent = CreateEntity(); + transform = AddComponent(ent, "Transform"); + transform->Position = glm::vec3(-10.f, 7.f, 0.f); + pointLight = AddComponent(ent, "PointLight"); + pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); + pointLight->Diffuse = glm::vec3(5.0, 0.0, 0.0); + pointLight->constantAttenuation = 0.f; + pointLight->linearAttenuation = 1.f; + pointLight->quadraticAttenuation = 0.f; + pointLight->spotExponent = 0.0f; + model = AddComponent(ent, "Model"); + model->ModelFile = "Models/sphere.obj"; + + //ground + ent = CreateEntity(); + transform = AddComponent(ent, "Transform"); + transform->Position = glm::vec3(0.f, 0.f, 0.f); + model = AddComponent(ent, "Model"); + model->ModelFile = "Models/plane.obj"; + + // Player + m_Player = CreateEntity(); + SetProperty(m_Player, "Name", std::string("PlayerShip")); + transform = AddComponent(m_Player, "Transform"); + transform->Position = glm::vec3(0.f, 2.f, -5.f); + transform->Scale = glm::vec3(1.0f); + model = AddComponent(m_Player, "Model"); + model->ModelFile = "Models/ship.obj"; + pointLight = AddComponent(m_Player, "PointLight"); + pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); + pointLight->Diffuse = glm::vec3(0.4, 0.4, 1.0); + pointLight->constantAttenuation = 0.f; + pointLight->linearAttenuation = 1.f; + pointLight->quadraticAttenuation = 0.f; + pointLight->spotExponent = 0.0f; + AddComponent(m_Player, "Input"); + collision = AddComponent(m_Player, "Collision"); + collision->Phantom = false; + collision->Interested = true; + bounds = AddComponent(m_Player, "Bounds"); + bounds->Origin = glm::vec3(0, 0, 2.f); + bounds->VolumeVector = glm::vec3(4.f, 0.7f, 1); + + + // Camera + entcamera = CreateEntity(m_Player); + SetProperty(entcamera, "Name", std::string("Camera")); + transform = AddComponent(entcamera, "Transform"); + AddComponent(entcamera, "Input"); + transform->Position = glm::vec3(0.f, 10.f, 14.f); + camera = AddComponent(entcamera, "Camera"); + camera->FOV = 45.f; + camera->FarClip = 1000.f; + camera->NearClip = 0.01f; + transform->Orientation = glm::angleAxis(glm::radians(15.0f),glm::vec3(1,0,0)); + + + + + /*ent = CreateEntity(); + transform = AddComponent(ent, "Transform"); + transform->Position = glm::vec3(10.f, 4.f, 0.f); + model = AddComponent(ent, "Model"); + model->ModelFile = "Models/ship.obj"; + collision = AddComponent(player2, "Collision"); + collision->Phantom = false; + bounds = AddComponent(player2, "Bounds"); + bounds->Origin = transform->Position; + bounds->VolumeVector = glm::vec3(2.f,2.f,2.f);*/ +} + +void GameWorld::Update(double dt) +{ + World::Update(dt); +} + +void GameWorld::RegisterComponents() +{ + m_ComponentFactory.Register("Bounds", []() { return new Components::Bounds(); }); + m_ComponentFactory.Register("Camera", []() { return new Components::Camera(); }); + m_ComponentFactory.Register("Collision", []() { return new Components::Collision(); }); + m_ComponentFactory.Register("DirectionalLight", []() { return new Components::DirectionalLight(); }); + m_ComponentFactory.Register("Input", []() { return new Components::Input(); }); + m_ComponentFactory.Register("Model", []() { return new Components::Model(); }); + m_ComponentFactory.Register("ParticleEmitter", []() { return new Components::ParticleEmitter(); }); + m_ComponentFactory.Register("PointLight", []() { return new Components::PointLight(); }); + m_ComponentFactory.Register("PowerUp", []() { return new Components::PowerUp(); }); + m_ComponentFactory.Register("SoundEmitter", []() { return new Components::SoundEmitter(); }); + m_ComponentFactory.Register("Sprite", []() { return new Components::Sprite(); }); + m_ComponentFactory.Register("Stat", []() { return new Components::Stat(); }); + m_ComponentFactory.Register("Template", []() { return new Components::Template(); }); + m_ComponentFactory.Register("Transform", []() { return new Components::Transform(); }); +} + +void GameWorld::RegisterSystems() +{ + m_SystemFactory.Register("LevelGenerationSystem", [this]() { return new Systems::LevelGenerationSystem(this); }); + m_SystemFactory.Register("InputSystem", [this]() { return new Systems::InputSystem(this, m_Renderer); }); + m_SystemFactory.Register("CollisionSystem", [this]() { return new Systems::CollisionSystem(this); }); + //m_SystemFactory.Register("ParticleSystem", [this]() { return new Systems::ParticleSystem(this); }); + m_SystemFactory.Register("PlayerSystem", [this]() { return new Systems::PlayerSystem(this); }); + m_SystemFactory.Register("SoundSystem", [this]() { return new Systems::SoundSystem(this); }); + m_SystemFactory.Register("RenderSystem", [this]() { return new Systems::RenderSystem(this, m_Renderer); }); +} \ No newline at end of file diff --git a/Escape-the-Dawn/GameWorld.h b/Escape-the-Dawn/GameWorld.h index d8f26b1..d2ac780 100644 --- a/Escape-the-Dawn/GameWorld.h +++ b/Escape-the-Dawn/GameWorld.h @@ -30,63 +30,20 @@ class GameWorld : public World { public: - GameWorld(std::shared_ptr renderer); - void Initialize() override; + GameWorld(std::shared_ptr renderer) + : m_Renderer(renderer), World() { } + + void Initialize(); void RegisterSystems() override; void RegisterComponents() override; - void Update(double dt) override; + void Update(double dt) ; private: std::shared_ptr m_Renderer; + EntityID entcamera, player2; + EntityID m_Player; }; -GameWorld::GameWorld(std::shared_ptr renderer) - : m_Renderer(renderer), World() -{ - -} - -void GameWorld::Initialize() -{ - World::Initialize(); - - AddSystem("InputSystem"); -} - -void GameWorld::RegisterSystems() -{ - //m_SystemFactory.Register("LevelGenerationSystem", [this]() { return new Systems::LevelGenerationSystem(this); }); - m_SystemFactory.Register("InputSystem", [this]() { return new Systems::InputSystem(this, m_Renderer); }); - //m_SystemFactory.Register("CollisionSystem", [this]() { return new Systems::CollisionSystem(this); }); - //m_SystemFactory.Register("ParticleSystem", [this]() { return new Systems::ParticleSystem(this); }); - //m_SystemFactory.Register("PlayerSystem", [this]() { return new Systems::PlayerSystem(this); }); - //m_SystemFactory.Register("SoundSystem", [this]() { return new Systems::SoundSystem(this); }); - //m_SystemFactory.Register("RenderSystem", [this]() { return new Systems::RenderSystem(this, m_Renderer); }); -} - -void GameWorld::RegisterComponents() -{ - m_ComponentFactory.Register("Bounds", []() { return new Components::Bounds(); }); - m_ComponentFactory.Register("Camera", []() { return new Components::Camera(); }); - m_ComponentFactory.Register("Collision", []() { return new Components::Collision(); }); - m_ComponentFactory.Register("DirectionalLight", []() { return new Components::DirectionalLight(); }); - m_ComponentFactory.Register("Input", []() { return new Components::Input(); }); - m_ComponentFactory.Register("Model", []() { return new Components::Model(); }); - m_ComponentFactory.Register("ParticleEmitter", []() { return new Components::ParticleEmitter(); }); - m_ComponentFactory.Register("PointLight", []() { return new Components::PointLight(); }); - m_ComponentFactory.Register("PowerUp", []() { return new Components::PowerUp(); }); - m_ComponentFactory.Register("SoundEmitter", []() { return new Components::SoundEmitter(); }); - m_ComponentFactory.Register("Sprite", []() { return new Components::Sprite(); }); - m_ComponentFactory.Register("Stat", []() { return new Components::Stat(); }); - m_ComponentFactory.Register("Template", []() { return new Components::Template(); }); - m_ComponentFactory.Register("Transform", []() { return new Components::Transform(); }); -} - -void GameWorld::Update(double dt) -{ - World::Update(dt); -} - #endif // GameWorld_h__ diff --git a/Escape-the-Dawn/Model.cpp b/Escape-the-Dawn/Model.cpp index cd0f28d..b6eacf6 100644 --- a/Escape-the-Dawn/Model.cpp +++ b/Escape-the-Dawn/Model.cpp @@ -3,12 +3,61 @@ Model::Model(const char* path) { - - Loadobj(path, Vertices, Normals, TextureCoords); CreateBuffers(Vertices, Normals, TextureCoords); } +Model::Model(OBJ &obj) +{ + OBJ::MaterialInfo* currentMaterial = nullptr; + TextureGroup* currentTexGroup = nullptr; + int index = 0; + for (auto face : obj.Faces) { + if (face.Material == nullptr) { + LOG_ERROR("Missing material for .obj file \"%s\"", obj.Path().string().c_str()); + return; + } + // New material + if (face.Material != currentMaterial) { + currentMaterial = face.Material; + // Load texture + std::shared_ptr texture = std::make_shared(currentMaterial->TextureFile); + // TODO: Load material parameters + // Create new texture group (start index of new group is upcoming index) + TextureGroup texGroup = { texture, index, index }; + TextureGroups.push_back(texGroup); + currentTexGroup = &TextureGroups.back(); + } + + // Face definitions + for (auto faceDef : face.Definitions) { + glm::vec3 vertex; + std::tie(vertex.x, vertex.y, vertex.z) = obj.Vertices.at(faceDef.VertexIndex - 1); + Vertices.push_back(vertex); + + if (faceDef.NormalIndex != 0) { + glm::vec3 normal; + std::tie(normal.x, normal.y, normal.z) = obj.Normals.at(faceDef.NormalIndex - 1); + Normals.push_back(normal); + } + + if (faceDef.TextureCoordIndex != 0) { + glm::vec2 texCoord; + // TODO: W-coord? + std::tie(texCoord.x, texCoord.y, std::ignore) = obj.TextureCoords.at(faceDef.TextureCoordIndex - 1); + TextureCoords.push_back(texCoord); + } + + currentTexGroup->EndIndex = index; + index++; + } + } + + if (Vertices.size() > 0) { + CreateBuffers(Vertices, Normals, TextureCoords); + } +} + bool Model::Loadobj(const char* path, std::vector & out_vertices, std::vector &out_normals, std::vector & out_TextureCoords) { std::vector< unsigned int > vertexIndices, TextureCoordIndices, normalIndices; @@ -101,7 +150,7 @@ bool Model::Loadobj(const char* path, std::vector & out_vertices, st else if ( strcmp( lineHeader, "mtllib" ) == 0 ) { - const char* fileName; + char fileName[512]; fscanf(file, "%s\n", &fileName); @@ -127,7 +176,7 @@ bool Model::Loadobj(const char* path, std::vector & out_vertices, st } else if ( strcmp( mtllineHeader, "map_Kd" ) == 0 ) { - const char* textureFileName; + char textureFileName[512]; fscanf(mtlfile, "%s", textureFileName); texture.push_back(std::make_shared(textureFileName)); LOG_INFO("Texture Loaded\n"); @@ -142,27 +191,40 @@ bool Model::Loadobj(const char* path, std::vector & out_vertices, st } -void Model::CreateBuffers( std::vector _Vertices, std::vector _Normals, std::vector_TextureCoords) + +void Model::CreateBuffers( std::vector vertices, std::vector normals, std::vectortextureCoords) { LOG_INFO("Generating VertexBuffer"); glGenBuffers(1, &VertexBuffer); - glBindBuffer(GL_ARRAY_BUFFER, VertexBuffer); - glBufferData(GL_ARRAY_BUFFER, _Vertices.size() * sizeof(glm::vec3), &_Vertices[0], GL_STATIC_DRAW); - GLERROR("GLEW: BufferFail, VertexBuffer"); + if (vertices.size() > 0) { + glBindBuffer(GL_ARRAY_BUFFER, VertexBuffer); + glBufferData(GL_ARRAY_BUFFER, vertices.size() * sizeof(glm::vec3), &vertices[0], GL_STATIC_DRAW); + GLERROR("GLEW: BufferFail, VertexBuffer"); + } else { + LOG_WARNING("Created empty vertex buffer!"); + } LOG_INFO("Generating NormalBuffer"); glGenBuffers(1, &NormalBuffer); - glBindBuffer(GL_ARRAY_BUFFER, NormalBuffer); - glBufferData(GL_ARRAY_BUFFER, _Normals.size() * sizeof(glm::vec3), &_Normals[0], GL_STATIC_DRAW); - GLERROR("GLEW: BufferFail, NormalBuffer"); + if (normals.size() > 0) { + glBindBuffer(GL_ARRAY_BUFFER, NormalBuffer); + glBufferData(GL_ARRAY_BUFFER, normals.size() * sizeof(glm::vec3), &normals[0], GL_STATIC_DRAW); + GLERROR("GLEW: BufferFail, NormalBuffer"); + } else { + LOG_WARNING("Created empty normal buffer!"); + } LOG_INFO("Generating textureCoordBuffer"); glGenBuffers(1, &TextureCoordBuffer); - glBindBuffer(GL_ARRAY_BUFFER, TextureCoordBuffer); - glBufferData(GL_ARRAY_BUFFER, _TextureCoords.size() * sizeof(glm::vec2), &_TextureCoords[0], GL_STATIC_DRAW); - GLERROR("GLEW: BufferFail, TextureCoordBuffer"); + if (textureCoords.size() > 0) { + glBindBuffer(GL_ARRAY_BUFFER, TextureCoordBuffer); + glBufferData(GL_ARRAY_BUFFER, textureCoords.size() * sizeof(glm::vec2), &textureCoords[0], GL_STATIC_DRAW); + GLERROR("GLEW: BufferFail, TextureCoordBuffer"); + } else { + LOG_WARNING("Created empty texture coordinate buffer!"); + } glGenVertexArrays(1, &VAO); glBindVertexArray(VAO); @@ -172,13 +234,17 @@ void Model::CreateBuffers( std::vector _Vertices, std::vector #include -#define _CRT_SECURE_NO_WARNINGS -#include -#define GLFW_INCLUDE_GLU -#include -#include -#define GLM_FORCE_RADIANS +#include "OpenGL.h" #include #include #include #include -#include "glerror.h" #include +#include + +#include "glerror.h" #include "Texture.h" +#include "OBJ.h" class Model { public: + Model(OBJ &obj); + Model(const char* path); + + struct TextureGroup + { + std::shared_ptr Texture; + unsigned int StartIndex; + unsigned int EndIndex; + }; + + GLuint VAO; + std::vector TextureGroups; + + std::vector> texture; + glm::mat4 GetMatrix(); std::vector Vertices; + +private: + std::vector Normals; std::vector TextureCoords; GLuint VertexBuffer; GLuint NormalBuffer; GLuint TextureCoordBuffer; - GLuint VAO; - - std::vector> texture; - - Model(const char* path); bool Loadobj( const char* path, @@ -46,7 +57,7 @@ public: std::vector &out_normals, std::vector & out_TextureCoords ); - + void CreateBuffers( std::vector _Vertices, std::vector _Normals, diff --git a/Escape-the-Dawn/Models/ObstacleTexture.png b/Escape-the-Dawn/Models/ObstacleTexture.png new file mode 100644 index 0000000..fc55922 Binary files /dev/null and b/Escape-the-Dawn/Models/ObstacleTexture.png differ diff --git a/Escape-the-Dawn/Models/obstacle_cube_1.mtl b/Escape-the-Dawn/Models/obstacle_cube_1.mtl new file mode 100644 index 0000000..081e73f --- /dev/null +++ b/Escape-the-Dawn/Models/obstacle_cube_1.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'obstaclesandstuff.blend' +# Material Count: 1 + +newmtl Material.001 +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd ObstacleTexture.png diff --git a/Escape-the-Dawn/Models/obstacle_cube_1.obj b/Escape-the-Dawn/Models/obstacle_cube_1.obj new file mode 100644 index 0000000..f62d298 --- /dev/null +++ b/Escape-the-Dawn/Models/obstacle_cube_1.obj @@ -0,0 +1,36 @@ +# Blender v2.69 (sub 0) OBJ File: 'obstaclesandstuff.blend' +# www.blender.org +mtllib obstacle_cube_1.mtl +o Cube.001_Cube.018 +v -1.000000 -0.019077 1.000000 +v -1.000000 -0.019077 -1.000000 +v 1.000000 -0.019077 -1.000000 +v 1.000000 -0.019077 1.000000 +v -1.000000 1.980923 1.000000 +v -1.000000 1.980923 -1.000000 +v 1.000000 1.980923 -1.000000 +v 1.000000 1.980923 1.000000 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 0.000000 1.000000 +vt 1.000000 1.000000 +vn -1.000000 0.000000 0.000000 +vn 0.000000 0.000000 -1.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +usemtl Material.001 +s off +f 5/1/1 6/2/1 1/3/1 +f 6/1/2 7/2/2 2/3/2 +f 7/1/3 8/2/3 3/3/3 +f 8/1/4 5/2/4 4/3/4 +f 1/1/5 2/2/5 4/3/5 +f 8/1/6 7/2/6 5/3/6 +f 6/2/1 2/4/1 1/3/1 +f 7/2/2 3/4/2 2/3/2 +f 8/2/3 4/4/3 3/3/3 +f 5/2/4 1/4/4 4/3/4 +f 2/2/5 3/4/5 4/3/5 +f 7/2/6 6/4/6 5/3/6 diff --git a/Escape-the-Dawn/Models/obstacle_mountain_1.mtl b/Escape-the-Dawn/Models/obstacle_mountain_1.mtl new file mode 100644 index 0000000..5367bd3 --- /dev/null +++ b/Escape-the-Dawn/Models/obstacle_mountain_1.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'obstaclesandstuff.blend' +# Material Count: 1 + +newmtl Material +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.559600 0.559600 0.559600 +Ks 0.500000 0.500000 0.500000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd ObstacleTexture.png diff --git a/Escape-the-Dawn/Models/obstacle_mountain_1.obj b/Escape-the-Dawn/Models/obstacle_mountain_1.obj new file mode 100644 index 0000000..3f6a371 --- /dev/null +++ b/Escape-the-Dawn/Models/obstacle_mountain_1.obj @@ -0,0 +1,127 @@ +# Blender v2.69 (sub 0) OBJ File: 'obstaclesandstuff.blend' +# www.blender.org +mtllib obstacle_mountain_1.mtl +o Cube.004 +v 1.698819 0.000000 2.036847 +v 1.698819 0.000000 5.330842 +v -1.595176 0.000000 5.330841 +v -1.595175 0.000000 2.036846 +v 0.051821 8.843084 3.683845 +v 1.278842 0.000000 4.358418 +v 10.046223 0.000000 4.358419 +v 10.046223 0.000000 -4.408960 +v 1.278844 0.000000 -4.408961 +v 5.662531 17.390135 -0.025270 +v -6.655907 0.000000 1.637957 +v 2.108382 0.000000 1.637958 +v 2.108382 0.000000 -7.126330 +v -6.655905 0.000000 -7.126331 +v -2.273763 25.648932 -2.744185 +v -0.900829 0.000000 0.659354 +v 5.318377 0.000000 0.659354 +v 5.318377 0.000000 -5.559852 +v -0.900827 0.000000 -5.559853 +v 2.208774 24.324408 -2.450248 +v -2.753737 0.000000 -1.359767 +v -2.753737 0.000000 4.431494 +v -8.544997 0.000000 4.431493 +v -8.544996 0.000000 -1.359768 +v -5.649367 18.211798 1.535864 +vt 0.465364 0.552468 +vt 0.391639 0.552468 +vt 0.465364 0.478743 +vt 0.239247 0.239247 +vt 0.000250 0.000250 +vt 0.478243 0.000250 +vt 0.677193 0.198700 +vt 0.478743 0.000250 +vt 0.875642 0.000250 +vt 0.875643 0.397149 +vt 0.478743 0.397149 +vt 0.674971 0.725248 +vt 0.674971 0.921475 +vt 0.478743 0.725248 +vt 0.806342 0.397649 +vt 0.892489 0.483796 +vt 0.806342 0.569944 +vt 0.978636 0.569944 +vt 0.978636 0.397649 +vt 0.478243 0.478243 +vt 0.000250 0.478243 +vt 0.871629 0.921406 +vt 0.675471 0.921406 +vt 0.871629 0.725248 +vt 0.195695 0.674188 +vt 0.000250 0.478743 +vt 0.391139 0.478743 +vt 0.391139 0.869632 +vt 0.000250 0.869633 +vt 0.945537 0.724748 +vt 0.806342 0.724748 +vt 0.945537 0.585552 +vt 0.129867 0.999750 +vt 0.000250 0.999750 +vt 0.129867 0.870133 +vt 0.805842 0.397649 +vt 0.642293 0.561199 +vt 0.478743 0.397649 +vt 0.478743 0.724748 +vt 0.805842 0.724748 +vt 0.391639 0.478743 +vt 0.478743 0.921475 +vt 0.675471 0.725248 +vt 0.806342 0.585552 +vt 0.000250 0.870133 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 0.168411 -0.985717 +vn 0.000000 0.244433 -0.969666 +vn -0.969666 0.244432 -0.000000 +vn -0.000000 0.244433 0.969666 +vn 0.969666 0.244433 0.000000 +vn 0.983095 0.183098 0.000000 +vn -0.000001 0.183098 0.983095 +vn -0.983095 0.183098 -0.000000 +vn 0.000000 0.183098 -0.983095 +vn -0.985717 0.168411 -0.000000 +vn -0.000000 0.168411 0.985717 +vn 0.985717 0.168411 0.000000 +vn 0.000000 0.126807 -0.991927 +vn -0.991927 0.126807 -0.000000 +vn -0.000000 0.126807 0.991928 +vn 0.991928 0.126807 0.000000 +vn 0.987595 0.157025 0.000000 +vn -0.000000 0.157025 0.987595 +vn -0.987595 0.157025 -0.000000 +vn 0.000000 0.157025 -0.987595 +usemtl Material +s off +f 1/1/1 2/2/1 4/3/1 +f 15/4/2 13/5/2 14/6/2 +f 10/7/3 8/8/3 9/9/3 +f 6/10/4 10/7/4 9/9/4 +f 7/11/5 10/7/5 6/10/5 +f 8/8/6 10/7/6 7/11/6 +f 8/12/1 7/13/1 9/14/1 +f 1/15/7 5/16/7 2/17/7 +f 2/17/8 5/16/8 3/18/8 +f 3/18/9 5/16/9 4/19/9 +f 5/16/10 1/15/10 4/19/10 +f 11/20/11 15/4/11 14/6/11 +f 12/21/12 15/4/12 11/20/12 +f 13/5/13 15/4/13 12/21/13 +f 13/22/1 12/23/1 14/24/1 +f 20/25/14 18/26/14 19/27/14 +f 16/28/15 20/25/15 19/27/15 +f 17/29/16 20/25/16 16/28/16 +f 18/26/17 20/25/17 17/29/17 +f 18/30/1 17/31/1 19/32/1 +f 21/33/1 22/34/1 24/35/1 +f 21/36/18 25/37/18 22/38/18 +f 22/38/19 25/37/19 23/39/19 +f 23/39/20 25/37/20 24/40/20 +f 25/37/21 21/36/21 24/40/21 +f 2/2/1 3/41/1 4/3/1 +f 7/13/1 6/42/1 9/14/1 +f 12/23/1 11/43/1 14/24/1 +f 17/31/1 16/44/1 19/32/1 +f 22/34/1 23/45/1 24/35/1 diff --git a/Escape-the-Dawn/Models/obstacle_mountain_2.mtl b/Escape-the-Dawn/Models/obstacle_mountain_2.mtl new file mode 100644 index 0000000..5367bd3 --- /dev/null +++ b/Escape-the-Dawn/Models/obstacle_mountain_2.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'obstaclesandstuff.blend' +# Material Count: 1 + +newmtl Material +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.559600 0.559600 0.559600 +Ks 0.500000 0.500000 0.500000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd ObstacleTexture.png diff --git a/Escape-the-Dawn/Models/obstacle_mountain_2.obj b/Escape-the-Dawn/Models/obstacle_mountain_2.obj new file mode 100644 index 0000000..2d414f2 --- /dev/null +++ b/Escape-the-Dawn/Models/obstacle_mountain_2.obj @@ -0,0 +1,31 @@ +# Blender v2.69 (sub 0) OBJ File: 'obstaclesandstuff.blend' +# www.blender.org +mtllib obstacle_mountain_2.mtl +o Cube.011_Cube.026 +v -3.450152 0.000000 3.450150 +v 3.450150 0.000000 3.450151 +v 3.450150 0.000000 -3.450150 +v -3.450150 0.000000 -3.450152 +v -0.000001 15.531238 0.000001 +vt 0.341102 0.341102 +vt 0.682105 0.000100 +vt 0.682105 0.682105 +vt 0.000100 0.682105 +vt 0.000100 0.000100 +vt 0.999900 0.317695 +vt 0.682305 0.317695 +vt 0.999900 0.000100 +vt 0.682305 0.000100 +vn 0.000000 0.216857 -0.976204 +vn -0.976204 0.216856 -0.000000 +vn -0.000000 0.216856 0.976204 +vn 0.976204 0.216856 0.000000 +vn 0.000000 -1.000000 0.000000 +usemtl Material +s off +f 5/1/1 3/2/1 4/3/1 +f 1/4/2 5/1/2 4/3/2 +f 2/5/3 5/1/3 1/4/3 +f 3/2/4 5/1/4 2/5/4 +f 3/6/5 2/7/5 4/8/5 +f 2/7/5 1/9/5 4/8/5 diff --git a/Escape-the-Dawn/Models/plane.mtl b/Escape-the-Dawn/Models/plane.mtl new file mode 100644 index 0000000..2961836 --- /dev/null +++ b/Escape-the-Dawn/Models/plane.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'None' +# Material Count: 1 + +newmtl Material.001 +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd ObstacleTexture.png diff --git a/Escape-the-Dawn/Models/plane.obj b/Escape-the-Dawn/Models/plane.obj new file mode 100644 index 0000000..e266edb --- /dev/null +++ b/Escape-the-Dawn/Models/plane.obj @@ -0,0 +1,14 @@ +mtllib plane.mtl +o Plane +v -1000 0 1000 +v 1000 0 1000 +v 1000 0 -1000 +v -1000 0 -1000 +vn 0.000000 1.000000 0.000000 +vt 0 0 +vt 1 0 +vt 1 1 +vt 0 1 +usemtl Material.001 +f 1/1/1 3/3/1 4/4/1 +f 1/1/1 2/2/1 3/3/1 diff --git a/Escape-the-Dawn/Models/powerup.mtl b/Escape-the-Dawn/Models/powerup.mtl new file mode 100644 index 0000000..2ec2034 --- /dev/null +++ b/Escape-the-Dawn/Models/powerup.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'powerup.blend' +# Material Count: 1 + +newmtl Material.001 +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd powerupTexture.png diff --git a/Escape-the-Dawn/Models/powerupTexture.png b/Escape-the-Dawn/Models/powerupTexture.png new file mode 100644 index 0000000..4a0b586 Binary files /dev/null and b/Escape-the-Dawn/Models/powerupTexture.png differ diff --git a/Escape-the-Dawn/Models/ship.mtl b/Escape-the-Dawn/Models/ship.mtl new file mode 100644 index 0000000..10ab2cc --- /dev/null +++ b/Escape-the-Dawn/Models/ship.mtl @@ -0,0 +1,22 @@ +# Blender MTL File: 'tobbeljus.blend' +# Material Count: 2 + +newmtl Material +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 1.000000 1.000000 1.000000 +Ks 0.500000 0.500000 0.500000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd shiptexture.png + +newmtl Material.001 +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.000000 0.185023 0.800000 +Ks 1.000000 1.000000 1.000000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd shiptexture.png diff --git a/Escape-the-Dawn/Models/ship.obj b/Escape-the-Dawn/Models/ship.obj new file mode 100644 index 0000000..5a5f1c8 --- /dev/null +++ b/Escape-the-Dawn/Models/ship.obj @@ -0,0 +1,2958 @@ +# Blender v2.69 (sub 0) OBJ File: 'tobbeljus.blend' +# www.blender.org +mtllib ship.mtl +v 0.117236 0.299587 6.559841 +v 0.324341 0.481090 6.905114 +v 0.423477 -0.316654 -0.304352 +v 0.427758 0.696581 0.058565 +v 0.621621 0.027144 4.138368 +v 0.345871 0.507524 3.773931 +v 1.952591 0.352090 2.337833 +v 1.985312 -0.214850 2.688929 +v 2.013914 0.515389 0.684165 +v 2.036855 -0.232439 0.303358 +v 0.455547 0.113508 4.747051 +v 0.129610 0.202618 5.789790 +v 0.358437 0.446292 4.799500 +v 0.354630 0.411353 5.793681 +v 0.416720 0.543704 -0.368978 +v 0.301322 0.417499 6.856298 +v 0.527897 0.404722 3.908350 +v 1.948020 0.233896 2.370047 +v 2.015925 0.369784 0.310400 +v 0.400943 0.350274 4.765506 +v 0.401917 0.350218 5.782881 +v 0.161074 0.377759 6.693198 +v 2.043236 -0.085932 0.147291 +v 0.419873 -0.163219 -0.515769 +v 1.577128 0.468366 2.439980 +v 1.192302 0.539682 2.628440 +v 0.803759 0.558792 2.979264 +v 1.589869 0.619056 0.460810 +v 1.194588 0.684680 0.296899 +v 0.805800 0.701534 0.160615 +v 1.627097 -0.189114 2.872039 +v 1.261662 -0.136991 3.164031 +v 1.029966 -0.116624 3.384144 +v 1.597849 -0.221908 0.059074 +v 1.195406 -0.270044 -0.100739 +v 0.804289 -0.307479 -0.229905 +v 0.814778 0.451286 3.214498 +v 1.197541 0.415119 2.773030 +v 1.580362 0.344272 2.521692 +v 0.790603 0.544963 -0.276033 +v 1.179858 0.526375 -0.130050 +v 1.579043 0.463946 0.053439 +v 0.801070 -0.138262 -0.433530 +v 1.193544 -0.103915 -0.290931 +v 1.598375 -0.065934 -0.105385 +v 2.320887 -0.229636 2.574960 +v 2.644920 -0.229291 2.584155 +v 2.489091 -0.232370 0.642747 +v 2.868504 -0.223344 1.029566 +v 2.349141 0.215408 2.311896 +v 2.691946 0.111627 2.366908 +v 2.449730 0.390329 0.983754 +v 2.830573 0.296057 1.330833 +v 2.343739 0.107819 2.328760 +v 2.675895 0.013963 2.383724 +v 2.459031 0.265044 0.657785 +v 2.849938 0.202218 1.047844 +v 2.502680 -0.105444 0.494507 +v 2.890852 -0.118003 0.893353 +v 1.947041 0.294410 2.463854 +v 0.349295 0.466260 6.990689 +v 0.531007 0.454256 3.985010 +v 0.444543 0.408868 4.817740 +v 0.438010 0.378639 5.785810 +v 0.815673 0.505813 3.295627 +v 1.193197 0.483598 2.863483 +v 1.576420 0.411931 2.610260 +v 2.339913 0.158425 2.415190 +v 2.676252 0.056041 2.455757 +v 0.507794 -0.164057 2.591598 +v 0.479223 -0.247898 1.332138 +v 0.429973 0.607081 1.966295 +v 0.443708 0.688204 0.856565 +v 3.008110 -0.264817 2.427582 +v 3.083516 -0.258310 1.972352 +v 3.110829 0.187296 1.953433 +v 3.057021 0.117430 2.235085 +v 1.973672 0.434165 1.796787 +v 1.995056 0.508005 1.232198 +v 2.001597 -0.249838 1.288647 +v 1.962638 -0.247812 2.137464 +v 2.990720 -0.007504 2.564924 +v 3.227815 -0.147132 1.281353 +v 0.809339 0.634871 1.823923 +v 0.825586 0.700839 0.921572 +v 1.197374 0.615795 1.769138 +v 1.208417 0.683252 1.007775 +v 1.584350 0.546327 1.768844 +v 1.593390 0.615790 1.104330 +v 0.874999 -0.280695 1.356349 +v 0.915701 -0.226923 2.361416 +v 1.236759 -0.271886 1.248325 +v 1.285669 -0.245792 2.258040 +v 1.635805 -0.238588 1.248764 +v 1.648290 -0.230946 2.158659 +v 2.384831 0.299540 1.873770 +v 2.418568 0.376178 1.422616 +v 2.742535 0.194483 2.017441 +v 2.790464 0.271407 1.668237 +v 2.421739 -0.251583 1.467806 +v 2.373667 -0.253766 2.106943 +v 2.773771 -0.240457 1.700089 +v 2.705486 -0.245894 2.219531 +v 3.195535 0.151914 1.459648 +v 2.998088 -0.045333 2.497773 +v 3.162419 0.216370 1.690465 +v 3.004498 0.043246 2.502038 +v 3.198138 -0.242878 1.406684 +v 2.928763 -0.250386 2.647962 +v 3.254957 -0.288329 2.605663 +v 3.357178 -0.280173 2.292122 +v 3.386001 0.098648 2.256470 +v 3.310260 0.043718 2.485212 +v 3.217331 -0.056851 2.747656 +v 3.566251 -0.175367 1.724085 +v 3.501867 0.099848 1.885829 +v 3.232541 -0.089804 2.681171 +v 3.454760 0.130163 2.049479 +v 3.236603 -0.015237 2.698185 +v 3.515451 -0.262854 1.821309 +v 3.105948 -0.251793 2.754480 +v 3.400416 -0.270056 2.773339 +v 3.520741 -0.282606 2.621681 +v 3.568080 0.045307 2.517845 +v 3.474291 0.002176 2.696664 +v 3.362249 -0.092744 2.896826 +v 3.800669 -0.148335 2.264973 +v 3.675853 0.074477 2.214186 +v 3.393044 -0.127058 2.837407 +v 3.642837 0.073348 2.352953 +v 3.379239 -0.051551 2.863639 +v 3.696606 -0.252640 2.227819 +v 3.262121 -0.230672 2.856179 +v 3.547356 -0.055658 3.056237 +v 3.820001 0.028960 2.778458 +v 3.681925 -0.006613 2.943373 +v 3.883073 0.039100 2.609171 +v 3.808751 -0.144977 2.776886 +v 3.700545 -0.166800 2.892192 +v 3.872061 -0.131069 2.611734 +v 3.549414 -0.181021 3.079873 +v 0.472565 -0.286448 0.561748 +v 0.434724 -0.310357 0.031272 +v 2.016473 -0.249433 0.914467 +v 2.027647 -0.248029 0.580855 +v 0.828686 -0.300818 0.531343 +v 0.815573 -0.311938 0.116272 +v 1.210426 -0.279003 0.640202 +v 1.202332 -0.281103 0.236172 +v 1.599522 -0.239481 0.751257 +v 1.598595 -0.238210 0.372225 +v 2.447503 -0.249603 1.160580 +v 2.470054 -0.247247 0.879425 +v 2.808194 -0.237293 1.455678 +v 2.840648 -0.234854 1.225889 +v 3.122698 -0.255365 1.764254 +v 3.163072 -0.252816 1.571469 +v 3.412319 -0.277152 2.125635 +v 3.469628 -0.272609 1.964117 +v 3.591502 -0.273672 2.510798 +v 3.666319 -0.261392 2.381132 +v 2.041514 0.174260 0.142859 +v 0.419614 0.289378 -0.531416 +v 0.799323 0.284477 -0.446181 +v 1.190546 0.252403 -0.300517 +v 1.594818 0.221244 -0.110491 +v 2.502076 0.106173 0.491668 +v 2.895629 0.058108 0.884468 +v 3.232773 0.015906 1.278515 +v 3.566283 -0.022104 1.741666 +v 3.808039 0.006891 2.273369 +v 2.041070 -0.170664 0.193907 +v 0.420187 -0.265480 -0.448897 +v 0.801301 -0.248208 -0.370970 +v 1.193644 -0.207998 -0.234019 +v 1.597965 -0.157068 -0.059031 +v 2.497945 -0.177492 0.542147 +v 2.882473 -0.179367 0.939818 +v 3.216158 -0.203767 1.325741 +v 3.544465 -0.223841 1.758282 +v 3.752725 -0.203432 2.257508 +v 3.507477 -0.240749 3.007737 +v 3.622250 -0.237759 2.790168 +v 3.710397 -0.219845 2.687961 +v 3.781809 -0.202002 2.541364 +v 2.030870 0.258560 0.180515 +v 0.417701 0.411870 -0.506855 +v 3.472018 -0.063217 2.982076 +v 3.595108 -0.014857 2.843682 +v 3.717979 0.021478 2.679682 +v 3.787702 0.044093 2.519135 +v 0.793155 0.411861 -0.418119 +v 1.181861 0.385482 -0.268400 +v 1.584125 0.333257 -0.078044 +v 2.487490 0.172868 0.531444 +v 2.882976 0.121390 0.917041 +v 3.223179 0.078577 1.323788 +v 3.542779 0.040474 1.794311 +v 3.756280 0.043366 2.259360 +v 3.464783 -0.209776 2.973360 +v 3.500371 -0.148677 3.005133 +v 3.485524 -0.180339 2.989257 +v 3.460927 -0.102213 2.994294 +v 0.801070 -0.003553 -0.448225 +v 1.193544 0.007647 -0.304494 +v 1.598453 0.024446 -0.115459 +v 2.504112 -0.033491 0.483046 +v 2.894117 -0.059760 0.882072 +v 3.231997 -0.093112 1.270073 +v 3.573511 -0.128979 1.714601 +v 3.820963 -0.096251 2.265472 +v 3.916639 -0.057990 2.632724 +v 3.859901 -0.064334 2.807844 +v 3.734915 -0.090925 2.948798 +v 3.563399 -0.158865 3.082191 +v 2.043766 0.003861 0.136364 +v 0.419873 -0.026270 -0.531947 +v 0.800960 0.139506 -0.449290 +v 1.193297 0.122196 -0.305403 +v 1.598156 0.115549 -0.115853 +v 2.504385 0.035928 0.482909 +v 2.895847 -0.002725 0.881096 +v 3.233836 -0.039963 1.269933 +v 3.574553 -0.079306 1.718676 +v 3.824912 -0.044164 2.267822 +v 3.921445 0.001967 2.632526 +v 3.863716 -0.001934 2.807217 +v 3.727426 -0.033383 2.966116 +v 3.566884 -0.086863 3.058856 +v 2.043707 0.088926 0.135836 +v 0.419873 0.133447 -0.533189 +v 0.099506 0.279239 6.126289 +v 0.472049 0.134158 4.153421 +v 1.965377 -0.091364 2.497075 +v 0.352233 0.173880 4.789802 +v 0.072882 0.248390 5.781054 +v 0.116854 0.387079 6.126289 +v 0.279394 0.334085 3.739691 +v 1.972005 0.138332 2.027036 +v 0.146366 0.353451 4.743110 +v 0.100952 0.383773 5.794568 +v 0.119323 0.329664 6.126289 +v 0.225799 0.240764 3.700319 +v 0.097713 0.264307 4.731812 +v 0.088358 0.296989 5.777639 +v 1.969940 0.035632 2.008785 +v 1.603568 -0.058552 2.622665 +v 1.185730 -0.025010 2.918509 +v 0.909070 0.030613 3.228889 +v 0.565156 0.315660 2.910734 +v 1.122205 0.275523 2.273942 +v 1.587770 0.214975 2.080339 +v 0.567436 0.184818 2.821845 +v 1.125716 0.121583 2.213425 +v 1.590225 0.079791 2.048964 +v 2.341688 -0.124452 2.472321 +v 2.663836 -0.144842 2.490797 +v 2.375294 0.047391 2.098177 +v 2.758459 -0.022033 2.215294 +v 2.373162 -0.024712 2.079495 +v 2.751425 -0.074962 2.195186 +v 3.106045 -0.121476 2.360707 +v 3.109939 -0.073644 2.379622 +v 2.958313 -0.177355 2.594790 +v 3.359264 -0.161013 2.505716 +v 3.359710 -0.117289 2.529263 +v 3.132963 -0.189310 2.698997 +v 3.459365 -0.193409 2.675098 +v 3.455016 -0.147493 2.702224 +v 3.289505 -0.184366 2.813299 +v 3.446970 -0.198865 2.911810 +v 3.506180 -0.169007 2.832086 +v 3.463905 -0.182792 2.903210 +v 0.000000 0.487671 6.935850 +v 0.000000 0.327830 6.595587 +v -0.117236 0.299587 6.559841 +v -0.324341 0.481090 6.905114 +v 0.000000 0.681775 0.035131 +v 0.000000 -0.310139 -0.294527 +v -0.423477 -0.316654 -0.304352 +v -0.427758 0.696581 0.058565 +v 0.000000 0.508677 3.621453 +v 0.000000 -0.022970 4.099751 +v -0.621621 0.027144 4.138368 +v -0.345871 0.507524 3.773931 +v -1.952591 0.352090 2.337833 +v -1.985312 -0.214850 2.688929 +v -2.013914 0.515389 0.684165 +v -2.036855 -0.232439 0.303358 +v 0.000000 0.110781 4.782792 +v 0.000000 0.224206 5.804081 +v -0.455547 0.113508 4.747051 +v -0.129610 0.202618 5.789790 +v -0.358437 0.446292 4.799500 +v -0.354630 0.411353 5.793681 +v 0.000000 0.457499 4.810043 +v 0.000000 0.427185 5.800367 +v 0.000000 0.545136 -0.389153 +v 0.000000 0.456137 7.192425 +v -0.416720 0.543704 -0.368978 +v -0.301322 0.417499 6.856298 +v -0.527897 0.404722 3.908350 +v -1.948020 0.233896 2.370047 +v -2.015925 0.369784 0.310400 +v -0.400943 0.350274 4.765506 +v -0.401917 0.350218 5.782881 +v 0.000000 -0.163024 -0.533312 +v -0.161074 0.377759 6.693198 +v -2.043236 -0.085932 0.147291 +v 0.000000 0.408103 6.994631 +v -0.419873 -0.163219 -0.515769 +v -1.577128 0.468366 2.439980 +v -1.192302 0.539682 2.628440 +v -0.803759 0.558792 2.979264 +v -1.589869 0.619056 0.460810 +v -1.194588 0.684680 0.296899 +v -0.805800 0.701534 0.160615 +v -1.627097 -0.189114 2.872039 +v -1.261662 -0.136991 3.164031 +v -1.029966 -0.116624 3.384144 +v -1.597849 -0.221908 0.059074 +v -1.195406 -0.270044 -0.100739 +v -0.804289 -0.307479 -0.229905 +v -0.814778 0.451286 3.214498 +v -1.197541 0.415119 2.773030 +v -1.580362 0.344272 2.521692 +v -0.790603 0.544963 -0.276033 +v -1.179858 0.526375 -0.130050 +v -1.579043 0.463946 0.053439 +v -0.801070 -0.138262 -0.433530 +v -1.193544 -0.103915 -0.290931 +v -1.598375 -0.065934 -0.105385 +v -2.320887 -0.229636 2.574960 +v -2.644920 -0.229291 2.584155 +v -2.489091 -0.232370 0.642747 +v -2.868504 -0.223344 1.029566 +v -2.349141 0.215408 2.311896 +v -2.691946 0.111627 2.366908 +v -2.449730 0.390329 0.983754 +v -2.830573 0.296057 1.330833 +v -2.343739 0.107819 2.328760 +v -2.675895 0.013963 2.383724 +v -2.459031 0.265044 0.657785 +v -2.849938 0.202218 1.047844 +v -2.502680 -0.105444 0.494507 +v -2.890852 -0.118003 0.893353 +v 0.000000 0.486355 7.238743 +v -1.947041 0.294410 2.463854 +v -0.349295 0.466260 6.990689 +v -0.531007 0.454256 3.985010 +v -0.444543 0.408868 4.817740 +v -0.438010 0.378639 5.785810 +v -0.815673 0.505813 3.295627 +v -1.193197 0.483598 2.863483 +v -1.576420 0.411931 2.610260 +v -2.339913 0.158425 2.415190 +v -2.676252 0.056041 2.455757 +v 0.000000 0.603997 2.019246 +v 0.000000 0.678735 0.836384 +v 0.000000 -0.147374 2.682163 +v 0.000000 -0.235492 1.454163 +v -0.507794 -0.164057 2.591598 +v -0.479223 -0.247898 1.332138 +v -0.429973 0.607081 1.966295 +v -0.443708 0.688204 0.856565 +v -3.008110 -0.264817 2.427582 +v -3.083516 -0.258310 1.972352 +v -3.110829 0.187296 1.953433 +v -3.057021 0.117430 2.235085 +v -1.973672 0.434165 1.796787 +v -1.995056 0.508005 1.232198 +v -2.001597 -0.249838 1.288647 +v -1.962638 -0.247812 2.137464 +v -2.990720 -0.007504 2.564924 +v -3.227815 -0.147132 1.281353 +v -0.809339 0.634871 1.823923 +v -0.825586 0.700839 0.921572 +v -1.197374 0.615795 1.769138 +v -1.208417 0.683252 1.007775 +v -1.584350 0.546327 1.768844 +v -1.593390 0.615790 1.104330 +v -0.874999 -0.280695 1.356349 +v -0.915701 -0.226923 2.361416 +v -1.236759 -0.271886 1.248325 +v -1.285669 -0.245792 2.258040 +v -1.635805 -0.238588 1.248764 +v -1.648290 -0.230946 2.158659 +v -2.384831 0.299540 1.873770 +v -2.418568 0.376178 1.422616 +v -2.742535 0.194483 2.017441 +v -2.790464 0.271407 1.668237 +v -2.421739 -0.251583 1.467806 +v -2.373667 -0.253766 2.106943 +v -2.773771 -0.240457 1.700089 +v -2.705486 -0.245894 2.219531 +v -3.195535 0.151914 1.459648 +v -2.998088 -0.045333 2.497773 +v -3.162419 0.216370 1.690465 +v -3.004498 0.043246 2.502038 +v -3.198138 -0.242878 1.406684 +v -2.928763 -0.250386 2.647962 +v -3.254957 -0.288329 2.605663 +v -3.357178 -0.280173 2.292122 +v -3.386001 0.098648 2.256470 +v -3.310260 0.043718 2.485212 +v -3.217331 -0.056851 2.747656 +v -3.566251 -0.175367 1.724085 +v -3.501867 0.099848 1.885829 +v -3.232541 -0.089804 2.681171 +v -3.454760 0.130163 2.049479 +v -3.236603 -0.015237 2.698185 +v -3.515451 -0.262854 1.821309 +v -3.105948 -0.251793 2.754480 +v -3.400416 -0.270056 2.773339 +v -3.520741 -0.282606 2.621681 +v -3.568080 0.045307 2.517845 +v -3.474291 0.002176 2.696664 +v -3.362249 -0.092744 2.896826 +v -3.800669 -0.148335 2.264973 +v -3.675853 0.074477 2.214186 +v -3.393044 -0.127058 2.837407 +v -3.642837 0.073348 2.352953 +v -3.379239 -0.051551 2.863639 +v -3.696606 -0.252640 2.227819 +v -3.262121 -0.230672 2.856179 +v -3.547356 -0.055658 3.056237 +v -3.820001 0.028960 2.778458 +v -3.681925 -0.006613 2.943373 +v -3.883073 0.039100 2.609171 +v -3.808751 -0.144977 2.776886 +v -3.700545 -0.166800 2.892192 +v -3.872061 -0.131069 2.611734 +v -3.549414 -0.181021 3.079873 +v 0.000000 -0.280789 0.573616 +v 0.000000 -0.306828 0.022720 +v -0.472565 -0.286448 0.561748 +v -0.434724 -0.310357 0.031272 +v -2.016473 -0.249433 0.914467 +v -2.027647 -0.248029 0.580855 +v -0.828686 -0.300818 0.531343 +v -0.815573 -0.311938 0.116272 +v -1.210426 -0.279003 0.640202 +v -1.202332 -0.281103 0.236172 +v -1.599522 -0.239481 0.751257 +v -1.598595 -0.238210 0.372225 +v -2.447503 -0.249603 1.160580 +v -2.470054 -0.247247 0.879425 +v -2.808194 -0.237293 1.455678 +v -2.840648 -0.234854 1.225889 +v -3.122698 -0.255365 1.764254 +v -3.163072 -0.252816 1.571469 +v -3.412319 -0.277152 2.125635 +v -3.469628 -0.272609 1.964117 +v -3.591502 -0.273672 2.510798 +v -3.666319 -0.261392 2.381132 +v 0.000000 0.284649 -0.557998 +v -2.041514 0.174260 0.142859 +v -0.419614 0.289378 -0.531416 +v -0.799323 0.284477 -0.446181 +v -1.190546 0.252403 -0.300517 +v -1.594818 0.221244 -0.110491 +v -2.502076 0.106173 0.491668 +v -2.895629 0.058108 0.884468 +v -3.232773 0.015906 1.278515 +v -3.566283 -0.022104 1.741666 +v -3.808039 0.006891 2.273369 +v 0.000000 -0.259226 -0.455402 +v -2.041070 -0.170664 0.193907 +v -0.420187 -0.265480 -0.448897 +v -0.801301 -0.248208 -0.370970 +v -1.193644 -0.207998 -0.234019 +v -1.597965 -0.157068 -0.059031 +v -2.497945 -0.177492 0.542147 +v -2.882473 -0.179367 0.939818 +v -3.216158 -0.203767 1.325741 +v -3.544465 -0.223841 1.758282 +v -3.752725 -0.203432 2.257508 +v -3.507477 -0.240749 3.007737 +v -3.622250 -0.237759 2.790168 +v -3.710397 -0.219845 2.687961 +v -3.781809 -0.202002 2.541364 +v 0.000000 0.410923 -0.531973 +v -2.030870 0.258560 0.180515 +v -0.417701 0.411870 -0.506855 +v -3.472018 -0.063217 2.982076 +v -3.595108 -0.014857 2.843682 +v -3.717979 0.021478 2.679682 +v -3.787702 0.044093 2.519135 +v -0.793155 0.411861 -0.418119 +v -1.181861 0.385482 -0.268400 +v -1.584125 0.333257 -0.078044 +v -2.487490 0.172868 0.531444 +v -2.882976 0.121390 0.917041 +v -3.223179 0.078577 1.323788 +v -3.542779 0.040474 1.794311 +v -3.756280 0.043366 2.259360 +v -3.464783 -0.209776 2.973360 +v -3.500371 -0.148677 3.005133 +v -3.485524 -0.180339 2.989257 +v -3.460927 -0.102213 2.994294 +v -0.801070 -0.003553 -0.448225 +v -1.193544 0.007647 -0.304494 +v -1.598453 0.024446 -0.115459 +v -2.504112 -0.033491 0.483046 +v -2.894117 -0.059760 0.882072 +v -3.231997 -0.093112 1.270073 +v -3.573511 -0.128979 1.714601 +v -3.820963 -0.096251 2.265472 +v 0.000000 -0.033445 -0.556802 +v -3.916639 -0.057990 2.632724 +v -3.859901 -0.064334 2.807844 +v -3.734915 -0.090925 2.948798 +v -3.563399 -0.158865 3.082191 +v -2.043766 0.003861 0.136364 +v -0.419873 -0.026270 -0.531947 +v -0.800960 0.139506 -0.449290 +v -1.193297 0.122196 -0.305403 +v -1.598156 0.115549 -0.115853 +v -2.504385 0.035928 0.482909 +v -2.895847 -0.002725 0.881096 +v -3.233836 -0.039963 1.269933 +v -3.574553 -0.079306 1.718676 +v -3.824912 -0.044164 2.267822 +v 0.000000 0.126627 -0.559770 +v -3.921445 0.001967 2.632526 +v -3.863716 -0.001934 2.807217 +v -3.727426 -0.033383 2.966116 +v -3.566884 -0.086863 3.058856 +v -2.043707 0.088926 0.135836 +v -0.419873 0.133447 -0.533189 +v -0.099506 0.279239 6.126289 +v -0.472049 0.134158 4.153421 +v -1.965377 -0.091364 2.497075 +v -0.352233 0.173880 4.789802 +v -0.072882 0.248390 5.781054 +v -0.116854 0.387079 6.126289 +v -0.279394 0.334085 3.739691 +v -1.972005 0.138332 2.027036 +v -0.146366 0.353451 4.743110 +v -0.100952 0.383773 5.794568 +v -0.119323 0.329664 6.126289 +v -0.225799 0.240764 3.700319 +v -0.097713 0.264307 4.731812 +v -0.088358 0.296989 5.777639 +v -1.969940 0.035632 2.008785 +v -1.603568 -0.058552 2.622665 +v -1.185730 -0.025010 2.918509 +v -0.909070 0.030613 3.228889 +v -0.565156 0.315660 2.910734 +v -1.122205 0.275523 2.273942 +v -1.587770 0.214975 2.080339 +v -0.567436 0.184818 2.821845 +v -1.125716 0.121583 2.213425 +v -1.590225 0.079791 2.048964 +v -2.341688 -0.124452 2.472321 +v -2.663836 -0.144842 2.490797 +v -2.375294 0.047391 2.098177 +v -2.758459 -0.022033 2.215294 +v -2.373162 -0.024712 2.079495 +v -2.751425 -0.074962 2.195186 +v -3.106045 -0.121476 2.360707 +v -3.109939 -0.073644 2.379622 +v -2.958313 -0.177355 2.594790 +v -3.359264 -0.161013 2.505716 +v -3.359710 -0.117289 2.529263 +v -3.132963 -0.189310 2.698997 +v -3.459365 -0.193409 2.675098 +v -3.455016 -0.147493 2.702224 +v -3.289505 -0.184366 2.813299 +v -3.446970 -0.198865 2.911810 +v -3.506180 -0.169007 2.832086 +v -3.463905 -0.182792 2.903210 +vt 0.708083 0.498496 +vt 0.716698 0.497066 +vt 0.710131 0.547586 +vt 0.282654 0.155119 +vt 0.276826 0.155556 +vt 0.259923 0.094767 +vt 0.251890 0.157887 +vt 0.248204 0.094867 +vt 0.711185 0.572874 +vt 0.716930 0.544549 +vt 0.711802 0.085370 +vt 0.712520 0.092922 +vt 0.690847 0.085765 +vt 0.698744 0.274785 +vt 0.734830 0.266106 +vt 0.703222 0.382034 +vt 0.298540 0.453037 +vt 0.269006 0.450512 +vt 0.291435 0.310769 +vt 0.867380 0.236357 +vt 0.889719 0.222942 +vt 0.894676 0.231198 +vt 0.373695 0.475185 +vt 0.383754 0.428870 +vt 0.399814 0.479911 +vt 0.778787 0.117169 +vt 0.775048 0.100675 +vt 0.804044 0.122348 +vt 0.750842 0.385781 +vt 0.705248 0.430572 +vt 0.734150 0.427561 +vt 0.306286 0.291635 +vt 0.290893 0.223418 +vt 0.284159 0.225718 +vt 0.261681 0.325260 +vt 0.255972 0.227660 +vt 0.948475 0.201590 +vt 0.950472 0.202132 +vt 0.944453 0.209730 +vt 0.247517 0.083125 +vt 0.247302 0.079453 +vt 0.266213 0.093211 +vt 0.387617 0.416075 +vt 0.395384 0.413198 +vt 0.420692 0.428590 +vt 0.356230 0.581153 +vt 0.355503 0.571877 +vt 0.380513 0.564473 +vt 0.312568 0.295725 +vt 0.296973 0.225861 +vt 0.336230 0.295136 +vt 0.720707 0.553418 +vt 0.719320 0.519390 +vt 0.711721 0.585721 +vt 0.712036 0.072342 +vt 0.711675 0.079330 +vt 0.690583 0.079463 +vt 0.509603 0.462093 +vt 0.490819 0.457407 +vt 0.512379 0.450719 +vt 0.820444 0.274944 +vt 0.844082 0.253282 +vt 0.856942 0.263877 +vt 0.774026 0.093621 +vt 0.774424 0.088283 +vt 0.799391 0.101598 +vt 0.532142 0.469114 +vt 0.522496 0.464573 +vt 0.521693 0.456459 +vt 0.781102 0.324695 +vt 0.795870 0.303128 +vt 0.815215 0.309681 +vt 0.285518 0.154634 +vt 0.294076 0.128865 +vt 0.468483 0.450602 +vt 0.446561 0.441610 +vt 0.474850 0.440636 +vt 0.922911 0.207713 +vt 0.933324 0.204542 +vt 0.924512 0.212730 +vt 0.323443 0.463868 +vt 0.329365 0.378238 +vt 0.348399 0.470540 +vt 0.357054 0.409364 +vt 0.714601 0.109859 +vt 0.734911 0.111864 +vt 0.731733 0.094473 +vt 0.756236 0.114579 +vt 0.752474 0.097314 +vt 0.339327 0.353348 +vt 0.331504 0.351376 +vt 0.369400 0.389868 +vt 0.360429 0.390478 +vt 0.297420 0.595794 +vt 0.296945 0.586702 +vt 0.314896 0.582629 +vt 0.315335 0.591950 +vt 0.334309 0.577359 +vt 0.334886 0.587028 +vt 0.946273 0.200772 +vt 0.934708 0.208129 +vt 0.368146 0.344844 +vt 0.730774 0.086927 +vt 0.730991 0.080611 +vt 0.751417 0.089862 +vt 0.751833 0.083804 +vt 0.875431 0.244193 +vt 0.496003 0.448584 +vt 0.410480 0.443150 +vt 0.438923 0.455018 +vt 0.428200 0.484044 +vt 0.463788 0.462867 +vt 0.800416 0.108058 +vt 0.832007 0.129999 +vt 0.828412 0.117740 +vt 0.858627 0.139630 +vt 0.414439 0.433531 +vt 0.442694 0.447424 +vt 0.381263 0.573221 +vt 0.408544 0.554162 +vt 0.409261 0.562520 +vt 0.435639 0.541546 +vt 0.421426 0.400292 +vt 0.721376 0.497940 +vt 0.799692 0.096583 +vt 0.827346 0.111785 +vt 0.827542 0.107248 +vt 0.854416 0.123506 +vt 0.260669 0.091227 +vt 0.467121 0.456288 +vt 0.693147 0.140786 +vt 0.719344 0.138073 +vt 0.695318 0.192737 +vt 0.724406 0.183059 +vt 0.297282 0.564547 +vt 0.275788 0.566536 +vt 0.298459 0.522189 +vt 0.273283 0.523676 +vt 0.303441 0.148219 +vt 0.439501 0.525369 +vt 0.445952 0.506519 +vt 0.471519 0.500912 +vt 0.879107 0.197731 +vt 0.909584 0.212833 +vt 0.358314 0.549860 +vt 0.365355 0.515377 +vt 0.390551 0.513809 +vt 0.809066 0.222205 +vt 0.829518 0.214301 +vt 0.792852 0.165047 +vt 0.490834 0.462628 +vt 0.435764 0.550042 +vt 0.462412 0.528783 +vt 0.759159 0.396047 +vt 0.854481 0.119293 +vt 0.879944 0.135020 +vt 0.320243 0.519672 +vt 0.316427 0.559942 +vt 0.342393 0.517082 +vt 0.336653 0.554848 +vt 0.761363 0.246325 +vt 0.748762 0.181146 +vt 0.785996 0.234591 +vt 0.769258 0.170654 +vt 0.383387 0.543661 +vt 0.418932 0.511113 +vt 0.411848 0.535449 +vt 0.454053 0.485502 +vt 0.855312 0.201597 +vt 0.814708 0.161077 +vt 0.842041 0.162396 +vt 0.487826 0.467412 +vt 0.478970 0.484237 +vt 0.855506 0.128949 +vt 0.883552 0.149054 +vt 0.867117 0.166244 +vt 0.903701 0.197513 +vt 0.466051 0.515682 +vt 0.495511 0.495547 +vt 0.510363 0.466532 +vt 0.461426 0.537312 +vt 0.488963 0.516777 +vt 0.839340 0.283614 +vt 0.879966 0.131011 +vt 0.906800 0.146931 +vt 0.508197 0.469938 +vt 0.501259 0.482228 +vt 0.880954 0.139970 +vt 0.909195 0.158994 +vt 0.891276 0.171300 +vt 0.922324 0.195090 +vt 0.491468 0.507446 +vt 0.512750 0.491120 +vt 0.934879 0.196085 +vt 0.522387 0.468646 +vt 0.488959 0.523121 +vt 0.511845 0.508038 +vt 0.912794 0.218655 +vt 0.907421 0.143615 +vt 0.934514 0.159331 +vt 0.520920 0.471235 +vt 0.516439 0.480871 +vt 0.907008 0.151179 +vt 0.931132 0.170354 +vt 0.914959 0.177321 +vt 0.298259 0.601759 +vt 0.528478 0.472553 +vt 0.532466 0.474368 +vt 0.526072 0.481130 +vt 0.523800 0.490606 +vt 0.532117 0.481780 +vt 0.530249 0.491018 +vt 0.520996 0.498525 +vt 0.360488 0.591601 +vt 0.358321 0.586664 +vt 0.384744 0.581667 +vt 0.956873 0.178614 +vt 0.951883 0.179974 +vt 0.948680 0.171451 +vt 0.956873 0.188476 +vt 0.951996 0.187987 +vt 0.382838 0.577704 +vt 0.953356 0.198716 +vt 0.952186 0.198674 +vt 0.944322 0.187624 +vt 0.783725 0.137532 +vt 0.808861 0.140110 +vt 0.738850 0.133911 +vt 0.760947 0.136199 +vt 0.836623 0.145125 +vt 0.862534 0.152365 +vt 0.691208 0.094414 +vt 0.691895 0.110841 +vt 0.886922 0.159731 +vt 0.911751 0.168002 +vt 0.933697 0.185314 +vt 0.932554 0.178275 +vt 0.944006 0.180599 +vt 0.931319 0.161631 +vt 0.277072 0.588496 +vt 0.509867 0.500393 +vt 0.277987 0.604158 +vt 0.299462 0.609446 +vt 0.318692 0.605121 +vt 0.316849 0.598152 +vt 0.339180 0.599689 +vt 0.336958 0.593502 +vt 0.412186 0.569759 +vt 0.410537 0.566448 +vt 0.438501 0.556565 +vt 0.436957 0.553712 +vt 0.463251 0.544285 +vt 0.461995 0.541499 +vt 0.489598 0.527667 +vt 0.490587 0.530870 +vt 0.514868 0.509490 +vt 0.526868 0.497969 +vt 0.516540 0.511784 +vt 0.529364 0.498734 +vt 0.948380 0.198425 +vt 0.941784 0.172427 +vt 0.927295 0.162995 +vt 0.277624 0.597946 +vt 0.506801 0.507348 +vt 0.454771 0.428977 +vt 0.529351 0.470505 +vt 0.300712 0.617559 +vt 0.278919 0.620114 +vt 0.775495 0.083682 +vt 0.532963 0.491626 +vt 0.535941 0.492161 +vt 0.534485 0.482541 +vt 0.537242 0.482873 +vt 0.534128 0.473956 +vt 0.537024 0.471554 +vt 0.732032 0.073821 +vt 0.753033 0.078167 +vt 0.800821 0.092016 +vt 0.828583 0.103561 +vt 0.855378 0.116214 +vt 0.880763 0.128102 +vt 0.908393 0.141205 +vt 0.936637 0.157188 +vt 0.952979 0.169518 +vt 0.362375 0.595905 +vt 0.386752 0.585576 +vt 0.320560 0.612288 +vt 0.341162 0.605220 +vt 0.413974 0.572916 +vt 0.440019 0.559190 +vt 0.464651 0.546790 +vt 0.491804 0.533257 +vt 0.517977 0.514102 +vt 0.278443 0.611954 +vt 0.872333 0.297916 +vt 0.883637 0.281340 +vt 0.724508 0.498473 +vt 0.722576 0.519985 +vt 0.793160 0.388589 +vt 0.738833 0.434271 +vt 0.754649 0.441164 +vt 0.828030 0.348283 +vt 0.797193 0.332203 +vt 0.858163 0.318261 +vt 0.893978 0.261971 +vt 0.906679 0.245940 +vt 0.922769 0.232790 +vt 0.936280 0.225254 +vt 0.942812 0.216905 +vt 0.944022 0.204095 +vt 0.437221 0.413892 +vt 0.403034 0.381027 +vt 0.699380 0.497789 +vt 0.221014 0.158725 +vt 0.235399 0.092705 +vt 0.236552 0.096135 +vt 0.226853 0.158479 +vt 0.700076 0.554278 +vt 0.703102 0.545125 +vt 0.669932 0.087121 +vt 0.669847 0.094706 +vt 0.662061 0.269144 +vt 0.239968 0.456462 +vt 0.230440 0.314337 +vt 0.527499 0.250549 +vt 0.520130 0.259027 +vt 0.499870 0.247682 +vt 0.167909 0.487217 +vt 0.142520 0.494954 +vt 0.152521 0.442393 +vt 0.605838 0.124398 +vt 0.581103 0.131666 +vt 0.608187 0.107651 +vt 0.656080 0.389737 +vt 0.676196 0.429980 +vt 0.213460 0.297064 +vt 0.220794 0.227518 +vt 0.227750 0.229018 +vt 0.443803 0.222659 +vt 0.447659 0.225846 +vt 0.448487 0.230434 +vt 0.230124 0.095323 +vt 0.147192 0.430136 +vt 0.122590 0.450599 +vt 0.115804 0.446421 +vt 0.197599 0.590423 +vt 0.171813 0.585462 +vt 0.171539 0.576685 +vt 0.207697 0.301859 +vt 0.184127 0.304032 +vt 0.215040 0.230653 +vt 0.695430 0.521117 +vt 0.698626 0.520253 +vt 0.691669 0.565286 +vt 0.668611 0.074158 +vt 0.690298 0.072643 +vt 0.031425 0.490056 +vt 0.027342 0.479087 +vt 0.049529 0.483213 +vt 0.577484 0.285089 +vt 0.559376 0.295302 +vt 0.540193 0.277101 +vt 0.608617 0.100537 +vt 0.584008 0.110602 +vt 0.607774 0.095251 +vt 0.009865 0.499655 +vt 0.013154 0.491020 +vt 0.018764 0.485872 +vt 0.620835 0.331387 +vt 0.605425 0.340209 +vt 0.585589 0.319268 +vt 0.218113 0.158577 +vt 0.199565 0.154296 +vt 0.206609 0.133982 +vt 0.070913 0.473852 +vt 0.063429 0.464699 +vt 0.091633 0.462367 +vt 0.469782 0.226633 +vt 0.468605 0.231764 +vt 0.459144 0.224341 +vt 0.216497 0.470121 +vt 0.192490 0.479656 +vt 0.200634 0.385767 +vt 0.176763 0.419909 +vt 0.669187 0.111758 +vt 0.649115 0.115451 +vt 0.628092 0.119936 +vt 0.650831 0.097856 +vt 0.630400 0.102418 +vt 0.195379 0.359338 +vt 0.187839 0.362209 +vt 0.171209 0.401545 +vt 0.162230 0.401985 +vt 0.139144 0.428184 +vt 0.257712 0.598114 +vt 0.239472 0.596383 +vt 0.238822 0.587074 +vt 0.219481 0.593771 +vt 0.218928 0.584102 +vt 0.197240 0.581126 +vt 0.458063 0.228030 +vt 0.445929 0.221661 +vt 0.158225 0.357123 +vt 0.651157 0.090256 +vt 0.669554 0.081091 +vt 0.630831 0.094904 +vt 0.650413 0.083981 +vt 0.629911 0.088902 +vt 0.552125 0.265472 +vt 0.043353 0.475058 +vt 0.114812 0.502365 +vt 0.100781 0.474791 +vt 0.089310 0.506826 +vt 0.077006 0.485484 +vt 0.553878 0.141622 +vt 0.583526 0.117125 +vt 0.528157 0.153440 +vt 0.556438 0.129108 +vt 0.096152 0.467690 +vt 0.072928 0.479340 +vt 0.142760 0.578094 +vt 0.142499 0.569710 +vt 0.114987 0.568787 +vt 0.114122 0.560335 +vt 0.111776 0.418404 +vt 0.694791 0.499050 +vt 0.557003 0.123085 +vt 0.583289 0.105630 +vt 0.531008 0.137022 +vt 0.556429 0.118581 +vt 0.127644 0.459689 +vt 0.666815 0.140269 +vt 0.665524 0.185519 +vt 0.254209 0.567065 +vt 0.248106 0.525133 +vt 0.196356 0.229227 +vt 0.108403 0.544720 +vt 0.080911 0.538192 +vt 0.073762 0.524162 +vt 0.504122 0.239043 +vt 0.483487 0.230624 +vt 0.512595 0.213038 +vt 0.191884 0.559587 +vt 0.166261 0.556351 +vt 0.155669 0.527538 +vt 0.180874 0.526161 +vt 0.563388 0.225416 +vt 0.584426 0.231587 +vt 0.595816 0.173279 +vt 0.053667 0.492799 +vt 0.050122 0.488400 +vt 0.088021 0.559132 +vt 0.086049 0.550777 +vt 0.648647 0.400661 +vt 0.506533 0.150625 +vt 0.530592 0.132830 +vt 0.234659 0.564721 +vt 0.226178 0.525170 +vt 0.213978 0.562017 +vt 0.203878 0.525179 +vt 0.633972 0.251645 +vt 0.641093 0.185645 +vt 0.604320 0.311125 +vt 0.608447 0.242006 +vt 0.619795 0.176899 +vt 0.137039 0.551510 +vt 0.127170 0.528167 +vt 0.099802 0.526752 +vt 0.536627 0.214907 +vt 0.573708 0.171147 +vt 0.546583 0.174740 +vt 0.064420 0.508473 +vt 0.504109 0.164908 +vt 0.530376 0.142537 +vt 0.488073 0.214871 +vt 0.521918 0.180665 +vt 0.054715 0.532972 +vt 0.049314 0.521629 +vt 0.033735 0.497681 +vt 0.031187 0.494552 +vt 0.059030 0.548245 +vt 0.058288 0.541946 +vt 0.480768 0.164732 +vt 0.506176 0.146632 +vt 0.042056 0.509075 +vt 0.479389 0.176951 +vt 0.505939 0.155641 +vt 0.469317 0.214007 +vt 0.498268 0.187718 +vt 0.035626 0.528113 +vt 0.031684 0.519242 +vt 0.456890 0.216044 +vt 0.021254 0.500452 +vt 0.019497 0.498053 +vt 0.034552 0.535932 +vt 0.480773 0.236693 +vt 0.457566 0.181424 +vt 0.454192 0.179399 +vt 0.026827 0.509496 +vt 0.458481 0.190098 +vt 0.480916 0.168982 +vt 0.475174 0.195690 +vt 0.257574 0.604136 +vt 0.238690 0.602719 +vt 0.013905 0.502642 +vt 0.017293 0.510876 +vt 0.010157 0.504909 +vt 0.020653 0.520019 +vt 0.014299 0.521180 +vt 0.011367 0.512227 +vt 0.024360 0.527554 +vt 0.194586 0.601296 +vt 0.169340 0.594255 +vt 0.196164 0.596140 +vt 0.433527 0.200470 +vt 0.436650 0.191086 +vt 0.441092 0.192653 +vt 0.438611 0.201409 +vt 0.439165 0.209400 +vt 0.170771 0.590097 +vt 0.434347 0.210293 +vt 0.439864 0.220062 +vt 0.446779 0.208401 +vt 0.443635 0.219498 +vt 0.602616 0.145101 +vt 0.577785 0.149767 +vt 0.647030 0.137748 +vt 0.625202 0.141872 +vt 0.550540 0.157079 +vt 0.525326 0.166455 +vt 0.501641 0.175828 +vt 0.477593 0.186139 +vt 0.457172 0.205214 +vt 0.457724 0.198107 +vt 0.446510 0.201376 +vt 0.448042 0.193050 +vt 0.257125 0.589029 +vt 0.257274 0.611911 +vt 0.237672 0.609855 +vt 0.216691 0.606846 +vt 0.218177 0.600443 +vt 0.140698 0.585624 +vt 0.113027 0.575584 +vt 0.141950 0.582144 +vt 0.087019 0.566268 +vt 0.114229 0.572571 +vt 0.058316 0.556128 +vt 0.058924 0.552832 +vt 0.030327 0.540199 +vt 0.031720 0.537726 +vt 0.018465 0.527686 +vt 0.016078 0.528736 +vt 0.461690 0.182447 +vt 0.087943 0.563356 +vt 0.039479 0.534660 +vt 0.018913 0.494021 +vt 0.082007 0.450780 +vt 0.012799 0.500710 +vt 0.606323 0.090756 +vt 0.011676 0.522100 +vt 0.008781 0.522979 +vt 0.006407 0.513909 +vt 0.009105 0.513258 +vt 0.005304 0.502646 +vt 0.648809 0.077301 +vt 0.628245 0.083385 +vt 0.581783 0.101173 +vt 0.555084 0.114994 +vt 0.529441 0.129837 +vt 0.479873 0.161481 +vt 0.505140 0.143800 +vt 0.451899 0.177441 +vt 0.193214 0.605790 +vt 0.167800 0.598371 +vt 0.256977 0.620114 +vt 0.236651 0.617191 +vt 0.215367 0.612570 +vt 0.139290 0.588968 +vt 0.111825 0.578367 +vt 0.085921 0.568919 +vt 0.057385 0.558640 +vt 0.029171 0.542667 +vt 0.013849 0.530836 +vt 0.008458 0.504694 +vt 0.438702 0.220202 +vt 0.527691 0.312303 +vt 0.515047 0.296726 +vt 0.672089 0.437057 +vt 0.614144 0.396062 +vt 0.656902 0.445244 +vt 0.576036 0.358803 +vt 0.543506 0.331396 +vt 0.503129 0.278286 +vt 0.489138 0.263371 +vt 0.472012 0.251607 +vt 0.457922 0.245222 +vt 0.450719 0.237447 +vt 0.448448 0.224784 +vt 0.097675 0.433752 +vt 0.127795 0.397127 +vt 0.944896 0.205087 +vt 0.315364 0.222267 +vt 0.730001 0.563687 +vt 0.527867 0.460920 +vt 0.531822 0.500560 +vt 0.441859 0.223366 +vt 0.478703 0.159161 +vt 0.691714 0.499841 +vt 0.191172 0.902971 +vt 0.200042 0.893264 +vt 0.233077 0.884066 +vt 0.253382 0.878149 +vt 0.253321 0.883523 +vt 0.233731 0.887460 +vt 0.376777 0.855232 +vt 0.375716 0.862048 +vt 0.315410 0.870844 +vt 0.314912 0.864714 +vt 0.509622 0.867847 +vt 0.512577 0.860032 +vt 0.535218 0.864802 +vt 0.433530 0.852067 +vt 0.428477 0.860138 +vt 0.483324 0.854515 +vt 0.479344 0.863645 +vt 0.533244 0.870763 +vt 0.559497 0.870357 +vt 0.558191 0.874647 +vt 0.582018 0.880227 +vt 0.582602 0.876844 +vt 0.604467 0.887369 +vt 0.605109 0.884331 +vt 0.621270 0.892999 +vt 0.621879 0.890072 +vt 0.631870 0.898679 +vt 0.632567 0.895534 +vt 0.644255 0.902777 +vt 0.189310 0.931171 +vt 0.231986 0.946718 +vt 0.231332 0.950117 +vt 0.251657 0.956031 +vt 0.375048 0.978889 +vt 0.313195 0.969439 +vt 0.313691 0.963309 +vt 0.251593 0.950655 +vt 0.507841 0.966219 +vt 0.531454 0.963299 +vt 0.533427 0.969259 +vt 0.373984 0.972075 +vt 0.426727 0.973959 +vt 0.431783 0.982026 +vt 0.477574 0.970431 +vt 0.481556 0.979556 +vt 0.510796 0.974030 +vt 0.556395 0.959419 +vt 0.557700 0.963709 +vt 0.580222 0.953852 +vt 0.602676 0.946732 +vt 0.580804 0.957236 +vt 0.619484 0.941120 +vt 0.603315 0.949770 +vt 0.630091 0.935453 +vt 0.620089 0.944047 +vt 0.637435 0.931171 +vt 0.642480 0.931372 +vt 0.639209 0.902971 +vt 0.198205 0.940903 +vt 0.630784 0.938598 +vn 0.000000 -0.995392 0.095828 +vn 0.878384 -0.450240 0.160314 +vn 0.000000 -0.985809 0.167760 +vn 0.991913 0.116611 0.049440 +vn 0.208167 0.978027 -0.009522 +vn 0.287362 0.957793 -0.003662 +vn 0.000000 0.999939 -0.010010 +vn 0.000000 0.999634 -0.026063 +vn 0.000000 -0.969848 0.243568 +vn 0.424787 -0.897885 0.115421 +vn 0.081820 -0.778100 -0.622761 +vn 0.020081 -0.984710 -0.172979 +vn 0.000000 -0.821986 -0.569445 +vn 0.000000 -0.996887 0.078829 +vn -0.048708 -0.994507 0.092318 +vn 0.000000 -0.988647 0.150060 +vn -0.025117 0.997711 0.062319 +vn 0.000000 0.998047 0.062380 +vn 0.055116 0.994964 0.083468 +vn 0.158605 -0.431043 0.888241 +vn -0.123966 -0.333110 0.934690 +vn -0.009766 0.888180 0.459365 +vn 0.223975 0.969237 0.101718 +vn 0.303354 0.931608 0.200049 +vn 0.281075 0.949675 0.138035 +vn 0.055788 -0.998047 -0.027406 +vn 0.185949 -0.943571 -0.274026 +vn 0.008209 -0.999481 -0.030976 +vn 0.880428 -0.277078 0.384777 +vn 0.000000 -0.990356 0.138401 +vn 0.930204 -0.221656 0.292489 +vn 0.817530 0.549730 0.171484 +vn 0.962645 0.266640 0.046663 +vn 0.214240 0.975890 0.041231 +vn 0.000000 0.998291 0.057985 +vn 0.000000 0.999298 0.036683 +vn -0.850063 0.407666 0.333354 +vn -0.828425 -0.282083 0.483840 +vn -0.919065 0.252388 0.302591 +vn 0.000000 0.211371 0.977386 +vn 0.000000 -0.886471 0.462722 +vn 0.315836 -0.936033 0.155126 +vn 0.510117 0.135533 0.849330 +vn 0.016633 -0.895688 0.444349 +vn -0.184118 -0.904050 0.385693 +vn 0.458632 0.484146 -0.745109 +vn 0.397778 0.772820 -0.494461 +vn 0.464919 0.769402 -0.437941 +vn 0.594134 -0.790643 0.147740 +vn 0.412793 -0.910154 0.034516 +vn 0.572283 -0.806574 0.147893 +vn 0.339213 -0.922605 0.183477 +vn 0.990509 0.124332 -0.058138 +vn 0.135136 -0.065523 -0.988647 +vn 0.124943 -0.335765 -0.933592 +vn 0.000000 -0.400433 -0.916318 +vn -0.329325 -0.931394 0.154881 +vn -0.286355 -0.933409 0.216163 +vn -0.585192 -0.709830 0.391980 +vn 0.484359 -0.313761 0.816614 +vn 0.316660 -0.305765 0.897885 +vn 0.166265 0.913907 0.370251 +vn 0.373394 -0.641835 -0.669759 +vn 0.446883 -0.252815 -0.858119 +vn 0.405774 -0.655019 -0.637379 +vn -0.359752 -0.924619 0.125034 +vn -0.775384 -0.615955 0.139195 +vn 0.712485 -0.375225 0.592914 +vn 0.639332 -0.186956 0.745811 +vn 0.331065 0.911832 0.242775 +vn 0.284921 -0.957884 0.035218 +vn 0.709830 -0.697745 -0.096042 +vn -0.285562 -0.918943 0.271920 +vn -0.272439 -0.904019 0.329356 +vn -0.359966 -0.714377 0.600055 +vn -0.524094 -0.347056 0.777703 +vn -0.524705 -0.194433 0.828761 +vn -0.201758 0.908109 0.366894 +vn 0.006775 0.997681 0.067568 +vn 0.097140 0.989319 0.108432 +vn 0.118686 0.989563 0.081668 +vn 0.211066 0.966094 0.148564 +vn -0.012299 -0.999481 0.028840 +vn 0.037507 -0.999268 0.006195 +vn 0.116062 -0.971068 -0.208563 +vn 0.099582 -0.994903 -0.014832 +vn 0.188116 -0.954650 -0.230659 +vn 0.452162 -0.839106 0.302347 +vn 0.785913 0.428541 0.445692 +vn 0.228156 -0.881008 0.414380 +vn 0.685995 0.254280 0.681692 +vn 0.127354 0.474258 -0.871090 +vn 0.080020 0.842586 -0.532548 +vn 0.176427 0.837489 -0.517136 +vn 0.262734 0.483810 -0.834773 +vn 0.295114 0.804468 -0.515458 +vn 0.381787 0.466659 -0.797754 +vn -0.685781 0.352702 0.636616 +vn -0.190008 0.943144 0.272591 +vn 0.652364 -0.664144 0.365032 +vn 0.231239 -0.726188 -0.647420 +vn 0.281381 -0.293893 -0.913450 +vn 0.327158 -0.689230 -0.646413 +vn 0.383465 -0.280618 -0.879879 +vn 0.090884 0.873043 0.479049 +vn -0.408673 -0.742271 0.531022 +vn 0.351207 0.896878 0.268746 +vn 0.272958 0.901975 0.334513 +vn 0.238655 0.952422 0.189398 +vn 0.123508 0.913724 0.387036 +vn 0.172765 -0.945952 -0.274422 +vn 0.045442 -0.998413 -0.032929 +vn 0.240028 -0.937407 -0.252205 +vn 0.021668 -0.999207 -0.032655 +vn 0.280160 0.009613 0.959868 +vn -0.012970 -0.006653 0.999878 +vn 0.529954 0.553087 -0.642781 +vn 0.486068 0.790460 -0.372631 +vn 0.562975 0.628712 -0.536393 +vn 0.465285 0.829005 -0.310160 +vn 0.091708 -0.674276 0.732749 +vn 0.950041 0.311960 -0.009125 +vn 0.519303 -0.272652 -0.809900 +vn 0.490280 -0.667745 -0.560106 +vn 0.619251 -0.310831 -0.721000 +vn 0.510269 -0.706717 -0.490005 +vn 0.792138 0.051180 0.608142 +vn -0.246254 -0.003632 0.969176 +vn 0.000000 -0.998779 0.049318 +vn -0.027711 -0.998627 0.044404 +vn 0.000000 -0.998016 0.062716 +vn -0.049013 -0.997040 0.058840 +vn 0.010193 0.984588 -0.174535 +vn 0.000000 0.987610 -0.156774 +vn -0.030885 0.998810 0.037538 +vn 0.000000 0.999451 0.032594 +vn 0.622120 -0.782861 -0.006561 +vn 0.321909 0.942564 -0.088778 +vn 0.144871 0.977142 0.155400 +vn 0.095614 0.977508 0.187872 +vn -0.023194 -0.999634 0.012604 +vn -0.376782 -0.438581 0.815851 +vn 0.278268 0.944639 -0.173650 +vn 0.203497 0.977447 0.056124 +vn 0.251869 0.964538 0.078585 +vn -0.007660 -0.999115 0.040773 +vn -0.030152 -0.999023 0.031983 +vn 0.023286 -0.999695 0.007233 +vn -0.527268 -0.026215 0.849269 +vn 0.607379 0.628224 -0.486190 +vn 0.466872 0.847011 -0.254067 +vn 0.471236 0.879788 0.062288 +vn 0.678121 -0.354045 -0.644032 +vn 0.510239 -0.729667 -0.455184 +vn 0.002503 0.999176 0.039796 +vn 0.070406 0.982055 -0.174902 +vn 0.100925 0.993805 0.045961 +vn 0.169469 0.969787 -0.175420 +vn -0.066500 -0.994568 0.079714 +vn -0.023347 -0.998566 0.047578 +vn 0.018616 -0.997436 0.068880 +vn 0.056337 -0.998138 0.022584 +vn 0.346507 0.924345 -0.159551 +vn 0.227912 0.967193 0.112125 +vn 0.366161 0.920194 -0.138249 +vn 0.127628 0.963713 0.234352 +vn 0.001373 -0.999725 0.022492 +vn -0.017090 -0.999847 -0.000092 +vn 0.015656 -0.999847 -0.003754 +vn -0.056215 0.902066 0.427839 +vn 0.039460 0.965300 0.258126 +vn 0.221473 -0.950621 -0.217322 +vn -0.012452 -0.999084 -0.040590 +vn -0.002838 -0.999908 -0.012299 +vn -0.078036 -0.996857 0.012207 +vn 0.290384 0.956420 -0.029908 +vn 0.043641 0.978668 0.200720 +vn -0.683279 -0.037538 0.729148 +vn 0.638356 0.643178 -0.422834 +vn 0.431440 0.883908 -0.180395 +vn 0.245277 0.917600 0.312754 +vn 0.702658 -0.381726 -0.600421 +vn 0.599902 -0.718192 -0.352550 +vn -0.165014 0.898068 0.407666 +vn -0.012818 0.968841 0.247261 +vn 0.197729 -0.958159 -0.206824 +vn 0.049409 -0.998169 -0.034761 +vn -0.045839 -0.998657 -0.023408 +vn -0.025788 -0.998016 0.057192 +vn 0.227210 0.972900 0.042573 +vn -0.023011 0.982086 0.186895 +vn -0.039979 -0.989593 0.138005 +vn -0.758202 -0.134556 0.637928 +vn 0.638386 0.692312 -0.336314 +vn 0.506333 0.842311 -0.184667 +vn -0.138432 0.867000 0.478652 +vn 0.773400 -0.426557 -0.468886 +vn 0.835414 -0.493393 -0.242042 +vn -0.335185 0.841853 0.422956 +vn -0.090243 0.970763 0.222388 +vn 0.314798 -0.933531 -0.171331 +vn 0.271554 -0.962310 0.013916 +vn -0.010773 -0.999725 -0.020264 +vn 0.141301 0.106723 -0.984191 +vn -0.483444 0.716300 0.503128 +vn -0.329264 0.464400 0.822108 +vn -0.157506 0.975494 0.153478 +vn -0.093631 0.987976 0.122806 +vn 0.024628 0.943144 0.331431 +vn 0.163610 0.960814 0.223670 +vn 0.044008 0.997314 0.058199 +vn 0.459700 0.027955 -0.887631 +vn 0.466597 0.172826 -0.867397 +vn 0.550279 0.038514 -0.834071 +vn 0.830348 -0.317240 0.458083 +vn 0.617450 -0.725913 0.302896 +vn 0.750511 -0.659322 0.044710 +vn 0.702567 -0.365093 0.610767 +vn 0.540300 -0.758782 0.363689 +vn 0.560259 0.241615 -0.792261 +vn 0.054323 -0.081790 0.995148 +vn -0.162542 -0.355693 0.920347 +vn 0.354137 -0.918149 0.177557 +vn 0.041078 -0.999146 -0.002625 +vn -0.010712 -0.999908 -0.003327 +vn 0.007843 -0.999573 0.027100 +vn 0.077761 -0.996918 0.006806 +vn 0.020783 -0.999756 -0.005707 +vn -0.000641 -0.999908 -0.011963 +vn 0.000000 -0.989624 -0.143559 +vn 0.000000 -0.999573 0.028169 +vn -0.041627 -0.998871 -0.022065 +vn 0.004028 -0.999725 -0.022309 +vn 0.100772 -0.993286 0.056764 +vn 0.193304 -0.980621 0.031159 +vn 0.407300 -0.901791 0.144383 +vn 0.718253 -0.672811 -0.177068 +vn 0.000000 0.854274 -0.519791 +vn 0.082614 0.991150 0.103824 +vn 0.000000 0.105533 -0.994385 +vn 0.138676 0.001251 -0.990326 +vn 0.281289 0.007904 -0.959563 +vn 0.286264 0.124424 -0.950011 +vn 0.385998 0.016938 -0.922330 +vn 0.393231 0.140812 -0.908567 +vn 0.661946 0.053102 -0.747642 +vn 0.646504 0.308298 -0.697806 +vn 0.732841 0.004700 -0.680380 +vn 0.723838 0.245033 -0.644948 +vn 0.780694 0.043428 -0.623371 +vn 0.764336 0.300638 -0.570391 +vn 0.774560 0.450209 -0.444197 +vn 0.846065 0.164556 -0.507004 +vn 0.770837 0.558641 -0.306070 +vn 0.445235 0.895260 -0.015625 +vn 0.930448 0.133702 -0.341105 +vn 0.935728 0.349254 0.048738 +vn -0.107242 -0.806970 0.580706 +vn 0.527085 -0.849117 0.033753 +vn 0.474349 -0.869289 -0.138890 +vn 0.000000 0.481887 -0.876217 +vn 0.273293 0.960265 -0.056276 +vn -0.301614 -0.667379 0.680868 +vn -0.689871 0.028657 0.723350 +vn 0.000000 -0.098086 -0.995148 +vn 0.456893 -0.050142 -0.888089 +vn 0.748192 0.458113 0.479904 +vn 0.554918 0.424787 0.715232 +vn -0.011750 0.242012 0.970183 +vn 0.280526 -0.055391 -0.958220 +vn 0.385205 -0.058382 -0.920957 +vn 0.544633 -0.055086 -0.836848 +vn 0.654897 -0.069491 -0.752495 +vn 0.726402 -0.102054 -0.679617 +vn 0.764641 -0.110355 -0.634907 +vn 0.849452 -0.110935 -0.515854 +vn 0.929624 -0.203375 -0.307260 +vn 0.954650 -0.293161 0.051332 +vn 0.000000 -0.003784 -0.999969 +vn 0.248604 0.487838 0.836756 +vn 0.040559 0.507614 0.860622 +vn 0.975005 -0.221534 -0.016480 +vn 0.976470 -0.190222 -0.101321 +vn 0.923429 0.296091 0.244087 +vn 0.437361 0.898160 0.044374 +vn 0.934996 0.344890 0.082430 +vn 0.775109 0.390973 0.496292 +vn 0.448866 0.874203 0.185034 +vn 0.503098 0.428968 0.750206 +vn -0.139744 0.512833 0.847011 +vn -0.251808 0.491348 0.833735 +vn -0.347697 0.491104 0.798700 +vn -0.564440 0.458907 0.686117 +vn -0.758476 0.577410 0.302042 +vn -0.346568 0.928861 0.130619 +vn -0.139622 -0.642445 0.753471 +vn 0.380749 -0.688437 0.617298 +vn -0.878384 -0.450240 0.160314 +vn -0.991913 0.116611 0.049440 +vn -0.792138 0.051180 0.608142 +vn -0.287362 0.957793 -0.003662 +vn -0.208167 0.978027 -0.009522 +vn -0.339213 -0.922605 0.183477 +vn -0.424787 -0.897885 0.115421 +vn -0.081820 -0.778100 -0.622761 +vn -0.020081 -0.984710 -0.172979 +vn 0.048708 -0.994507 0.092318 +vn 0.025117 0.997711 0.062319 +vn -0.055116 0.994964 0.083468 +vn -0.158605 -0.431043 0.888241 +vn -0.090884 0.873043 0.479049 +vn 0.009766 0.888180 0.459365 +vn -0.223975 0.969237 0.101718 +vn -0.281075 0.949675 0.138035 +vn -0.303354 0.931608 0.200049 +vn -0.055788 -0.998047 -0.027406 +vn -0.008209 -0.999481 -0.030976 +vn -0.185949 -0.943571 -0.274026 +vn -0.880428 -0.277078 0.384777 +vn -0.930204 -0.221656 0.292489 +vn -0.817530 0.549730 0.171484 +vn -0.962645 0.266640 0.046663 +vn -0.214240 0.975890 0.041231 +vn 0.850063 0.407666 0.333354 +vn 0.503037 0.862270 0.058107 +vn 0.919065 0.252388 0.302591 +vn -0.315836 -0.936033 0.155126 +vn -0.510117 0.135533 0.849330 +vn -0.280160 0.009613 0.959868 +vn 0.184118 -0.904050 0.385693 +vn -0.458632 0.484146 -0.745109 +vn -0.529954 0.553087 -0.642781 +vn -0.464919 0.769402 -0.437941 +vn -0.594134 -0.790643 0.147740 +vn -0.572283 -0.806574 0.147893 +vn -0.412793 -0.910154 0.034516 +vn -0.976470 -0.190222 -0.101321 +vn -0.990509 0.124332 -0.058138 +vn -0.135136 -0.065523 -0.988647 +vn 0.329325 -0.931394 0.154881 +vn 0.585192 -0.709830 0.391980 +vn 0.286355 -0.933409 0.216163 +vn -0.484359 -0.313761 0.816614 +vn -0.245277 0.917600 0.312754 +vn -0.166265 0.913907 0.370251 +vn -0.373394 -0.641835 -0.669759 +vn -0.405774 -0.655019 -0.637379 +vn -0.446883 -0.252815 -0.858119 +vn 0.828425 -0.282083 0.483840 +vn 0.775353 -0.615955 0.139195 +vn -0.712485 -0.375225 0.592914 +vn -0.448866 0.874203 0.185034 +vn -0.331065 0.911802 0.242775 +vn -0.284921 -0.957884 0.035218 +vn -0.622120 -0.782861 -0.006561 +vn -0.709830 -0.697745 -0.096042 +vn 0.285562 -0.918943 0.271920 +vn 0.359966 -0.714377 0.600055 +vn 0.272439 -0.904019 0.329356 +vn 0.524094 -0.347056 0.777703 +vn 0.201758 0.908109 0.366894 +vn 0.524705 -0.194433 0.828761 +vn -0.006775 0.997681 0.067568 +vn -0.118686 0.989563 0.081668 +vn -0.097140 0.989319 0.108432 +vn -0.211066 0.966094 0.148564 +vn 0.012299 -0.999481 0.028840 +vn -0.037507 -0.999268 0.006195 +vn -0.099582 -0.994903 -0.014832 +vn -0.116062 -0.971068 -0.208563 +vn -0.188116 -0.954650 -0.230659 +vn -0.785913 0.428541 0.445692 +vn -0.452162 -0.839106 0.302347 +vn -0.685995 0.254280 0.681692 +vn -0.228156 -0.881008 0.414380 +vn -0.016633 -0.895688 0.444349 +vn -0.127354 0.474258 -0.871090 +vn -0.262734 0.483810 -0.834773 +vn -0.176427 0.837489 -0.517136 +vn -0.381787 0.466659 -0.797754 +vn -0.295114 0.804468 -0.515458 +vn -0.397778 0.772820 -0.494461 +vn 0.190008 0.943144 0.272591 +vn 0.685781 0.352733 0.636616 +vn -0.652364 -0.664144 0.365032 +vn -0.231239 -0.726188 -0.647420 +vn -0.124943 -0.335765 -0.933592 +vn -0.327158 -0.689230 -0.646413 +vn -0.281381 -0.293893 -0.913450 +vn -0.383465 -0.280618 -0.879879 +vn -0.316660 -0.305765 0.897885 +vn 0.408673 -0.742271 0.531022 +vn -0.238655 0.952422 0.189398 +vn -0.272958 0.901975 0.334513 +vn -0.127628 0.963713 0.234352 +vn -0.123508 0.913724 0.387036 +vn -0.045442 -0.998413 -0.032929 +vn -0.172765 -0.945952 -0.274422 +vn -0.021668 -0.999207 -0.032655 +vn -0.240028 -0.937407 -0.252205 +vn 0.012970 -0.006653 0.999878 +vn 0.246254 -0.003632 0.969176 +vn -0.562975 0.628712 -0.536393 +vn -0.486068 0.790460 -0.372631 +vn -0.607379 0.628224 -0.486190 +vn -0.465285 0.829005 -0.310160 +vn -0.091708 -0.674276 0.732749 +vn -0.950041 0.311960 -0.009125 +vn -0.490280 -0.667745 -0.560106 +vn -0.519303 -0.272652 -0.809900 +vn -0.510269 -0.706717 -0.490005 +vn -0.619251 -0.310831 -0.721000 +vn -0.351207 0.896878 0.268746 +vn 0.027711 -0.998627 0.044404 +vn 0.049013 -0.997040 0.058840 +vn -0.010193 0.984588 -0.174535 +vn 0.030885 0.998810 0.037538 +vn -0.508896 -0.858547 0.062563 +vn -0.321909 0.942564 -0.088778 +vn -0.290384 0.956420 -0.029908 +vn -0.095614 0.977508 0.187872 +vn 0.123966 -0.333110 0.934690 +vn 0.376782 -0.438581 0.815851 +vn 0.023194 -0.999634 0.012604 +vn -0.278268 0.944639 -0.173650 +vn -0.346507 0.924345 -0.159551 +vn -0.251869 0.964538 0.078585 +vn -0.203497 0.977447 0.056124 +vn 0.030152 -0.999023 0.031983 +vn 0.007660 -0.999115 0.040773 +vn -0.023286 -0.999695 0.007233 +vn 0.056215 0.902066 0.427839 +vn 0.527268 -0.026215 0.849269 +vn -0.638356 0.643178 -0.422834 +vn -0.466872 0.847011 -0.254067 +vn -0.471236 0.879788 0.062288 +vn -0.510239 -0.729667 -0.455184 +vn -0.678121 -0.354045 -0.644032 +vn -0.070406 0.982055 -0.174902 +vn -0.002503 0.999176 0.039796 +vn -0.169469 0.969787 -0.175420 +vn -0.100925 0.993805 0.045961 +vn 0.066500 -0.994568 0.079714 +vn 0.023347 -0.998566 0.047578 +vn -0.639332 -0.186956 0.745811 +vn -0.018616 -0.997436 0.068880 +vn -0.056337 -0.998138 0.022584 +vn -0.366161 0.920194 -0.138249 +vn -0.227912 0.967193 0.112125 +vn -0.144871 0.977142 0.155400 +vn -0.001373 -0.999725 0.022492 +vn 0.017090 -0.999847 -0.000092 +vn -0.015656 -0.999847 -0.003754 +vn -0.039460 0.965300 0.258126 +vn 0.012452 -0.999084 -0.040590 +vn -0.221473 -0.950621 -0.217322 +vn 0.078036 -0.996857 0.012207 +vn 0.002838 -0.999908 -0.012299 +vn -0.227210 0.972900 0.042573 +vn -0.043641 0.978668 0.200720 +vn 0.165014 0.898068 0.407666 +vn 0.683279 -0.037538 0.729148 +vn -0.638386 0.692312 -0.336314 +vn -0.431440 0.883908 -0.180395 +vn -0.599902 -0.718192 -0.352550 +vn -0.702658 -0.381726 -0.600421 +vn 0.012818 0.968841 0.247261 +vn -0.049409 -0.998169 -0.034761 +vn -0.197729 -0.958159 -0.206824 +vn 0.025788 -0.998016 0.057192 +vn 0.045839 -0.998657 -0.023408 +vn -0.082614 0.991150 0.103824 +vn 0.023011 0.982086 0.186895 +vn 0.039979 -0.989593 0.138005 +vn 0.335185 0.841853 0.422956 +vn 0.758202 -0.134556 0.637928 +vn -0.506333 0.842311 -0.184667 +vn 0.138432 0.867000 0.478652 +vn -0.718253 -0.672811 -0.177068 +vn -0.835414 -0.493393 -0.242042 +vn 0.090243 0.970763 0.222388 +vn -0.271554 -0.962310 0.013916 +vn -0.314798 -0.933531 -0.171331 +vn 0.010773 -0.999725 -0.020264 +vn -0.141301 0.106723 -0.984191 +vn -0.286264 0.124424 -0.950011 +vn 0.483444 0.716300 0.503128 +vn 0.157506 0.975494 0.153478 +vn 0.329264 0.464400 0.822108 +vn 0.093631 0.987976 0.122806 +vn -0.163610 0.960814 0.223670 +vn -0.024628 0.943144 0.331431 +vn -0.044008 0.997314 0.058199 +vn -0.459700 0.027955 -0.887631 +vn -0.550279 0.038514 -0.834071 +vn -0.466597 0.172826 -0.867397 +vn -0.830348 -0.317240 0.458083 +vn -0.954650 -0.293161 0.051332 +vn -0.750511 -0.659322 0.044710 +vn -0.617450 -0.725913 0.302896 +vn -0.540300 -0.758782 0.363689 +vn -0.560259 0.241615 -0.792261 +vn -0.702567 -0.365093 0.610767 +vn 0.162542 -0.355693 0.920347 +vn -0.354137 -0.918149 0.177557 +vn 0.107242 -0.806970 0.580706 +vn -0.041078 -0.999146 -0.002625 +vn 0.010712 -0.999908 -0.003327 +vn -0.007843 -0.999573 0.027100 +vn -0.077761 -0.996918 0.006806 +vn -0.020783 -0.999756 -0.005707 +vn 0.000641 -0.999908 -0.011963 +vn 0.041627 -0.998871 -0.022065 +vn -0.004028 -0.999725 -0.022309 +vn -0.100772 -0.993286 0.056764 +vn -0.193304 -0.980621 0.031159 +vn -0.407300 -0.901791 0.144383 +vn -0.527085 -0.849117 0.033753 +vn -0.080020 0.842586 -0.532548 +vn -0.138676 0.001251 -0.990326 +vn -0.281289 0.007904 -0.959563 +vn -0.385998 0.016938 -0.922330 +vn -0.393231 0.140812 -0.908567 +vn -0.661946 0.053102 -0.747642 +vn -0.732841 0.004700 -0.680380 +vn -0.646504 0.308298 -0.697806 +vn -0.780694 0.043428 -0.623371 +vn -0.723838 0.245033 -0.644948 +vn -0.846065 0.164556 -0.507004 +vn -0.774560 0.450209 -0.444197 +vn -0.930448 0.133702 -0.341105 +vn -0.770837 0.558641 -0.306070 +vn -0.445235 0.895260 -0.015625 +vn -0.935728 0.349254 0.048738 +vn -0.474349 -0.869289 -0.138890 +vn -0.764336 0.300638 -0.570391 +vn -0.273293 0.960265 -0.056276 +vn 0.359752 -0.924619 0.125034 +vn 0.301614 -0.667379 0.680868 +vn 0.689871 0.028687 0.723319 +vn -0.456893 -0.050142 -0.888089 +vn -0.748192 0.458113 0.479904 +vn -0.554918 0.424787 0.715232 +vn -0.054323 -0.081790 0.995148 +vn -0.280526 -0.055391 -0.958220 +vn -0.385205 -0.058382 -0.920957 +vn -0.544633 -0.055086 -0.836848 +vn -0.654897 -0.069491 -0.752495 +vn -0.726402 -0.102054 -0.679617 +vn -0.773400 -0.426557 -0.468886 +vn -0.764641 -0.110355 -0.634907 +vn -0.929624 -0.203375 -0.307260 +vn -0.849452 -0.110935 -0.515854 +vn 0.011750 0.242012 0.970183 +vn -0.248604 0.487838 0.836756 +vn -0.040559 0.507614 0.860622 +vn -0.437361 0.898160 0.044374 +vn -0.923429 0.296091 0.244087 +vn -0.934996 0.344890 0.082430 +vn -0.775109 0.390973 0.496292 +vn -0.503098 0.428968 0.750206 +vn 0.139744 0.512833 0.847011 +vn 0.251808 0.491348 0.833735 +vn 0.347697 0.491104 0.798700 +vn 0.564440 0.458907 0.686117 +vn 0.758476 0.577410 0.302042 +vn 0.346568 0.928861 0.130619 +vn 0.139622 -0.642445 0.753471 +vn -0.380749 -0.688437 0.617298 +vn -0.503037 0.862270 0.058107 +vn 0.508896 -0.858547 0.062563 +vn -0.975005 -0.221534 -0.016480 +usemtl Material +s 1 +f 291/1/1 12/2/2 275/3/3 +f 64/4/4 14/5/5 2/6/6 +f 14/5/5 297/7/7 274/8/8 +f 310/9/9 275/3/3 1/10/10 +f 173/11/11 3/12/12 467/13/13 +f 360/14/14 70/15/15 283/16/16 +f 72/17/17 358/18/18 6/19/19 +f 46/20/20 47/21/21 257/22/22 +f 88/23/23 25/24/24 78/25/25 +f 151/26/26 34/27/27 145/28/28 +f 283/16/16 5/29/29 290/30/30 +f 290/30/30 11/31/31 291/1/1 +f 62/32/32 6/19/19 63/33/33 +f 63/33/33 13/34/34 64/4/4 +f 6/19/19 282/35/35 13/34/34 +f 13/34/34 296/36/36 297/7/7 +f 202/37/37 201/38/38 272/39/39 +f 347/40/40 299/41/41 16/42/42 +f 67/43/43 39/44/44 18/45/45 +f 194/46/46 42/47/47 19/48/48 +f 17/49/49 20/50/50 238/51/51 +f 22/52/52 1/10/10 232/53/53 +f 299/54/41 310/9/9 22/52/52 +f 217/55/54 24/56/55 307/57/56 +f 117/58/57 105/59/58 266/60/59 +f 31/61/60 8/62/61 234/63/62 +f 176/64/63 45/65/64 172/66/65 +f 201/67/38 129/68/66 269/69/67 +f 33/70/68 32/71/69 248/72/70 +f 21/73/71 16/42/42 237/74/72 +f 55/75/73 54/76/74 259/77/75 +f 121/78/76 133/79/77 267/80/78 +f 72/17/17 6/19/19 84/81/79 +f 84/81/79 27/82/80 86/83/81 +f 86/83/81 26/84/82 88/23/23 +f 143/85/83 3/12/12 147/86/84 +f 147/86/84 36/87/85 149/88/86 +f 149/88/86 35/89/87 151/26/26 +f 62/32/32 17/49/49 37/90/88 +f 65/91/89 37/90/88 38/92/90 +f 66/93/91 38/92/90 39/44/44 +f 187/94/92 15/95/93 40/96/94 +f 192/97/95 40/96/94 41/98/96 +f 193/99/97 41/98/96 42/47/47 +f 133/79/77 200/100/98 270/101/99 +f 37/90/88 17/49/49 250/102/100 +f 1/10/10 12/2/2 232/53/53 +f 173/11/11 24/56/55 174/103/101 +f 174/103/101 43/104/102 175/105/103 +f 175/105/103 44/106/104 176/64/63 +f 8/62/61 46/20/20 256/107/105 +f 105/59/58 55/75/73 263/108/106 +f 78/25/25 7/109/107 50/110/108 +f 96/111/109 50/110/108 51/112/110 +f 145/28/28 10/113/111 153/114/112 +f 153/114/112 48/115/113 155/116/114 +f 60/117/115 18/45/45 54/76/74 +f 68/118/116 54/76/74 55/75/73 +f 186/119/117 19/48/48 56/120/118 +f 195/121/119 56/120/118 57/122/120 +f 39/44/44 38/92/90 252/123/121 +f 12/2/2 11/31/31 236/124/122 +f 172/66/65 23/125/123 177/126/124 +f 177/126/124 58/127/125 178/128/126 +f 21/73/71 64/4/4 61/129/127 +f 17/49/49 62/32/32 63/33/33 +f 20/50/50 63/33/33 64/4/4 +f 274/8/8 347/40/40 2/6/6 +f 25/24/24 67/43/43 7/109/107 +f 6/19/19 62/32/32 65/91/89 +f 27/82/80 65/91/89 26/84/82 +f 26/84/82 66/93/91 25/24/24 +f 7/109/107 60/117/115 68/118/116 +f 50/110/108 68/118/116 69/130/128 +f 434/131/129 142/132/130 361/133/131 +f 361/133/131 71/134/132 360/14/14 +f 4/135/133 278/136/134 73/137/135 +f 73/137/135 359/138/136 358/18/18 +f 20/50/50 21/73/71 241/139/137 +f 53/140/138 99/141/139 76/142/140 +f 47/21/21 103/143/141 109/144/142 +f 28/145/143 89/146/144 79/147/145 +f 89/146/144 88/23/23 78/25/25 +f 31/61/60 95/148/146 81/149/147 +f 95/148/146 94/150/148 81/149/147 +f 51/112/110 69/130/128 82/151/149 +f 196/152/150 57/122/120 104/153/151 +f 5/29/29 33/70/68 233/154/152 +f 178/128/126 59/155/153 179/156/154 +f 4/135/133 73/137/135 85/157/155 +f 73/137/135 72/17/17 85/157/155 +f 30/158/156 85/157/155 87/159/157 +f 85/157/155 84/81/79 86/83/81 +f 29/160/158 87/159/157 89/146/144 +f 87/159/157 86/83/81 88/23/23 +f 5/29/29 70/15/15 91/161/159 +f 70/15/15 71/134/132 90/162/160 +f 33/70/68 91/161/159 93/163/161 +f 91/161/159 90/162/160 92/164/162 +f 32/71/69 93/163/161 95/148/146 +f 93/163/161 92/164/162 94/150/148 +f 9/165/163 79/147/145 97/166/164 +f 79/147/145 78/25/25 96/111/109 +f 52/167/165 97/166/164 99/141/139 +f 97/166/164 96/111/109 98/168/166 +f 8/62/61 81/149/147 101/169/167 +f 81/149/147 80/170/168 101/169/167 +f 46/20/20 101/169/167 47/21/21 +f 101/169/167 100/171/169 103/143/141 +f 69/130/128 55/75/73 82/151/149 +f 98/168/166 51/112/110 107/172/170 +f 99/141/139 98/168/166 77/173/171 +f 155/116/114 49/174/172 157/175/173 +f 103/143/141 102/176/174 74/177/175 +f 47/21/21 109/144/142 257/22/22 +f 106/178/176 76/142/140 112/179/177 +f 109/144/142 74/177/175 121/78/76 +f 107/172/170 82/151/149 114/180/178 +f 197/181/179 104/153/151 116/182/180 +f 32/71/69 31/61/60 247/183/181 +f 179/156/154 83/184/182 180/185/183 +f 82/151/149 105/59/58 114/180/178 +f 77/173/171 107/172/170 119/186/184 +f 76/142/140 77/173/171 113/187/185 +f 157/175/173 108/188/186 159/189/187 +f 74/177/175 75/190/188 110/191/189 +f 118/192/190 112/179/177 124/193/191 +f 121/78/76 110/191/189 122/194/192 +f 119/186/184 114/180/178 126/195/193 +f 198/196/194 116/182/180 199/197/195 +f 109/144/142 121/78/76 264/198/196 +f 180/185/183 115/199/197 127/200/198 +f 114/180/178 117/58/57 126/195/193 +f 113/187/185 119/186/184 131/201/199 +f 112/179/177 113/187/185 125/202/200 +f 159/189/187 120/203/201 161/204/202 +f 110/191/189 111/205/203 122/194/192 +f 163/206/204 187/94/92 192/97/95 +f 188/207/205 134/208/206 189/209/207 +f 190/210/208 189/209/207 136/211/209 +f 190/210/208 135/212/210 191/213/211 +f 220/214/212 166/215/213 230/216/214 +f 213/217/215 138/218/216 140/219/217 +f 213/217/215 214/220/218 139/221/219 +f 166/215/213 194/46/46 162/222/220 +f 214/220/218 215/223/221 141/224/222 +f 24/56/55 173/11/11 307/57/56 +f 183/225/223 139/221/219 141/224/222 +f 94/150/148 150/226/224 80/170/168 +f 150/226/224 151/26/26 144/227/225 +f 71/134/132 142/132/130 90/162/160 +f 142/132/130 143/85/83 146/228/226 +f 90/162/160 146/228/226 92/164/162 +f 146/228/226 147/86/84 148/229/227 +f 92/164/162 148/229/227 94/150/148 +f 148/229/227 149/88/86 150/226/224 +f 80/170/168 144/227/225 100/171/169 +f 144/227/225 145/28/28 152/230/228 +f 100/171/169 152/230/228 102/176/174 +f 152/230/228 153/114/112 154/231/229 +f 279/232/230 3/12/12 143/85/83 +f 435/233/231 143/85/83 142/132/130 +f 102/176/174 154/231/229 75/190/188 +f 154/231/229 155/116/114 156/234/232 +f 75/190/188 156/234/232 111/205/203 +f 156/234/232 157/175/173 158/235/233 +f 111/205/203 158/235/233 123/236/234 +f 158/235/233 159/189/187 160/237/235 +f 183/225/223 123/236/234 160/237/235 +f 184/238/236 160/237/235 161/204/202 +f 181/239/237 127/200/198 140/219/217 +f 278/136/134 4/135/133 298/240/238 +f 4/135/133 30/158/156 15/95/93 +f 30/158/156 29/160/158 40/96/94 +f 29/160/158 28/145/143 41/98/96 +f 19/48/48 42/47/47 9/165/163 +f 9/165/163 52/167/165 19/48/48 +f 52/167/165 53/140/138 56/120/118 +f 104/153/151 57/122/120 106/178/176 +f 106/178/176 118/192/190 104/153/151 +f 118/192/190 130/241/239 116/182/180 +f 187/94/92 163/206/204 456/242/240 +f 231/243/241 163/206/204 218/244/242 +f 218/244/242 164/245/243 219/246/244 +f 219/246/244 165/247/245 220/214/212 +f 230/216/214 162/222/220 221/248/246 +f 221/248/246 167/249/247 222/250/248 +f 222/250/248 168/251/249 223/252/250 +f 223/252/250 169/253/251 170/254/252 +f 224/255/253 170/254/252 171/256/254 +f 191/213/211 137/257/255 199/197/195 +f 225/258/256 171/256/254 226/259/257 +f 34/27/27 176/64/63 10/113/111 +f 3/12/12 173/11/11 36/87/85 +f 36/87/85 174/103/101 35/89/87 +f 35/89/87 175/105/103 34/27/27 +f 10/113/111 172/66/65 48/115/113 +f 48/115/113 177/126/124 49/174/172 +f 49/174/172 178/128/126 108/188/186 +f 108/188/186 179/156/154 120/203/201 +f 120/203/201 180/185/183 181/239/237 +f 123/236/234 183/225/223 182/260/258 +f 139/221/219 183/225/223 184/238/236 +f 138/218/216 184/238/236 185/261/259 +f 132/262/260 181/239/237 185/261/259 +f 164/245/243 192/97/95 165/247/245 +f 165/247/245 193/99/97 166/215/213 +f 162/222/220 186/119/117 195/121/119 +f 167/249/247 195/121/119 196/152/150 +f 168/251/249 196/152/150 197/181/179 +f 169/253/251 197/181/179 198/196/194 +f 170/254/252 198/196/194 199/197/195 +f 131/201/199 188/207/205 125/202/200 +f 124/193/191 125/202/200 189/209/207 +f 124/193/191 190/210/208 130/241/239 +f 15/95/93 187/94/92 482/263/261 +f 130/241/239 191/213/211 128/264/262 +f 122/194/192 182/260/258 133/79/77 +f 129/68/66 117/58/57 266/60/59 +f 200/100/98 182/260/258 141/224/222 +f 54/76/74 18/45/45 258/265/263 +f 129/68/66 201/67/38 126/195/193 +f 131/201/199 126/195/193 203/266/264 +f 231/243/241 217/267/54 509/268/265 +f 45/65/64 206/269/266 23/125/123 +f 227/270/267 213/271/215 226/259/257 +f 227/270/267 228/272/268 214/273/218 +f 228/272/268 229/274/269 215/275/221 +f 24/56/55 217/55/54 204/276/270 +f 43/104/102 204/276/270 205/277/271 +f 44/106/104 205/277/271 206/269/266 +f 23/125/123 216/278/272 58/127/125 +f 58/127/125 207/279/273 59/155/153 +f 59/155/153 208/280/274 83/184/182 +f 83/184/182 209/281/275 115/199/197 +f 115/199/197 210/282/276 211/283/277 +f 127/200/198 211/283/277 212/284/278 +f 206/285/266 220/214/212 216/286/272 +f 217/267/54 231/243/241 218/244/242 +f 204/287/270 218/244/242 205/288/271 +f 205/288/271 219/246/244 220/214/212 +f 216/286/272 230/216/214 207/289/273 +f 207/289/273 221/248/246 208/290/274 +f 208/290/274 222/250/248 209/291/275 +f 209/291/275 223/252/250 210/292/276 +f 210/292/276 224/255/253 225/258/256 +f 211/293/277 225/258/256 226/259/257 +f 163/206/204 231/243/241 524/294/279 +f 135/212/210 227/270/267 137/257/255 +f 135/212/210 136/211/209 227/270/267 +f 136/211/209 134/208/206 228/272/268 +f 134/208/206 188/207/205 229/274/269 +f 201/67/38 215/275/221 203/266/264 +f 215/223/221 201/38/38 202/37/37 +f 255/295/280 247/183/181 246/296/281 +f 236/124/122 245/297/282 242/298/283 +f 233/154/152 243/299/284 235/300/285 +f 235/300/285 244/301/286 236/124/122 +f 243/299/284 233/154/152 253/302/287 +f 253/302/287 249/303/288 254/304/289 +f 254/304/289 248/72/70 255/295/280 +f 246/296/281 234/63/62 256/107/105 +f 260/305/290 256/107/105 257/22/22 +f 261/306/291 257/22/22 262/307/292 +f 262/307/292 264/198/196 265/308/293 +f 265/308/293 267/80/78 268/309/294 +f 270/101/99 271/310/295 268/309/294 +f 11/31/31 5/29/29 235/300/285 +f 18/45/45 39/44/44 239/311/296 +f 38/92/90 37/90/88 251/312/297 +f 200/100/98 202/37/37 271/310/295 +f 291/1/1 275/3/3 293/313/298 +f 352/314/299 349/315/300 277/316/301 +f 295/317/302 277/316/301 274/8/8 +f 310/9/9 308/318/303 276/319/304 +f 469/320/305 467/13/13 280/321/306 +f 360/14/14 283/16/16 362/322/307 +f 364/323/308 285/324/309 358/18/18 +f 333/325/310 555/326/311 556/327/312 +f 380/328/313 370/329/314 312/330/315 +f 445/331/316 439/332/317 321/333/318 +f 283/16/16 290/30/30 284/334/319 +f 290/30/30 291/1/1 292/335/320 +f 350/336/321 351/337/322 285/324/309 +f 351/337/322 352/314/299 294/338/323 +f 285/324/309 294/338/323 282/35/35 +f 294/338/323 295/317/302 297/7/7 +f 499/339/324 572/340/325 571/341/326 +f 347/40/40 349/315/300 301/342/327 +f 355/343/328 348/344/329 303/345/330 +f 491/346/331 483/347/332 304/348/333 +f 302/349/334 537/350/335 305/351/336 +f 308/318/303 541/352/337 531/353/338 +f 299/54/41 301/354/327 308/318/303 +f 515/355/339 509/356/265 307/57/56 +f 409/357/340 565/358/341 397/359/342 +f 318/360/343 546/361/344 533/362/345 +f 472/363/346 468/364/347 332/365/348 +f 498/366/349 571/367/326 568/368/350 +f 320/369/351 548/370/352 547/371/353 +f 306/372/354 540/373/355 536/374/356 +f 342/375/357 558/376/358 341/377/359 +f 413/378/360 566/379/361 425/380/362 +f 364/323/308 376/381/363 285/324/309 +f 376/381/363 378/382/364 314/383/365 +f 378/382/364 380/328/313 313/384/366 +f 437/385/367 441/386/368 280/321/306 +f 441/386/368 443/387/369 323/388/370 +f 443/387/369 445/331/316 322/389/371 +f 350/336/321 353/390/372 324/391/373 +f 353/390/372 354/392/374 325/393/375 +f 354/392/374 355/343/328 326/394/376 +f 484/395/377 489/396/378 327/397/379 +f 489/396/378 490/398/380 328/399/381 +f 490/398/380 491/346/331 329/400/382 +f 425/380/362 569/401/383 497/402/384 +f 324/391/373 549/403/385 302/349/334 +f 276/319/304 531/353/338 293/313/298 +f 469/320/305 470/404/386 311/405/387 +f 470/404/386 471/406/388 330/407/389 +f 471/406/388 472/363/346 331/408/390 +f 287/409/391 533/362/345 555/326/311 +f 397/359/342 562/410/392 342/375/357 +f 370/329/314 388/411/393 337/412/394 +f 388/411/393 390/413/395 338/414/396 +f 439/332/317 447/415/397 289/416/398 +f 447/415/397 449/417/399 335/418/400 +f 348/344/329 356/419/401 341/377/359 +f 356/419/401 357/420/402 342/375/357 +f 483/347/332 492/421/403 343/422/404 +f 492/421/403 493/423/405 344/424/406 +f 326/394/376 551/425/407 325/393/375 +f 293/313/298 535/426/408 292/335/320 +f 468/364/347 473/427/409 309/428/410 +f 473/427/409 474/429/411 345/430/412 +f 306/372/354 301/342/327 349/315/300 +f 302/349/334 305/351/336 351/337/322 +f 305/351/336 306/372/354 352/314/299 +f 274/8/8 277/316/301 347/40/40 +f 312/330/315 286/431/413 355/343/328 +f 285/324/309 314/383/365 353/390/372 +f 314/383/365 313/384/366 353/390/372 +f 313/384/366 312/330/315 354/392/374 +f 286/431/413 337/412/394 356/419/401 +f 337/412/394 338/414/396 357/420/402 +f 434/131/129 361/133/131 436/432/414 +f 361/133/131 360/14/14 363/433/415 +f 281/434/416 365/435/417 278/136/134 +f 365/435/417 364/323/308 358/18/18 +f 305/351/336 539/436/418 540/373/355 +f 340/437/419 398/438/420 368/439/421 +f 334/440/422 401/441/423 395/442/424 +f 315/443/425 288/444/426 371/445/427 +f 381/446/428 371/445/427 370/329/314 +f 318/360/343 287/409/391 373/447/429 +f 387/448/430 373/447/429 386/449/431 +f 338/414/396 399/450/432 374/451/433 +f 493/423/405 494/452/434 396/453/435 +f 284/334/319 532/454/436 320/369/351 +f 474/429/411 475/455/437 346/456/438 +f 281/434/416 317/457/439 377/458/440 +f 365/435/417 377/458/440 364/323/308 +f 317/457/439 316/459/441 379/460/442 +f 377/458/440 379/460/442 378/382/364 +f 316/459/441 315/443/425 381/446/428 +f 379/460/442 381/446/428 380/328/313 +f 284/334/319 320/369/351 383/461/443 +f 362/322/307 383/461/443 382/462/444 +f 320/369/351 319/463/445 385/464/446 +f 383/461/443 385/464/446 384/465/447 +f 319/463/445 318/360/343 387/448/430 +f 385/464/446 387/448/430 386/449/431 +f 288/444/426 339/466/448 389/467/449 +f 371/445/427 389/467/449 388/411/393 +f 339/466/448 340/437/419 391/468/450 +f 389/467/449 391/468/450 390/413/395 +f 287/409/391 333/325/310 393/469/451 +f 373/447/429 393/469/451 372/470/452 +f 333/325/310 334/440/422 393/469/451 +f 393/469/451 395/442/424 392/471/453 +f 357/420/402 374/451/433 342/375/357 +f 390/413/395 369/472/454 399/450/432 +f 391/468/450 368/439/421 369/472/454 +f 449/417/399 451/473/455 336/474/456 +f 395/442/424 366/475/457 394/476/458 +f 334/440/422 556/327/312 401/441/423 +f 398/438/420 410/477/459 404/478/460 +f 401/441/423 413/378/360 366/475/457 +f 399/450/432 411/479/461 406/480/462 +f 494/452/434 495/481/463 408/482/464 +f 319/463/445 547/371/353 546/361/344 +f 475/455/437 476/483/465 375/484/466 +f 374/451/433 406/480/462 397/359/342 +f 369/472/454 405/485/467 411/479/461 +f 368/439/421 404/478/460 405/485/467 +f 451/473/455 453/486/468 400/487/469 +f 366/475/457 402/488/470 367/489/471 +f 410/477/459 422/490/472 416/491/473 +f 413/378/360 425/380/362 414/492/474 +f 411/479/461 423/493/475 418/494/476 +f 495/481/463 496/495/477 408/482/464 +f 401/441/423 563/496/478 413/378/360 +f 476/483/465 477/497/479 419/498/480 +f 406/480/462 418/494/476 409/357/340 +f 405/485/467 417/499/481 423/493/475 +f 404/478/460 416/491/473 417/499/481 +f 453/486/468 455/500/482 412/501/483 +f 402/488/470 414/492/474 403/502/484 +f 458/503/485 459/504/486 489/396/378 +f 485/505/487 486/506/488 426/507/489 +f 487/508/490 427/509/491 428/510/492 +f 487/508/490 488/511/493 427/509/491 +f 518/512/494 529/513/495 461/514/496 +f 511/515/497 510/516/498 432/517/499 +f 511/515/497 430/518/500 431/519/501 +f 461/514/496 457/520/502 491/346/331 +f 512/521/503 431/519/501 433/522/504 +f 311/405/387 307/57/56 469/320/305 +f 479/523/505 478/524/506 433/522/504 +f 386/449/431 372/470/452 444/525/507 +f 444/525/507 438/526/508 445/331/316 +f 363/433/415 382/462/444 436/432/414 +f 436/432/414 440/527/509 437/385/367 +f 382/462/444 384/465/447 440/527/509 +f 440/527/509 442/528/510 441/386/368 +f 384/465/447 386/449/431 442/528/510 +f 442/528/510 444/525/507 443/387/369 +f 372/470/452 392/471/453 438/526/508 +f 438/526/508 446/529/511 439/332/317 +f 392/471/453 394/476/458 446/529/511 +f 446/529/511 448/530/512 447/415/397 +f 279/232/230 435/233/231 437/385/367 +f 435/233/231 434/131/129 436/432/414 +f 394/476/458 367/489/471 448/530/512 +f 448/530/512 450/531/513 449/417/399 +f 367/489/471 403/502/484 450/531/513 +f 450/531/513 452/532/514 451/473/455 +f 403/502/484 415/533/515 452/532/514 +f 452/532/514 454/534/516 453/486/468 +f 479/523/505 480/535/517 454/534/516 +f 480/535/517 481/536/518 455/500/482 +f 477/497/479 481/536/518 432/517/499 +f 278/136/134 298/240/238 281/434/416 +f 281/434/416 300/537/519 317/457/439 +f 317/457/439 327/397/379 316/459/441 +f 316/459/441 328/399/381 315/443/425 +f 304/348/333 288/444/426 329/400/382 +f 288/444/426 304/348/333 339/466/448 +f 339/466/448 343/422/404 340/437/419 +f 396/453/435 398/438/420 344/424/406 +f 398/438/420 396/453/435 410/477/459 +f 410/477/459 408/482/464 422/490/472 +f 484/395/377 482/263/261 456/242/240 +f 530/538/520 516/539/521 458/503/485 +f 516/539/521 517/540/522 459/504/486 +f 517/540/522 518/512/494 460/541/523 +f 529/513/495 519/542/524 457/520/502 +f 519/542/524 520/543/525 462/544/526 +f 520/543/525 521/545/527 463/546/528 +f 521/545/527 522/547/529 465/548/530 +f 522/547/529 523/549/531 466/550/532 +f 488/511/493 496/495/477 429/551/533 +f 523/549/531 525/552/534 466/550/532 +f 321/333/318 289/416/398 472/363/346 +f 280/321/306 323/388/370 469/320/305 +f 323/388/370 322/389/371 470/404/386 +f 322/389/371 321/333/318 471/406/388 +f 289/416/398 335/418/400 468/364/347 +f 335/418/400 336/474/456 473/427/409 +f 336/474/456 400/487/469 474/429/411 +f 400/487/469 412/501/483 475/455/437 +f 412/501/483 424/553/535 477/497/479 +f 415/533/515 414/492/474 478/524/506 +f 431/519/501 430/518/500 480/535/517 +f 430/518/500 432/517/499 481/536/518 +f 424/553/535 455/500/482 481/536/518 +f 459/504/486 460/541/523 489/396/378 +f 460/541/523 461/514/496 490/398/380 +f 457/520/502 462/544/526 492/421/403 +f 462/544/526 463/546/528 493/423/405 +f 463/546/528 464/554/536 494/452/434 +f 464/554/536 465/548/530 495/481/463 +f 465/548/530 466/550/532 496/495/477 +f 423/493/475 417/499/481 485/505/487 +f 416/491/473 487/508/490 486/506/488 +f 416/491/473 422/490/472 487/508/490 +f 300/537/519 298/240/238 482/263/261 +f 422/490/472 420/555/537 488/511/493 +f 414/492/474 425/380/362 478/524/506 +f 421/556/538 568/368/350 565/358/341 +f 497/402/384 499/339/324 433/522/504 +f 341/377/359 557/557/539 303/345/330 +f 421/556/538 418/494/476 498/366/349 +f 423/493/475 485/505/487 500/558/540 +f 530/538/520 524/294/279 509/268/265 +f 332/365/348 309/428/410 503/559/541 +f 526/560/542 525/552/534 511/561/497 +f 526/560/542 511/561/497 512/562/503 +f 527/563/543 512/562/503 513/564/544 +f 311/405/387 330/407/389 501/565/545 +f 330/407/389 331/408/390 502/566/546 +f 331/408/390 332/365/348 503/559/541 +f 309/428/410 345/430/412 514/567/547 +f 345/430/412 346/456/438 504/568/548 +f 346/456/438 375/484/466 505/569/549 +f 375/484/466 407/570/550 506/571/551 +f 407/570/550 419/498/480 508/572/552 +f 419/498/480 432/517/499 510/516/498 +f 503/573/541 514/574/547 518/512/494 +f 515/575/339 501/576/545 516/539/521 +f 501/576/545 502/577/546 516/539/521 +f 502/577/546 503/573/541 518/512/494 +f 514/574/547 504/578/548 529/513/495 +f 504/578/548 505/579/549 519/542/524 +f 505/579/549 506/580/551 520/543/525 +f 506/580/551 507/581/553 521/545/527 +f 507/581/553 508/582/552 523/549/531 +f 508/582/552 510/583/498 525/552/534 +f 458/503/485 456/242/240 524/294/279 +f 427/509/491 429/551/533 526/560/542 +f 427/509/491 526/560/542 428/510/492 +f 428/510/492 527/563/543 426/507/489 +f 426/507/489 528/584/554 485/505/487 +f 498/366/349 500/558/540 513/564/544 +f 513/585/544 433/522/504 499/339/324 +f 554/586/555 545/587/556 546/361/344 +f 535/426/408 531/353/338 541/352/337 +f 532/454/436 534/588/557 542/589/558 +f 534/588/557 535/426/408 543/590/559 +f 542/589/558 552/591/560 532/454/436 +f 552/591/560 553/592/561 548/370/352 +f 553/592/561 554/586/555 547/371/353 +f 545/587/556 559/593/562 555/326/311 +f 559/593/562 560/594/563 556/327/312 +f 560/594/563 561/595/564 556/327/312 +f 561/595/564 564/596/565 563/496/478 +f 564/596/565 567/597/566 566/379/361 +f 569/401/383 567/597/566 570/598/567 +f 292/335/320 534/588/557 284/334/319 +f 303/345/330 538/599/568 326/394/376 +f 325/393/375 550/600/569 324/391/373 +f 497/402/384 570/598/567 499/339/324 +f 12/2/2 1/10/10 275/3/3 +f 61/129/127 64/4/4 2/6/6 +f 2/6/6 14/5/5 274/8/8 +f 22/52/52 310/9/9 1/10/10 +f 3/12/12 279/232/230 467/13/13 +f 70/15/15 5/29/29 283/16/16 +f 358/18/18 282/35/35 6/19/19 +f 256/107/105 46/20/20 257/22/22 +f 25/24/24 7/109/107 78/25/25 +f 34/27/27 10/113/111 145/28/28 +f 5/29/29 11/31/31 290/30/30 +f 11/31/31 12/2/2 291/1/1 +f 6/19/19 13/34/34 63/33/33 +f 13/34/34 14/5/5 64/4/4 +f 282/35/35 296/36/36 13/34/34 +f 14/5/5 13/34/34 297/7/7 +f 273/601/570 202/37/37 272/39/39 +f 61/129/127 347/40/40 16/42/42 +f 60/117/115 67/43/43 18/45/45 +f 186/119/117 194/46/46 19/48/48 +f 20/50/50 240/602/571 238/51/51 +f 242/298/283 22/52/52 232/53/53 +f 16/603/42 299/54/41 22/52/52 +f 509/356/265 217/55/54 307/57/56 +f 105/59/58 263/108/106 266/60/59 +f 247/183/181 31/61/60 234/63/62 +f 45/65/64 23/125/123 172/66/65 +f 272/604/39 201/67/38 269/69/67 +f 249/303/288 33/70/68 248/72/70 +f 241/139/137 21/73/71 237/74/72 +f 54/76/74 258/265/263 259/77/75 +f 133/79/77 270/101/99 267/80/78 +f 6/19/19 27/82/80 84/81/79 +f 27/82/80 26/84/82 86/83/81 +f 26/84/82 25/24/24 88/23/23 +f 3/12/12 36/87/85 147/86/84 +f 36/87/85 35/89/87 149/88/86 +f 35/89/87 34/27/27 151/26/26 +f 65/91/89 62/32/32 37/90/88 +f 66/93/91 65/91/89 38/92/90 +f 67/43/43 66/93/91 39/44/44 +f 192/97/95 187/94/92 40/96/94 +f 193/99/97 192/97/95 41/98/96 +f 194/46/46 193/99/97 42/47/47 +f 200/100/98 271/310/295 270/101/99 +f 17/49/49 238/51/51 250/102/100 +f 12/2/2 236/124/122 232/53/53 +f 24/56/55 43/104/102 174/103/101 +f 43/104/102 44/106/104 175/105/103 +f 44/106/104 45/65/64 176/64/63 +f 234/63/62 8/62/61 256/107/105 +f 55/75/73 259/77/75 263/108/106 +f 96/111/109 78/25/25 50/110/108 +f 98/168/166 96/111/109 51/112/110 +f 10/113/111 48/115/113 153/114/112 +f 48/115/113 49/174/172 155/116/114 +f 68/118/116 60/117/115 54/76/74 +f 69/130/128 68/118/116 55/75/73 +f 195/121/119 186/119/117 56/120/118 +f 196/152/150 195/121/119 57/122/120 +f 38/92/90 251/312/297 252/123/121 +f 11/31/31 235/300/285 236/124/122 +f 23/125/123 58/127/125 177/126/124 +f 58/127/125 59/155/153 178/128/126 +f 16/42/42 21/73/71 61/129/127 +f 20/50/50 17/49/49 63/33/33 +f 21/73/71 20/50/50 64/4/4 +f 347/40/40 61/129/127 2/6/6 +f 67/43/43 60/117/115 7/109/107 +f 27/82/80 6/19/19 65/91/89 +f 65/91/89 66/93/91 26/84/82 +f 66/93/91 67/43/43 25/24/24 +f 50/110/108 7/109/107 68/118/116 +f 51/112/110 50/110/108 69/130/128 +f 142/132/130 71/134/132 361/133/131 +f 71/134/132 70/15/15 360/14/14 +f 278/136/134 359/138/136 73/137/135 +f 72/17/17 73/137/135 358/18/18 +f 240/602/571 20/50/50 241/139/137 +f 106/178/176 53/140/138 76/142/140 +f 103/143/141 74/177/175 109/144/142 +f 9/165/163 28/145/143 79/147/145 +f 79/147/145 89/146/144 78/25/25 +f 8/62/61 31/61/60 81/149/147 +f 94/150/148 80/170/168 81/149/147 +f 107/172/170 51/112/110 82/151/149 +f 197/181/179 196/152/150 104/153/151 +f 33/70/68 249/303/288 233/154/152 +f 59/155/153 83/184/182 179/156/154 +f 30/158/156 4/135/133 85/157/155 +f 72/17/17 84/81/79 85/157/155 +f 29/160/158 30/158/156 87/159/157 +f 87/159/157 85/157/155 86/83/81 +f 28/145/143 29/160/158 89/146/144 +f 89/146/144 87/159/157 88/23/23 +f 33/70/68 5/29/29 91/161/159 +f 91/161/159 70/15/15 90/162/160 +f 32/71/69 33/70/68 93/163/161 +f 93/163/161 91/161/159 92/164/162 +f 31/61/60 32/71/69 95/148/146 +f 95/148/146 93/163/161 94/150/148 +f 52/167/165 9/165/163 97/166/164 +f 97/166/164 79/147/145 96/111/109 +f 53/140/138 52/167/165 99/141/139 +f 99/141/139 97/166/164 98/168/166 +f 46/20/20 8/62/61 101/169/167 +f 80/170/168 100/171/169 101/169/167 +f 101/169/167 103/143/141 47/21/21 +f 100/171/169 102/176/174 103/143/141 +f 55/75/73 105/59/58 82/151/149 +f 77/173/171 98/168/166 107/172/170 +f 76/142/140 99/141/139 77/173/171 +f 49/174/172 108/188/186 157/175/173 +f 102/176/174 75/190/188 74/177/175 +f 109/144/142 264/198/196 257/22/22 +f 118/192/190 106/178/176 112/179/177 +f 74/177/175 110/191/189 121/78/76 +f 119/186/184 107/172/170 114/180/178 +f 198/196/194 197/181/179 116/182/180 +f 248/72/70 32/71/69 247/183/181 +f 83/184/182 115/199/197 180/185/183 +f 105/59/58 117/58/57 114/180/178 +f 113/187/185 77/173/171 119/186/184 +f 112/179/177 76/142/140 113/187/185 +f 108/188/186 120/203/201 159/189/187 +f 75/190/188 111/205/203 110/191/189 +f 130/241/239 118/192/190 124/193/191 +f 133/79/77 121/78/76 122/194/192 +f 131/201/199 119/186/184 126/195/193 +f 116/182/180 128/264/262 199/197/195 +f 121/78/76 267/80/78 264/198/196 +f 181/239/237 180/185/183 127/200/198 +f 117/58/57 129/68/66 126/195/193 +f 125/202/200 113/187/185 131/201/199 +f 124/193/191 112/179/177 125/202/200 +f 120/203/201 132/262/260 161/204/202 +f 111/205/203 123/236/234 122/194/192 +f 164/245/243 163/206/204 192/97/95 +f 134/208/206 136/211/209 189/209/207 +f 135/212/210 190/210/208 136/211/209 +f 135/212/210 137/257/255 191/213/211 +f 166/215/213 162/222/220 230/216/214 +f 212/284/278 213/217/215 140/219/217 +f 138/218/216 213/217/215 139/221/219 +f 194/46/46 186/119/117 162/222/220 +f 139/221/219 214/220/218 141/224/222 +f 173/11/11 467/13/13 307/57/56 +f 182/260/258 183/225/223 141/224/222 +f 150/226/224 144/227/225 80/170/168 +f 151/26/26 145/28/28 144/227/225 +f 142/132/130 146/228/226 90/162/160 +f 143/85/83 147/86/84 146/228/226 +f 146/228/226 148/229/227 92/164/162 +f 147/86/84 149/88/86 148/229/227 +f 148/229/227 150/226/224 94/150/148 +f 149/88/86 151/26/26 150/226/224 +f 144/227/225 152/230/228 100/171/169 +f 145/28/28 153/114/112 152/230/228 +f 152/230/228 154/231/229 102/176/174 +f 153/114/112 155/116/114 154/231/229 +f 435/233/231 279/232/230 143/85/83 +f 434/131/129 435/233/231 142/132/130 +f 154/231/229 156/234/232 75/190/188 +f 155/116/114 157/175/173 156/234/232 +f 156/234/232 158/235/233 111/205/203 +f 157/175/173 159/189/187 158/235/233 +f 158/235/233 160/237/235 123/236/234 +f 159/189/187 161/204/202 160/237/235 +f 184/238/236 183/225/223 160/237/235 +f 185/261/259 184/238/236 161/204/202 +f 185/261/259 181/239/237 140/219/217 +f 4/135/133 15/95/93 298/240/238 +f 30/158/156 40/96/94 15/95/93 +f 29/160/158 41/98/96 40/96/94 +f 28/145/143 42/47/47 41/98/96 +f 42/47/47 28/145/143 9/165/163 +f 52/167/165 56/120/118 19/48/48 +f 53/140/138 57/122/120 56/120/118 +f 57/122/120 53/140/138 106/178/176 +f 118/192/190 116/182/180 104/153/151 +f 130/241/239 128/264/262 116/182/180 +f 482/263/261 187/94/92 456/242/240 +f 163/206/204 164/245/243 218/244/242 +f 164/245/243 165/247/245 219/246/244 +f 165/247/245 166/215/213 220/214/212 +f 162/222/220 167/249/247 221/248/246 +f 167/249/247 168/251/249 222/250/248 +f 168/251/249 169/253/251 223/252/250 +f 224/255/253 223/252/250 170/254/252 +f 225/258/256 224/255/253 171/256/254 +f 137/257/255 171/256/254 199/197/195 +f 171/256/254 137/257/255 226/259/257 +f 176/64/63 172/66/65 10/113/111 +f 173/11/11 174/103/101 36/87/85 +f 174/103/101 175/105/103 35/89/87 +f 175/105/103 176/64/63 34/27/27 +f 172/66/65 177/126/124 48/115/113 +f 177/126/124 178/128/126 49/174/172 +f 178/128/126 179/156/154 108/188/186 +f 179/156/154 180/185/183 120/203/201 +f 132/262/260 120/203/201 181/239/237 +f 122/194/192 123/236/234 182/260/258 +f 138/218/216 139/221/219 184/238/236 +f 140/219/217 138/218/216 185/261/259 +f 161/204/202 132/262/260 185/261/259 +f 192/97/95 193/99/97 165/247/245 +f 193/99/97 194/46/46 166/215/213 +f 167/249/247 162/222/220 195/121/119 +f 168/251/249 167/249/247 196/152/150 +f 169/253/251 168/251/249 197/181/179 +f 170/254/252 169/253/251 198/196/194 +f 171/256/254 170/254/252 199/197/195 +f 188/207/205 189/209/207 125/202/200 +f 190/210/208 124/193/191 189/209/207 +f 190/210/208 191/213/211 130/241/239 +f 298/240/238 15/95/93 482/263/261 +f 191/213/211 199/197/195 128/264/262 +f 182/260/258 200/100/98 133/79/77 +f 269/69/67 129/68/66 266/60/59 +f 202/37/37 200/100/98 141/224/222 +f 18/45/45 239/311/296 258/265/263 +f 201/67/38 203/266/264 126/195/193 +f 188/207/205 131/201/199 203/266/264 +f 524/294/279 231/243/241 509/268/265 +f 206/269/266 216/278/272 23/125/123 +f 213/271/215 212/605/278 226/259/257 +f 213/271/215 227/270/267 214/273/218 +f 214/273/218 228/272/268 215/275/221 +f 43/104/102 24/56/55 204/276/270 +f 44/106/104 43/104/102 205/277/271 +f 45/65/64 44/106/104 206/269/266 +f 216/278/272 207/279/273 58/127/125 +f 207/279/273 208/280/274 59/155/153 +f 208/280/274 209/281/275 83/184/182 +f 209/281/275 210/282/276 115/199/197 +f 127/200/198 115/199/197 211/283/277 +f 140/219/217 127/200/198 212/284/278 +f 220/214/212 230/216/214 216/286/272 +f 204/287/270 217/267/54 218/244/242 +f 218/244/242 219/246/244 205/288/271 +f 206/285/266 205/288/271 220/214/212 +f 230/216/214 221/248/246 207/289/273 +f 221/248/246 222/250/248 208/290/274 +f 222/250/248 223/252/250 209/291/275 +f 223/252/250 224/255/253 210/292/276 +f 211/293/277 210/292/276 225/258/256 +f 212/605/278 211/293/277 226/259/257 +f 456/242/240 163/206/204 524/294/279 +f 227/270/267 226/259/257 137/257/255 +f 136/211/209 228/272/268 227/270/267 +f 134/208/206 229/274/269 228/272/268 +f 188/207/205 203/266/264 229/274/269 +f 215/275/221 229/274/269 203/266/264 +f 141/224/222 215/223/221 202/37/37 +f 247/183/181 234/63/62 246/296/281 +f 232/53/53 236/124/122 242/298/283 +f 243/299/284 244/301/286 235/300/285 +f 244/301/286 245/297/282 236/124/122 +f 233/154/152 249/303/288 253/302/287 +f 249/303/288 248/72/70 254/304/289 +f 248/72/70 247/183/181 255/295/280 +f 260/305/290 246/296/281 256/107/105 +f 261/306/291 260/305/290 257/22/22 +f 257/22/22 264/198/196 262/307/292 +f 264/198/196 267/80/78 265/308/293 +f 267/80/78 270/101/99 268/309/294 +f 271/310/295 273/601/570 268/309/294 +f 5/29/29 233/154/152 235/300/285 +f 39/44/44 252/123/121 239/311/296 +f 37/90/88 250/102/100 251/312/297 +f 202/37/37 273/601/570 271/310/295 +f 275/3/3 276/319/304 293/313/298 +f 295/317/302 352/314/299 277/316/301 +f 297/7/7 295/317/302 274/8/8 +f 275/3/3 310/9/9 276/319/304 +f 467/13/13 279/232/230 280/321/306 +f 283/16/16 284/334/319 362/322/307 +f 285/324/309 282/35/35 358/18/18 +f 334/440/422 333/325/310 556/327/312 +f 370/329/314 286/431/413 312/330/315 +f 439/332/317 289/416/398 321/333/318 +f 290/30/30 292/335/320 284/334/319 +f 291/1/1 293/313/298 292/335/320 +f 351/337/322 294/338/323 285/324/309 +f 352/314/299 295/317/302 294/338/323 +f 294/338/323 296/36/36 282/35/35 +f 296/36/36 294/338/323 297/7/7 +f 498/606/349 499/339/324 571/341/326 +f 299/41/41 347/40/40 301/342/327 +f 326/394/376 355/343/328 303/345/330 +f 329/400/382 491/346/331 304/348/333 +f 537/350/335 539/436/418 305/351/336 +f 276/319/304 308/318/303 531/353/338 +f 310/9/9 299/54/41 308/318/303 +f 311/405/387 515/355/339 307/57/56 +f 565/358/341 562/410/392 397/359/342 +f 287/409/391 318/360/343 533/362/345 +f 468/364/347 309/428/410 332/365/348 +f 421/556/538 498/366/349 568/368/350 +f 319/463/445 320/369/351 547/371/353 +f 301/342/327 306/372/354 536/374/356 +f 558/376/358 557/557/539 341/377/359 +f 566/379/361 569/401/383 425/380/362 +f 376/381/363 314/383/365 285/324/309 +f 378/382/364 313/384/366 314/383/365 +f 380/328/313 312/330/315 313/384/366 +f 441/386/368 323/388/370 280/321/306 +f 443/387/369 322/389/371 323/388/370 +f 445/331/316 321/333/318 322/389/371 +f 302/349/334 350/336/321 324/391/373 +f 324/391/373 353/390/372 325/393/375 +f 325/393/375 354/392/374 326/394/376 +f 300/537/519 484/395/377 327/397/379 +f 327/397/379 489/396/378 328/399/381 +f 328/399/381 490/398/380 329/400/382 +f 569/401/383 570/598/567 497/402/384 +f 549/403/385 537/350/335 302/349/334 +f 531/353/338 535/426/408 293/313/298 +f 470/404/386 330/407/389 311/405/387 +f 471/406/388 331/408/390 330/407/389 +f 472/363/346 332/365/348 331/408/390 +f 333/325/310 287/409/391 555/326/311 +f 562/410/392 558/376/358 342/375/357 +f 286/431/413 370/329/314 337/412/394 +f 337/412/394 388/411/393 338/414/396 +f 447/415/397 335/418/400 289/416/398 +f 449/417/399 336/474/456 335/418/400 +f 303/345/330 348/344/329 341/377/359 +f 341/377/359 356/419/401 342/375/357 +f 304/348/333 483/347/332 343/422/404 +f 343/422/404 492/421/403 344/424/406 +f 551/425/407 550/600/569 325/393/375 +f 535/426/408 534/588/557 292/335/320 +f 473/427/409 345/430/412 309/428/410 +f 474/429/411 346/456/438 345/430/412 +f 352/314/299 306/372/354 349/315/300 +f 350/336/321 302/349/334 351/337/322 +f 351/337/322 305/351/336 352/314/299 +f 277/316/301 349/315/300 347/40/40 +f 286/431/413 348/344/329 355/343/328 +f 350/336/321 285/324/309 353/390/372 +f 313/384/366 354/392/374 353/390/372 +f 312/330/315 355/343/328 354/392/374 +f 348/344/329 286/431/413 356/419/401 +f 356/419/401 337/412/394 357/420/402 +f 361/133/131 363/433/415 436/432/414 +f 360/14/14 362/322/307 363/433/415 +f 365/435/417 359/138/136 278/136/134 +f 359/138/136 365/435/417 358/18/18 +f 306/372/354 305/351/336 540/373/355 +f 391/468/450 340/437/419 368/439/421 +f 401/441/423 366/475/457 395/442/424 +f 381/446/428 315/443/425 371/445/427 +f 380/328/313 381/446/428 370/329/314 +f 387/448/430 318/360/343 373/447/429 +f 373/447/429 372/470/452 386/449/431 +f 357/420/402 338/414/396 374/451/433 +f 344/424/406 493/423/405 396/453/435 +f 532/454/436 548/370/352 320/369/351 +f 475/455/437 375/484/466 346/456/438 +f 365/435/417 281/434/416 377/458/440 +f 377/458/440 376/381/363 364/323/308 +f 377/458/440 317/457/439 379/460/442 +f 376/381/363 377/458/440 378/382/364 +f 379/460/442 316/459/441 381/446/428 +f 378/382/364 379/460/442 380/328/313 +f 362/322/307 284/334/319 383/461/443 +f 363/433/415 362/322/307 382/462/444 +f 383/461/443 320/369/351 385/464/446 +f 382/462/444 383/461/443 384/465/447 +f 385/464/446 319/463/445 387/448/430 +f 384/465/447 385/464/446 386/449/431 +f 371/445/427 288/444/426 389/467/449 +f 370/329/314 371/445/427 388/411/393 +f 389/467/449 339/466/448 391/468/450 +f 388/411/393 389/467/449 390/413/395 +f 373/447/429 287/409/391 393/469/451 +f 393/469/451 392/471/453 372/470/452 +f 334/440/422 395/442/424 393/469/451 +f 395/442/424 394/476/458 392/471/453 +f 374/451/433 397/359/342 342/375/357 +f 338/414/396 390/413/395 399/450/432 +f 390/413/395 391/468/450 369/472/454 +f 451/473/455 400/487/469 336/474/456 +f 366/475/457 367/489/471 394/476/458 +f 556/327/312 563/496/478 401/441/423 +f 368/439/421 398/438/420 404/478/460 +f 413/378/360 402/488/470 366/475/457 +f 374/451/433 399/450/432 406/480/462 +f 396/453/435 494/452/434 408/482/464 +f 318/360/343 319/463/445 546/361/344 +f 476/483/465 407/570/550 375/484/466 +f 406/480/462 409/357/340 397/359/342 +f 399/450/432 369/472/454 411/479/461 +f 369/472/454 368/439/421 405/485/467 +f 453/486/468 412/501/483 400/487/469 +f 402/488/470 403/502/484 367/489/471 +f 404/478/460 410/477/459 416/491/473 +f 402/488/470 413/378/360 414/492/474 +f 406/480/462 411/479/461 418/494/476 +f 496/495/477 420/555/537 408/482/464 +f 563/496/478 566/379/361 413/378/360 +f 407/570/550 476/483/465 419/498/480 +f 418/494/476 421/556/538 409/357/340 +f 411/479/461 405/485/467 423/493/475 +f 405/485/467 404/478/460 417/499/481 +f 455/500/482 424/553/535 412/501/483 +f 414/492/474 415/533/515 403/502/484 +f 484/395/377 458/503/485 489/396/378 +f 486/506/488 428/510/492 426/507/489 +f 486/506/488 487/508/490 428/510/492 +f 488/511/493 429/551/533 427/509/491 +f 529/513/495 457/520/502 461/514/496 +f 430/518/500 511/515/497 432/517/499 +f 512/521/503 511/515/497 431/519/501 +f 457/520/502 483/347/332 491/346/331 +f 513/585/544 512/521/503 433/522/504 +f 307/57/56 467/13/13 469/320/305 +f 431/519/501 479/523/505 433/522/504 +f 372/470/452 438/526/508 444/525/507 +f 438/526/508 439/332/317 445/331/316 +f 382/462/444 440/527/509 436/432/414 +f 440/527/509 441/386/368 437/385/367 +f 384/465/447 442/528/510 440/527/509 +f 442/528/510 443/387/369 441/386/368 +f 386/449/431 444/525/507 442/528/510 +f 444/525/507 445/331/316 443/387/369 +f 392/471/453 446/529/511 438/526/508 +f 446/529/511 447/415/397 439/332/317 +f 394/476/458 448/530/512 446/529/511 +f 448/530/512 449/417/399 447/415/397 +f 280/321/306 279/232/230 437/385/367 +f 437/385/367 435/233/231 436/432/414 +f 367/489/471 450/531/513 448/530/512 +f 450/531/513 451/473/455 449/417/399 +f 403/502/484 452/532/514 450/531/513 +f 452/532/514 453/486/468 451/473/455 +f 415/533/515 454/534/516 452/532/514 +f 454/534/516 455/500/482 453/486/468 +f 415/533/515 479/523/505 454/534/516 +f 454/534/516 480/535/517 455/500/482 +f 419/498/480 477/497/479 432/517/499 +f 298/240/238 300/537/519 281/434/416 +f 300/537/519 327/397/379 317/457/439 +f 327/397/379 328/399/381 316/459/441 +f 328/399/381 329/400/382 315/443/425 +f 288/444/426 315/443/425 329/400/382 +f 304/348/333 343/422/404 339/466/448 +f 343/422/404 344/424/406 340/437/419 +f 398/438/420 340/437/419 344/424/406 +f 396/453/435 408/482/464 410/477/459 +f 408/482/464 420/555/537 422/490/472 +f 458/503/485 484/395/377 456/242/240 +f 516/539/521 459/504/486 458/503/485 +f 517/540/522 460/541/523 459/504/486 +f 518/512/494 461/514/496 460/541/523 +f 519/542/524 462/544/526 457/520/502 +f 520/543/525 463/546/528 462/544/526 +f 521/545/527 464/554/536 463/546/528 +f 464/554/536 521/545/527 465/548/530 +f 465/548/530 522/547/529 466/550/532 +f 496/495/477 466/550/532 429/551/533 +f 525/552/534 429/551/533 466/550/532 +f 289/416/398 468/364/347 472/363/346 +f 323/388/370 470/404/386 469/320/305 +f 322/389/371 471/406/388 470/404/386 +f 321/333/318 472/363/346 471/406/388 +f 335/418/400 473/427/409 468/364/347 +f 336/474/456 474/429/411 473/427/409 +f 400/487/469 475/455/437 474/429/411 +f 412/501/483 476/483/465 475/455/437 +f 476/483/465 412/501/483 477/497/479 +f 479/523/505 415/533/515 478/524/506 +f 479/523/505 431/519/501 480/535/517 +f 480/535/517 430/518/500 481/536/518 +f 477/497/479 424/553/535 481/536/518 +f 460/541/523 490/398/380 489/396/378 +f 461/514/496 491/346/331 490/398/380 +f 483/347/332 457/520/502 492/421/403 +f 492/421/403 462/544/526 493/423/405 +f 493/423/405 463/546/528 494/452/434 +f 494/452/434 464/554/536 495/481/463 +f 495/481/463 465/548/530 496/495/477 +f 417/499/481 486/506/488 485/505/487 +f 417/499/481 416/491/473 486/506/488 +f 422/490/472 488/511/493 487/508/490 +f 484/395/377 300/537/519 482/263/261 +f 420/555/537 496/495/477 488/511/493 +f 425/380/362 497/402/384 478/524/506 +f 409/357/340 421/556/538 565/358/341 +f 478/524/506 497/402/384 433/522/504 +f 557/557/539 538/599/568 303/345/330 +f 418/494/476 500/558/540 498/366/349 +f 418/494/476 423/493/475 500/558/540 +f 515/575/339 530/538/520 509/268/265 +f 309/428/410 514/567/547 503/559/541 +f 525/552/534 510/583/498 511/561/497 +f 527/563/543 526/560/542 512/562/503 +f 528/584/554 527/563/543 513/564/544 +f 515/355/339 311/405/387 501/565/545 +f 501/565/545 330/407/389 502/566/546 +f 502/566/546 331/408/390 503/559/541 +f 345/430/412 504/568/548 514/567/547 +f 346/456/438 505/569/549 504/568/548 +f 375/484/466 506/571/551 505/569/549 +f 407/570/550 507/607/553 506/571/551 +f 507/607/553 407/570/550 508/572/552 +f 508/572/552 419/498/480 510/516/498 +f 514/574/547 529/513/495 518/512/494 +f 530/538/520 515/575/339 516/539/521 +f 502/577/546 517/540/522 516/539/521 +f 517/540/522 502/577/546 518/512/494 +f 504/578/548 519/542/524 529/513/495 +f 505/579/549 520/543/525 519/542/524 +f 506/580/551 521/545/527 520/543/525 +f 507/581/553 522/547/529 521/545/527 +f 522/547/529 507/581/553 523/549/531 +f 523/549/531 508/582/552 525/552/534 +f 530/538/520 458/503/485 524/294/279 +f 429/551/533 525/552/534 526/560/542 +f 526/560/542 527/563/543 428/510/492 +f 527/563/543 528/584/554 426/507/489 +f 528/584/554 500/558/540 485/505/487 +f 500/558/540 528/584/554 513/564/544 +f 498/606/349 513/585/544 499/339/324 +f 545/587/556 533/362/345 546/361/344 +f 544/608/572 535/426/408 541/352/337 +f 534/588/557 543/590/559 542/589/558 +f 535/426/408 544/608/572 543/590/559 +f 552/591/560 548/370/352 532/454/436 +f 553/592/561 547/371/353 548/370/352 +f 554/586/555 546/361/344 547/371/353 +f 533/362/345 545/587/556 555/326/311 +f 555/326/311 559/593/562 556/327/312 +f 561/595/564 563/496/478 556/327/312 +f 564/596/565 566/379/361 563/496/478 +f 567/597/566 569/401/383 566/379/361 +f 567/597/566 572/340/325 570/598/567 +f 534/588/557 532/454/436 284/334/319 +f 538/599/568 551/425/407 326/394/376 +f 550/600/569 549/403/385 324/391/373 +f 570/598/567 572/340/325 499/339/324 +usemtl Material.001 +f 16/609/42 22/610/52 242/611/283 +f 245/612/282 241/613/137 237/614/72 +f 243/615/284 238/616/51 240/617/571 +f 244/618/286 240/617/571 241/613/137 +f 252/619/121 255/620/280 246/621/281 +f 238/616/51 243/615/284 253/622/287 +f 250/623/100 253/622/287 254/624/289 +f 251/625/297 254/624/289 255/620/280 +f 239/626/296 246/621/281 260/627/290 +f 258/628/263 260/627/290 259/629/75 +f 259/629/75 261/630/291 263/631/106 +f 263/631/106 262/632/292 266/633/59 +f 266/633/59 265/634/293 269/635/67 +f 269/635/67 268/636/294 273/637/570 +f 301/638/327 536/639/356 541/640/337 +f 544/641/572 541/640/337 536/639/356 +f 542/642/558 543/643/559 539/644/418 +f 543/643/559 544/641/572 540/645/355 +f 551/646/407 538/647/568 545/648/556 +f 537/649/335 549/650/385 552/651/560 +f 549/650/385 550/652/569 553/653/561 +f 550/652/569 551/646/407 554/654/555 +f 538/647/568 557/655/539 559/656/562 +f 557/655/539 558/657/358 559/656/562 +f 558/657/358 562/658/392 560/659/563 +f 562/658/392 565/660/341 561/661/564 +f 565/660/341 568/662/350 564/663/565 +f 568/662/350 571/664/326 572/665/325 +f 237/614/72 16/609/42 242/611/283 +f 242/611/283 245/612/282 237/614/72 +f 244/618/286 243/615/284 240/617/571 +f 245/612/282 244/618/286 241/613/137 +f 239/626/296 252/619/121 246/621/281 +f 250/623/100 238/616/51 253/622/287 +f 251/625/297 250/623/100 254/624/289 +f 252/619/121 251/625/297 255/620/280 +f 258/628/263 239/626/296 260/627/290 +f 260/627/290 261/630/291 259/629/75 +f 261/630/291 262/632/292 263/631/106 +f 262/632/292 265/634/293 266/633/59 +f 265/634/293 268/636/294 269/635/67 +f 272/666/39 269/635/67 273/637/570 +f 308/667/303 301/638/327 541/640/337 +f 540/645/355 544/641/572 536/639/356 +f 537/649/335 542/642/558 539/644/418 +f 539/644/418 543/643/559 540/645/355 +f 554/654/555 551/646/407 545/648/556 +f 542/642/558 537/649/335 552/651/560 +f 552/651/560 549/650/385 553/653/561 +f 553/653/561 550/652/569 554/654/555 +f 545/648/556 538/647/568 559/656/562 +f 558/657/358 560/659/563 559/656/562 +f 562/658/392 561/661/564 560/659/563 +f 565/660/341 564/663/565 561/661/564 +f 568/662/350 567/668/566 564/663/565 +f 567/668/566 568/662/350 572/665/325 diff --git a/Escape-the-Dawn/Models/shiptexture.png b/Escape-the-Dawn/Models/shiptexture.png new file mode 100644 index 0000000..ed6b9e4 Binary files /dev/null and b/Escape-the-Dawn/Models/shiptexture.png differ diff --git a/Escape-the-Dawn/Models/sphere.mtl b/Escape-the-Dawn/Models/sphere.mtl new file mode 100644 index 0000000..081e73f --- /dev/null +++ b/Escape-the-Dawn/Models/sphere.mtl @@ -0,0 +1,12 @@ +# Blender MTL File: 'obstaclesandstuff.blend' +# Material Count: 1 + +newmtl Material.001 +Ns 96.078431 +Ka 0.000000 0.000000 0.000000 +Kd 0.640000 0.640000 0.640000 +Ks 0.500000 0.500000 0.500000 +Ni 1.000000 +d 1.000000 +illum 2 +map_Kd ObstacleTexture.png diff --git a/Escape-the-Dawn/Models/sphere.obj b/Escape-the-Dawn/Models/sphere.obj new file mode 100644 index 0000000..7dfacdd --- /dev/null +++ b/Escape-the-Dawn/Models/sphere.obj @@ -0,0 +1,211 @@ +# Blender v2.69 (sub 0) OBJ File: 'obstaclesandstuff.blend' +# www.blender.org +mtllib sphere.mtl +o Icosphere +v -0.000000 -0.184854 -0.000000 +v 0.133761 -0.082670 0.097182 +v -0.051091 -0.082670 0.157246 +v -0.165338 -0.082669 -0.000000 +v -0.051091 -0.082670 -0.157246 +v 0.133761 -0.082670 -0.097182 +v 0.051091 0.082670 0.157246 +v -0.133761 0.082670 0.097182 +v -0.133761 0.082670 -0.097182 +v 0.051091 0.082670 -0.157246 +v 0.165338 0.082669 -0.000000 +v -0.000000 0.184854 -0.000000 +v -0.030031 -0.157247 0.092426 +v 0.078622 -0.157247 0.057122 +v 0.048592 -0.097185 0.149549 +v 0.157245 -0.097184 -0.000000 +v 0.078622 -0.157247 -0.057122 +v -0.097183 -0.157246 -0.000000 +v -0.127214 -0.097184 0.092426 +v -0.030031 -0.157247 -0.092426 +v -0.127214 -0.097184 -0.092426 +v 0.048592 -0.097185 -0.149549 +v 0.175807 0.000000 0.057122 +v 0.175807 0.000000 -0.057122 +v -0.000000 0.000000 0.184854 +v 0.108654 0.000000 0.149550 +v -0.175807 0.000000 0.057122 +v -0.108654 0.000000 0.149550 +v -0.108654 0.000000 -0.149550 +v -0.175807 0.000000 -0.057122 +v 0.108654 0.000000 -0.149550 +v -0.000000 0.000000 -0.184854 +v 0.127214 0.097184 0.092426 +v -0.048592 0.097185 0.149549 +v -0.157245 0.097184 -0.000000 +v -0.048592 0.097185 -0.149549 +v 0.127214 0.097184 -0.092426 +v 0.030031 0.157247 0.092426 +v 0.097183 0.157246 -0.000000 +v -0.078622 0.157247 0.057122 +v -0.078622 0.157247 -0.057122 +v 0.030031 0.157247 -0.092426 +vt 0.000000 0.000000 +vt 1.000000 0.000000 +vt 1.000000 1.000000 +vn 0.102381 -0.943523 0.315090 +vn 0.700224 -0.661699 0.268032 +vn -0.268034 -0.943523 0.194737 +vn -0.268034 -0.943523 -0.194737 +vn 0.102381 -0.943523 -0.315090 +vn 0.904989 -0.330385 0.268031 +vn 0.024747 -0.330386 0.943521 +vn -0.889697 -0.330385 0.315095 +vn -0.574602 -0.330387 -0.748784 +vn 0.534576 -0.330386 -0.777865 +vn 0.802609 -0.125627 0.583127 +vn -0.306569 -0.125628 0.943522 +vn -0.992077 -0.125629 0.000000 +vn -0.306569 -0.125628 -0.943522 +vn 0.802609 -0.125627 -0.583127 +vn 0.408946 0.661699 0.628425 +vn -0.471300 0.661699 0.583122 +vn -0.700224 0.661699 -0.268032 +vn 0.038530 0.661699 -0.748779 +vn 0.724042 0.661695 -0.194736 +vn -0.038530 -0.661699 0.748779 +vn 0.187594 -0.794658 0.577345 +vn 0.471300 -0.661699 0.583122 +vn 0.700224 -0.661699 -0.268032 +vn 0.607060 -0.794656 0.000000 +vn 0.331304 -0.943524 0.000000 +vn -0.724042 -0.661695 0.194736 +vn -0.491119 -0.794658 0.356821 +vn -0.408946 -0.661699 0.628425 +vn -0.408946 -0.661699 -0.628425 +vn -0.491119 -0.794657 -0.356821 +vn -0.724042 -0.661695 -0.194736 +vn 0.471300 -0.661699 -0.583122 +vn 0.187594 -0.794658 -0.577345 +vn -0.038530 -0.661699 -0.748779 +vn 0.992077 0.125629 0.000000 +vn 0.982246 -0.187599 0.000000 +vn 0.904989 -0.330385 -0.268031 +vn 0.306569 0.125628 0.943522 +vn 0.303531 -0.187597 0.934171 +vn 0.534576 -0.330386 0.777865 +vn -0.802609 0.125627 0.583127 +vn -0.794655 -0.187595 0.577348 +vn -0.574602 -0.330387 0.748783 +vn -0.802609 0.125627 -0.583127 +vn -0.794655 -0.187595 -0.577348 +vn -0.889697 -0.330385 -0.315095 +vn 0.306569 0.125628 -0.943522 +vn 0.303531 -0.187597 -0.934171 +vn 0.024747 -0.330386 -0.943521 +vn 0.574602 0.330387 0.748784 +vn 0.794656 0.187595 0.577348 +vn 0.889697 0.330385 0.315095 +vn -0.534576 0.330386 0.777864 +vn -0.303531 0.187597 0.934171 +vn -0.024747 0.330386 0.943521 +vn -0.904989 0.330385 -0.268031 +vn -0.982246 0.187599 0.000000 +vn -0.904989 0.330384 0.268031 +vn -0.024747 0.330386 -0.943521 +vn -0.303531 0.187597 -0.934171 +vn -0.534576 0.330386 -0.777865 +vn 0.889697 0.330385 -0.315095 +vn 0.794655 0.187595 -0.577348 +vn 0.574602 0.330387 -0.748784 +vn 0.268034 0.943523 0.194737 +vn 0.491120 0.794657 0.356821 +vn 0.724042 0.661695 0.194736 +vn -0.102381 0.943523 0.315090 +vn -0.187594 0.794658 0.577345 +vn 0.038530 0.661699 0.748779 +vn -0.331304 0.943524 0.000000 +vn -0.607060 0.794656 0.000000 +vn -0.700224 0.661699 0.268032 +vn -0.102381 0.943524 -0.315090 +vn -0.187594 0.794658 -0.577345 +vn -0.471300 0.661699 -0.583122 +vn 0.268034 0.943523 -0.194736 +vn 0.491120 0.794657 -0.356821 +vn 0.408947 0.661699 -0.628425 +usemtl Material.001 +s off +f 1/1/1 14/2/1 13/3/1 +f 2/1/2 14/2/2 16/3/2 +f 1/1/3 13/2/3 18/3/3 +f 1/1/4 18/2/4 20/3/4 +f 1/1/5 20/2/5 17/3/5 +f 2/1/6 16/2/6 23/3/6 +f 3/1/7 15/2/7 25/3/7 +f 4/1/8 19/2/8 27/3/8 +f 5/1/9 21/2/9 29/3/9 +f 6/1/10 22/2/10 31/3/10 +f 2/1/11 23/2/11 26/3/11 +f 3/1/12 25/2/12 28/3/12 +f 4/1/13 27/2/13 30/3/13 +f 5/1/14 29/2/14 32/3/14 +f 6/1/15 31/2/15 24/3/15 +f 7/1/16 33/2/16 38/3/16 +f 8/1/17 34/2/17 40/3/17 +f 9/1/18 35/2/18 41/3/18 +f 10/1/19 36/2/19 42/3/19 +f 11/1/20 37/2/20 39/3/20 +f 13/1/21 15/2/21 3/3/21 +f 13/1/22 14/2/22 15/3/22 +f 14/1/23 2/2/23 15/3/23 +f 16/1/24 17/2/24 6/3/24 +f 16/1/25 14/2/25 17/3/25 +f 14/1/26 1/2/26 17/3/26 +f 18/1/27 19/2/27 4/3/27 +f 18/1/28 13/2/28 19/3/28 +f 13/1/29 3/2/29 19/3/29 +f 20/1/30 21/2/30 5/3/30 +f 20/1/31 18/2/31 21/3/31 +f 18/1/32 4/2/32 21/3/32 +f 17/1/33 22/2/33 6/3/33 +f 17/1/34 20/2/34 22/3/34 +f 20/1/35 5/2/35 22/3/35 +f 23/1/36 24/2/36 11/3/36 +f 23/1/37 16/2/37 24/3/37 +f 16/1/38 6/2/38 24/3/38 +f 25/1/39 26/2/39 7/3/39 +f 25/1/40 15/2/40 26/3/40 +f 15/1/41 2/2/41 26/3/41 +f 27/1/42 28/2/42 8/3/42 +f 27/1/43 19/2/43 28/3/43 +f 19/1/44 3/2/44 28/3/44 +f 29/1/45 30/2/45 9/3/45 +f 29/1/46 21/2/46 30/3/46 +f 21/1/47 4/2/47 30/3/47 +f 31/1/48 32/2/48 10/3/48 +f 31/1/49 22/2/49 32/3/49 +f 22/1/50 5/2/50 32/3/50 +f 26/1/51 33/2/51 7/3/51 +f 26/1/52 23/2/52 33/3/52 +f 23/1/53 11/2/53 33/3/53 +f 28/1/54 34/2/54 8/3/54 +f 28/1/55 25/2/55 34/3/55 +f 25/1/56 7/2/56 34/3/56 +f 30/1/57 35/2/57 9/3/57 +f 30/1/58 27/2/58 35/3/58 +f 27/1/59 8/2/59 35/3/59 +f 32/1/60 36/2/60 10/3/60 +f 32/1/61 29/2/61 36/3/61 +f 29/1/62 9/2/62 36/3/62 +f 24/1/63 37/2/63 11/3/63 +f 24/1/64 31/2/64 37/3/64 +f 31/1/65 10/2/65 37/3/65 +f 38/1/66 39/2/66 12/3/66 +f 38/1/67 33/2/67 39/3/67 +f 33/1/68 11/2/68 39/3/68 +f 40/1/69 38/2/69 12/3/69 +f 40/1/70 34/2/70 38/3/70 +f 34/1/71 7/2/71 38/3/71 +f 41/1/72 40/2/72 12/3/72 +f 41/1/73 35/2/73 40/3/73 +f 35/1/74 8/2/74 40/3/74 +f 42/1/75 41/2/75 12/3/75 +f 42/1/76 36/2/76 41/3/76 +f 36/1/77 9/2/77 41/3/77 +f 39/1/78 42/2/78 12/3/78 +f 39/1/79 37/2/79 42/3/79 +f 37/1/80 10/2/80 42/3/80 diff --git a/Escape-the-Dawn/Models/texture.png b/Escape-the-Dawn/Models/texture.png new file mode 100644 index 0000000..8ff116c Binary files /dev/null and b/Escape-the-Dawn/Models/texture.png differ diff --git a/Escape-the-Dawn/OBJ.cpp b/Escape-the-Dawn/OBJ.cpp new file mode 100644 index 0000000..82b3901 --- /dev/null +++ b/Escape-the-Dawn/OBJ.cpp @@ -0,0 +1,227 @@ +#include "OBJ.h" + +bool OBJ::LoadFromFile(std::string filename) +{ + m_Path = boost::filesystem::path(filename); + + // http://paulbourke.net/dataformats/obj/ + std::ifstream file(m_Path.string()); + if (!file.is_open()) { + LOG_ERROR("Failed to open .obj \"%s\"", m_Path.string().c_str()); + return false; + } + + LOG_INFO("Parsing .obj \"%s\"", m_Path.string().c_str()); + + std::string line; + while (std::getline(file, line)) { + if (line.length() == 0) + continue; + + std::stringstream ss(line); + + std::string prefix; + ss >> prefix; + + // Ignore comments + if (prefix == "#") + continue; + + // Material files + if (prefix == "mtllib") { + std::string materialFilename; + ss >> materialFilename; + m_MaterialPath = m_Path.branch_path() / materialFilename; + ParseMaterial(); + continue; + } + + // Material statement + if (prefix == "usemtl") { + std::string material; + ss >> material; + m_CurrentMaterial = &Materials[material]; + continue; + } + + // Vertices + if (prefix == "v") { + float x, y, z; + ss >> x >> y >> z; + Vertices.push_back(std::make_tuple(x, y, z)); + continue; + } + + // Normals + if (prefix == "vn") { + float x, y, z; + ss >> x >> y >> z; + Normals.push_back(std::make_tuple(x, y, z)); + } + + // Texture coordinates + if (prefix == "vt") { + float u, v, w; + ss >> u >> v >> w; + TextureCoords.push_back(std::make_tuple(u, v, w)); + } + + // Face definitions + if (prefix == "f") { + Face face; + face.Material = m_CurrentMaterial; + + std::string faceDefString; + while (ss >> faceDefString) { + std::stringstream ss2(faceDefString); + FaceDefinition faceDef = { 0, 0, 0 }; + + ss2 >> faceDef.VertexIndex; + ss2.ignore(); // Ignore first delimiter + if (!ss2) + continue; + + if (ss2.peek() == '/') { + ss2.ignore(); + ss2 >> faceDef.NormalIndex; + } else { + ss2 >> faceDef.TextureCoordIndex; + ss2.ignore(); + ss2 >> faceDef.NormalIndex; + } + face.Definitions.push_back(faceDef); + } + Faces.push_back(face); + } + } + + return true; +} + +void OBJ::ParseMaterial() +{ + // http://paulbourke.net/dataformats/mtl/ + std::ifstream file(m_MaterialPath.string()); + if (!file.is_open()) { + LOG_ERROR("Failed to open .mtl \"%s\"", m_MaterialPath.string().c_str()); + return; + } + + LOG_INFO("Parsing .mtl \"%s\"", m_MaterialPath.string().c_str()); + + std::string currentMaterialName; + MaterialInfo* currentMaterial = nullptr; + + std::string line; + while (std::getline(file, line)) { + if (line.length() == 0) + continue; + + std::stringstream ss(line); + + std::string prefix; + ss >> prefix; + + // Create a new material definition + if (prefix == "newmtl") { + MaterialInfo mat = + { + "", + std::make_tuple(0.2f, 0.2f, 0.2f), + std::make_tuple(0.8f, 0.8f, 0.8f), + std::make_tuple(1.0f, 1.0f, 1.0f), + std::make_tuple(1.0f, 1.0f, 1.0f), + 1.0f, + 1.0f, + 0.0f, + 0, + }; + + ss >> currentMaterialName; + LOG_INFO("Parsing material %s", currentMaterialName.c_str()); + Materials[currentMaterialName] = mat; + currentMaterial = &Materials[currentMaterialName]; + continue; + } + + if (!currentMaterial) + continue; + + // Ambient color + if (prefix == "Ka") { + float r, g, b; + ss >> r >> g >> b; + currentMaterial->AmbientColor = std::make_tuple(r, g, b); + continue; + } + // Diffuse color + if (prefix == "Kd") { + float r, g, b; + ss >> r >> g >> b; + currentMaterial->DiffuseColor = std::make_tuple(r, g, b); + continue; + } + // Specular color + if (prefix == "Ks") { + float r, g, b; + ss >> r >> g >> b; + currentMaterial->SpecularColor = std::make_tuple(r, g, b); + continue; + } + // Transmission filter + if (prefix == "Tf") { + std::stringstream ss2; + ss2 << ss.str(); + + std::string command; + ss2 >> command; + if (command == "xyz") { + // TODO: "The "Ks xyz" statement specifies the specular reflectivity using CIEXYZ values." + } + else if (command == "spectral") { + // TODO: "The "Tf spectral" statement specifies the transmission filter using a spectral curve." + } else { + float r, g, b; + ss >> r; + // G and B are optional + if (!(ss >> g >> b)) + { + g = r; + b = r; + } + currentMaterial->TransmissionFilter = std::make_tuple(r, g, b); + } + continue; + } + // Optical density + if (prefix == "Ni") { + ss >> currentMaterial->OpticalDensity; + continue; + } + // Alpha + if (prefix == "d" || prefix == "Tr") { + ss >> currentMaterial->Alpha; + continue; + } + // Shininess + if (prefix == "Ns") { + ss >> currentMaterial->Shininess; + continue; + } + // Illumination model + if (prefix == "illum") { + int illum = 0; + ss >> illum; + currentMaterial->IlluminationModel = illum; + continue; + } + // Texture file + // TODO: + if (prefix == "map_Ka" || prefix == "map_Kd") { + std::string textureFile; + ss >> textureFile; + currentMaterial->TextureFile = (m_MaterialPath.branch_path() / textureFile).string(); + continue; + } + } +} diff --git a/Escape-the-Dawn/OBJ.h b/Escape-the-Dawn/OBJ.h new file mode 100644 index 0000000..9aeed54 --- /dev/null +++ b/Escape-the-Dawn/OBJ.h @@ -0,0 +1,66 @@ +#ifndef OBJ_h__ +#define OBJ_h__ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "logging.h" + +class OBJ +{ +public: + struct MaterialInfo + { + std::string TextureFile; + std::tuple AmbientColor; + std::tuple DiffuseColor; + std::tuple SpecularColor; + std::tuple TransmissionFilter; + float OpticalDensity; + float Alpha; + float Shininess; + int IlluminationModel; + }; + + struct FaceDefinition + { + int VertexIndex; + int TextureCoordIndex; + int NormalIndex; + }; + + struct Face + { + Face() : Material(nullptr) { } + std::vector Definitions; + MaterialInfo* Material; + }; + + OBJ() : m_CurrentMaterial(nullptr) { } + OBJ(std::string filename) : m_CurrentMaterial(nullptr) { LoadFromFile(filename); } + + std::vector> Vertices; + std::vector> Normals; + std::vector> TextureCoords; + std::vector Faces; + std::map Materials; + + bool LoadFromFile(std::string filename); + boost::filesystem::path Path() const { return m_Path; } + +private: + boost::filesystem::path m_Path; + boost::filesystem::path m_MaterialPath; + MaterialInfo* m_CurrentMaterial; + + void ParseMaterial(); +}; + +#endif // OBJ_h__ \ No newline at end of file diff --git a/Escape-the-Dawn/OpenAL32.dll b/Escape-the-Dawn/OpenAL32.dll new file mode 100644 index 0000000..9c8932e Binary files /dev/null and b/Escape-the-Dawn/OpenAL32.dll differ diff --git a/Escape-the-Dawn/OpenGL.h b/Escape-the-Dawn/OpenGL.h new file mode 100644 index 0000000..dec332d --- /dev/null +++ b/Escape-the-Dawn/OpenGL.h @@ -0,0 +1,5 @@ +#include +#define GLFW_INCLUDE_GLU +#include +#include +#define GLM_FORCE_RADIANS \ No newline at end of file diff --git a/Escape-the-Dawn/Renderer.cpp b/Escape-the-Dawn/Renderer.cpp index f567de0..87a7e79 100644 --- a/Escape-the-Dawn/Renderer.cpp +++ b/Escape-the-Dawn/Renderer.cpp @@ -2,6 +2,22 @@ Renderer::Renderer() { + m_VSync = false; +#ifdef DEBUG + m_DrawNormals = false; + m_DrawWireframe = false; + m_DrawBounds = true; +#else + m_DrawNormals = false; + m_DrawWireframe = false; + m_DrawBounds = false; +#endif + + m_ShadowMapRes = 2048*2; + m_SunPosition = glm::vec3(0, 0.3f, 10); + m_SunTarget = glm::vec3(0, 0, 0); + m_SunProjection = glm::ortho(-200, 200, -10, 100, -800, 800); + Lights = 0; } void Renderer::Initialize() @@ -13,7 +29,9 @@ void Renderer::Initialize() } // Create a window - m_Window = glfwCreateWindow(1280, 720, "OpenGL", nullptr, nullptr); + WIDTH = 1280; + HEIGHT = 720; + m_Window = glfwCreateWindow(WIDTH, HEIGHT, "OpenGL", nullptr, nullptr); if (!m_Window) { LOG_ERROR("GLFW: Failed to create window"); exit(EXIT_FAILURE); @@ -37,19 +55,267 @@ void Renderer::Initialize() LOG_ERROR("GLEW: Initialization failed"); exit(EXIT_FAILURE); } + + // Create Camera + m_Camera = std::make_shared(45.f, (float)WIDTH / HEIGHT, 0.01f, 1000.f); + m_Camera->Position(glm::vec3(0.0f, 0.0f, 2.f)); + + glfwSwapInterval(m_VSync); + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); glEnable(GL_DEPTH_TEST); LoadContent(); } -void Renderer::Draw(double _dt) +void Renderer::LoadContent() { + auto standardVS = std::shared_ptr(new VertexShader("Shaders/Vertex.glsl")); + auto standardFS = std::shared_ptr(new FragmentShader("Shaders/Fragment.glsl")); + + m_ShaderProgram.AddShader(standardVS); + m_ShaderProgram.AddShader(standardFS); + m_ShaderProgram.Compile(); + m_ShaderProgram.Link(); + + m_ShaderProgramNormals.AddShader(std::shared_ptr(new GeometryShader("Shaders/Normals.geo.glsl"))); + m_ShaderProgramNormals.AddShader(standardVS); + m_ShaderProgramNormals.AddShader(std::shared_ptr(new FragmentShader("Shaders/Normals.frag.glsl"))); + m_ShaderProgramNormals.Compile(); + m_ShaderProgramNormals.Link(); + + m_ShaderProgramShadows.AddShader(std::shared_ptr(new VertexShader("Shaders/ShadowMap.vert.glsl"))); + m_ShaderProgramShadows.AddShader(std::shared_ptr(new FragmentShader("Shaders/ShadowMap.frag.glsl"))); + m_ShaderProgramShadows.Compile(); + m_ShaderProgramShadows.Link(); + + m_ShaderProgramShadowsDrawDepth.AddShader(std::shared_ptr(new VertexShader("Shaders/VisualizeDepth.vert.glsl"))); + m_ShaderProgramShadowsDrawDepth.AddShader(std::shared_ptr(new FragmentShader("Shaders/VisualizeDepth.frag.glsl"))); + m_ShaderProgramShadowsDrawDepth.Compile(); + m_ShaderProgramShadowsDrawDepth.Link(); + + m_ShaderProgramDebugAABB.AddShader(standardVS); + m_ShaderProgramDebugAABB.AddShader(std::shared_ptr(new FragmentShader("Shaders/AABB.frag.glsl"))); + m_ShaderProgramDebugAABB.Compile(); + m_ShaderProgramDebugAABB.Link(); + + m_DebugAABB = CreateAABB(); + m_ScreenQuad = CreateQuad(); + CreateShadowMap(m_ShadowMapRes); +} + +void Renderer::CreateShadowMap(int resolution) +{ + glGenFramebuffers(1, &m_ShadowFrameBuffer); + glBindFramebuffer(GL_FRAMEBUFFER, m_ShadowFrameBuffer); + + // Depth texture + glGenTextures(1, &m_ShadowDepthTexture); + glBindTexture(GL_TEXTURE_2D, m_ShadowDepthTexture); + glTexImage2D(GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16, resolution, resolution, 0, GL_DEPTH_COMPONENT, GL_FLOAT, nullptr); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); + + //glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_NONE ); + //glTexParameteri( GL_TEXTURE_2D, GL_DEPTH_TEXTURE_MODE, GL_INTENSITY ); + + glFramebufferTexture(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, m_ShadowDepthTexture, 0); + glDrawBuffer(GL_NONE); + + if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { + LOG_ERROR("Framebuffer incomplete!"); + return; + } +} +void Renderer::Draw(double dt) +{ + glDisable(GL_BLEND); + + DrawShadowMap(); + DrawScene(); + +#ifdef DEBUG + // Draw bounding boxes + if (m_DrawBounds) { + glEnable(GL_BLEND); + glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO); + m_ShaderProgramDebugAABB.Bind(); + for (auto tuple : AABBsToRender) { + glm::mat4 modelMatrix; + bool colliding; + std::tie(modelMatrix, colliding) = tuple; + // Model matrix + glm::mat4 cameraMatrix = m_Camera->ProjectionMatrix() * m_Camera->ViewMatrix(); + glm::mat4 MVP = cameraMatrix * modelMatrix; + glUniformMatrix4fv(glGetUniformLocation(m_ShaderProgramDebugAABB.GetHandle(), "MVP"), 1, GL_FALSE, glm::value_ptr(MVP)); + // Color + glm::vec4 color(1.f, 1.f, 1.f, 0.f); + if (colliding) + color = glm::vec4(1.f, 0.f, 0.f, 0.f); + glUniform4fv(glGetUniformLocation(m_ShaderProgramDebugAABB.GetHandle(), "Color"), 1, glm::value_ptr(color)); + glBindVertexArray(m_DebugAABB); + glDrawArrays(GL_LINES, 0, 24); + } + } + + //DrawDebugShadowMap(); +#endif + + ClearStuff(); + glfwSwapBuffers(m_Window); +} + +void Renderer::DrawScene() +{ + glBindFramebuffer(GL_FRAMEBUFFER, 0); + glViewport(0, 0, WIDTH, HEIGHT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClearColor(1.0f, 1.0f, 0.0f, 1.0f); - //m_ShaderProgram->Bind(); + glEnable(GL_DEPTH_TEST); + glEnable(GL_CULL_FACE); + glCullFace(GL_BACK); +#ifdef DEBUG + glDisable(GL_CULL_FACE); + glPolygonMode(GL_BACK, GL_LINE); +#endif - glfwSwapBuffers(m_Window); + // Draw models + glm::mat4 depthViewMatrix = glm::lookAt(m_SunPosition, m_SunTarget, glm::vec3(0, 1, 0)) * glm::translate(-m_Camera->Position() * glm::vec3(1, 0, 0)); + glm::mat4 depthCamera = m_SunProjection * depthViewMatrix; + glm::mat4 biasMatrix( + 0.5, 0.0, 0.0, 0.0, + 0.0, 0.5, 0.0, 0.0, + 0.0, 0.0, 0.5, 0.0, + 0.5, 0.5, 0.5, 1.0 + ); + + m_ShaderProgram.Bind(); + glUniform1i(glGetUniformLocation(m_ShaderProgram.GetHandle(), "numberOfLights"), Lights); + glUniform3fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "position"), Lights, Light_position.data()); + glUniform3fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "specular"), Lights, Light_specular.data()); + glUniform3fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "diffuse"), Lights, Light_diffuse.data()); + glUniform1fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "constantAttenuation"), Lights, Light_constantAttenuation.data()); + glUniform1fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "linearAttenuation"), Lights, Light_linearAttenuation.data()); + glUniform1fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "quadraticAttenuation"), Lights, Light_quadraticAttenuation.data()); + glUniform1fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "spotExponent"), Lights, Light_spotExponent.data()); + if (m_DrawWireframe) { + glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); + } + glActiveTexture(GL_TEXTURE1); + glBindTexture(GL_TEXTURE_2D, m_ShadowDepthTexture); + //DrawModels(m_ShaderProgram); + glm::mat4 cameraMatrix = m_Camera->ProjectionMatrix() * m_Camera->ViewMatrix(); + glm::mat4 depthCameraMatrix = biasMatrix * depthCamera; + glm::mat4 MVP; + glm::mat4 depthMVP; + for (auto tuple : ModelsToRender) + { + Model* model; + glm::mat4 modelMatrix; + std::tie(model, modelMatrix) = tuple; + MVP = cameraMatrix * modelMatrix; + depthMVP = depthCameraMatrix * modelMatrix; + glUniformMatrix4fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "MVP"), 1, GL_FALSE, glm::value_ptr(MVP)); + glUniformMatrix4fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "DepthMVP"), 1, GL_FALSE, glm::value_ptr(depthMVP)); + glUniformMatrix4fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "model"), 1, GL_FALSE, glm::value_ptr(modelMatrix)); + glUniformMatrix4fv(glGetUniformLocation(m_ShaderProgram.GetHandle(), "view"), 1, GL_FALSE, glm::value_ptr(m_Camera->ViewMatrix())); + glBindVertexArray(model->VAO); + for (auto texGroup : model->TextureGroups) { + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, texGroup.Texture->texture); + glDrawArrays(GL_TRIANGLES, texGroup.StartIndex, texGroup.EndIndex - texGroup.StartIndex + 1); + } + } + +#ifdef DEBUG + // Debug draw model normals + if (m_DrawNormals) { + m_ShaderProgramNormals.Bind(); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + DrawModels(m_ShaderProgramNormals); + } +#endif +} + +void Renderer::DrawShadowMap() +{ + glEnable(GL_DEPTH_TEST); + glEnable(GL_CULL_FACE); + glCullFace(GL_FRONT); + + glBindFramebuffer(GL_FRAMEBUFFER, m_ShadowFrameBuffer); + glViewport(0, 0, m_ShadowMapRes, m_ShadowMapRes); + + glClear(GL_DEPTH_BUFFER_BIT); + //glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + + glm::mat4 depthViewMatrix = glm::lookAt(m_SunPosition, m_SunTarget, glm::vec3(0, 1, 0)) * glm::translate(-m_Camera->Position() * glm::vec3(1, 0, 0)); +// glm::mat4 depthViewMatrix = glm::lookAt(m_SunPosition, m_SunTarget, glm::vec3(0, 1, 0)); + glm::mat4 depthCamera = m_SunProjection * depthViewMatrix; + + //glm::mat4 cameraMatrix = depthProjectionMatrix * m_Camera->ViewMatrix(); + + glm::mat4 MVP; + + m_ShaderProgramShadows.Bind(); + glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); + for (auto tuple : ModelsToRender) + { + Model* model; + glm::mat4 modelMatrix; + std::tie(model, modelMatrix) = tuple; + + MVP = depthCamera * modelMatrix; + glUniformMatrix4fv(glGetUniformLocation(m_ShaderProgramShadows.GetHandle(), "MVP"), 1, GL_FALSE, glm::value_ptr(MVP)); + + glBindVertexArray(model->VAO); + for (auto texGroup : model->TextureGroups) { + glDrawArrays(GL_TRIANGLES, texGroup.StartIndex, texGroup.EndIndex - texGroup.StartIndex + 1); + } + } +} + +void Renderer::DrawDebugShadowMap() +{ + glBindFramebuffer(GL_FRAMEBUFFER, 0); + glViewport(0, 0, 200*(16.f/9.f), 200); + + glClear(GL_DEPTH_BUFFER_BIT); + //glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + + m_ShaderProgramShadowsDrawDepth.Bind(); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, m_ShadowDepthTexture); + glBindVertexArray(m_ScreenQuad); + glDrawArrays(GL_TRIANGLES, 0, 6); +} + +void Renderer::DrawModels(ShaderProgram &shader) +{ + glm::mat4 cameraMatrix = m_Camera->ProjectionMatrix() * m_Camera->ViewMatrix(); + + glm::mat4 MVP; + for (auto tuple : ModelsToRender) + { + Model* model; + glm::mat4 modelMatrix; + std::tie(model, modelMatrix) = tuple; + + MVP = cameraMatrix * modelMatrix; + glUniformMatrix4fv(glGetUniformLocation(shader.GetHandle(), "MVP"), 1, GL_FALSE, glm::value_ptr(MVP)); + glUniformMatrix4fv(glGetUniformLocation(shader.GetHandle(), "model"), 1, GL_FALSE, glm::value_ptr(modelMatrix)); + glUniformMatrix4fv(glGetUniformLocation(shader.GetHandle(), "view"), 1, GL_FALSE, glm::value_ptr(m_Camera->ViewMatrix())); + glBindVertexArray(model->VAO); + for (auto texGroup : model->TextureGroups) { + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, texGroup.Texture->texture); + glDrawArrays(GL_TRIANGLES, texGroup.StartIndex, texGroup.EndIndex - texGroup.StartIndex + 1); + } + } } void Renderer::DrawText() @@ -62,17 +328,148 @@ void Renderer::AddTextToDraw() //Add to draw shit vector } -void Renderer::AddModelToDraw(Model* _model) +void Renderer::AddModelToDraw(std::shared_ptr model, glm::vec3 position, glm::quat orientation, glm::vec3 scale) { - ModelsToRender.push_back(_model); + glm::mat4 modelMatrix = glm::translate(glm::mat4(), position) * glm::toMat4(orientation) * glm::scale(scale); + // You can now use ModelMatrix to build the MVP matrix + ModelsToRender.push_back(std::make_tuple(model.get(), modelMatrix)); } -//Fixa med shaders, lägga in alla verts osv. - -void Renderer::LoadContent() +void Renderer::AddPointLightToDraw( + glm::vec3 _position, + glm::vec3 _specular, + glm::vec3 _diffuse, + float _constantAttenuation, + float _linearAttenuation, + float _quadraticAttenuation, + float _spotExponent + ) { - m_ShaderProgram.AddShader(std::unique_ptr(new VertexShader("Shaders/Vertex.glsl"))); - m_ShaderProgram.AddShader(std::unique_ptr(new FragmentShader("Shaders/Fragment.glsl"))); - m_ShaderProgram.Compile(); - m_ShaderProgram.Link(); + Light_position.push_back(_position.x); + Light_position.push_back(_position.y); + Light_position.push_back(_position.z); + Light_specular.push_back(_specular.x); + Light_specular.push_back(_specular.y); + Light_specular.push_back(_specular.z); + Light_diffuse.push_back(_diffuse.x); + Light_diffuse.push_back(_diffuse.y); + Light_diffuse.push_back(_diffuse.z); + Light_constantAttenuation.push_back(_constantAttenuation); + Light_linearAttenuation.push_back(_linearAttenuation); + Light_quadraticAttenuation.push_back(_quadraticAttenuation); + Light_spotExponent.push_back(_spotExponent); + Lights = Light_constantAttenuation.size(); } + +void Renderer::AddAABBToDraw(glm::vec3 origin, glm::vec3 volumeVector, bool colliding) +{ + glm::mat4 model; + model *= glm::translate(origin); + model *= glm::scale(volumeVector); + AABBsToRender.push_back(std::make_tuple(model, colliding)); +} + +GLuint Renderer::CreateQuad() +{ + float quadVertices[] = { + -1.0f, -1.0f, 0.0f, + 1.0f, 1.0f, 0.0f, + -1.0f, 1.0f, 0.0f, + + -1.0f, -1.0f, 0.0f, + 1.0f, -1.0f, 0.0f, + 1.0f, 1.0f, 0.0f, + }; + float quadTexCoords[] = { + 0.0f, 0.0f, + 1.0f, 1.0f, + 0.0f, 1.0f, + + 0.0f, 0.0f, + 1.0f, 0.0f, + 1.0f, 1.0f, + }; + GLuint vbo[2], vao; + glGenBuffers(2, vbo); + glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); + glBufferData(GL_ARRAY_BUFFER, 3 * 6 * sizeof(float), quadVertices, GL_STATIC_DRAW); + glBindBuffer(GL_ARRAY_BUFFER, vbo[1]); + glBufferData(GL_ARRAY_BUFFER, 2 * 6 * sizeof(float), quadTexCoords, GL_STATIC_DRAW); + glGenVertexArrays(1, &vao); + glBindVertexArray(vao); + glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); + glBindBuffer(GL_ARRAY_BUFFER, vbo[1]); + glVertexAttribPointer(2, 2, GL_FLOAT, GL_FALSE, 0, 0); + glEnableVertexAttribArray(0); + glEnableVertexAttribArray(2); + + glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); + + return vao; +} + +GLuint Renderer::CreateAABB() +{ + float vertices[] = { + // Bottom + -1.0f, -1.0f, 1.0f, // 0 + 1.0f, -1.0f, 1.0f, // 1 + 1.0f, -1.0f, 1.0f, // 1 + 1.0f, -1.0f, -1.0f, // 2 + 1.0f, -1.0f, -1.0f, // 2 + -1.0f, -1.0f, -1.0f, // 3 + -1.0f, -1.0f, -1.0f, // 3 + -1.0f, -1.0f, 1.0f, // 0 + + // Top + -1.0f, 1.0f, 1.0f, // 4 + 1.0f, 1.0f, 1.0f, // 5 + 1.0f, 1.0f, 1.0f, // 5 + 1.0f, 1.0f, -1.0f, // 6 + 1.0f, 1.0f, -1.0f, // 6 + -1.0f, 1.0f, -1.0f, // 7 + -1.0f, 1.0f, -1.0f, // 7 + -1.0f, 1.0f, 1.0f, // 4 + + // Connectors + -1.0f, -1.0f, 1.0f, // 0 + -1.0f, 1.0f, 1.0f, // 4 + 1.0f, -1.0f, 1.0f, // 1 + 1.0f, 1.0f, 1.0f, // 5 + 1.0f, -1.0f, -1.0f, // 2 + 1.0f, 1.0f, -1.0f, // 6 + -1.0f, -1.0f, -1.0f, // 3 + -1.0f, 1.0f, -1.0f, // 7 + }; + + GLuint vbo, vao; + glGenBuffers(1, &vbo); + glBindBuffer(GL_ARRAY_BUFFER, vbo); + glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); + + glGenVertexArrays(1, &vao); + glBindVertexArray(vao); + glBindBuffer(GL_ARRAY_BUFFER, vbo); + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); + glEnableVertexAttribArray(0); + + glBindVertexArray(0); + glBindBuffer(GL_ARRAY_BUFFER, 0); + + return vao; +} + +void Renderer::ClearStuff() +{ + AABBsToRender.clear(); + ModelsToRender.clear(); + Light_position.clear(); + Light_specular.clear(); + Light_diffuse.clear(); + Light_constantAttenuation.clear(); + Light_linearAttenuation.clear(); + Light_quadraticAttenuation.clear(); + Light_spotExponent.clear(); +} \ No newline at end of file diff --git a/Escape-the-Dawn/Renderer.h b/Escape-the-Dawn/Renderer.h index c8e4fd0..2c4c492 100644 --- a/Escape-the-Dawn/Renderer.h +++ b/Escape-the-Dawn/Renderer.h @@ -7,27 +7,39 @@ #include #include -#define _CRT_SECURE_NO_WARNINGS -#include -#define GLFW_INCLUDE_GLU -#include -#include -#define GLM_FORCE_RADIANS +#include "OpenGL.h" #include #include #include #include +#include +#include #include "glerror.h" +#include "Camera.h" #include "ShaderProgram.h" #include "Model.h" +#include "Components/PointLight.h" class Renderer { public: - ShaderProgram m_ShaderProgram; + + glm::mat4 viewMatrix; + glm::mat4 projectionMatrix; - std::vector ModelsToRender; + int HEIGHT, WIDTH; + + std::list> ModelsToRender; + int Lights; + std::vector Light_position; + std::vector Light_specular; + std::vector Light_diffuse; + std::vector Light_constantAttenuation; + std::vector Light_linearAttenuation; + std::vector Light_quadraticAttenuation; + std::vector Light_spotExponent; + std::list> AABBsToRender; Renderer(); @@ -35,17 +47,67 @@ public: void Draw(double dt); void DrawText(); - void AddModelToDraw(Model*); + void AddModelToDraw(std::shared_ptr model, glm::vec3 position, glm::quat orientation, glm::vec3 scale); void AddTextToDraw(); + void AddPointLightToDraw( + glm::vec3 _position, + glm::vec3 _specular, + glm::vec3 _diffuse, + float _constantAttenuation, + float _linearAttenuation, + float _quadraticAttenuation, + float _spotExponent + ); + void AddAABBToDraw(glm::vec3 origin, glm::vec3 volumeVector, bool colliding); void LoadContent(); GLFWwindow* GetWindow() const { return m_Window; } + std::shared_ptr GetCamera() const { return m_Camera; } + + bool DrawNormals() const { return m_DrawNormals; } + void DrawNormals(bool val) { m_DrawNormals = val; } + bool DrawWireframe() const { return m_DrawWireframe; } + void DrawWireframe(bool val) { m_DrawWireframe = val; } + bool DrawBounds() const { return m_DrawBounds; } + void DrawBounds(bool val) { m_DrawBounds = val; } private: GLFWwindow* m_Window; GLint m_glVersion[2]; GLchar* m_glVendor; + bool m_VSync; + bool m_DrawNormals; + bool m_DrawWireframe; + bool m_DrawBounds; + + int m_ShadowMapRes; + glm::vec3 m_SunPosition; + glm::vec3 m_SunTarget; + glm::mat4 m_SunProjection; + + GLuint m_DebugAABB; + GLuint m_ScreenQuad; + GLuint m_ShadowFrameBuffer; + GLuint m_ShadowDepthTexture; + + std::shared_ptr m_Camera; + + ShaderProgram m_ShaderProgram; + ShaderProgram m_ShaderProgramNormals; + ShaderProgram m_ShaderProgramShadows; + ShaderProgram m_ShaderProgramShadowsDrawDepth; + ShaderProgram m_ShaderProgramDebugAABB; + + void ClearStuff(); + void DrawScene(); + void DrawModels(ShaderProgram &shader); + void DrawShadowMap(); + void CreateShadowMap(int resolution); + GLuint CreateQuad(); + void DrawDebugShadowMap(); + GLuint CreateAABB(); + }; #endif // Renderer_h__ \ No newline at end of file diff --git a/Escape-the-Dawn/ShaderProgram.cpp b/Escape-the-Dawn/ShaderProgram.cpp index 7c5d133..51e8075 100644 --- a/Escape-the-Dawn/ShaderProgram.cpp +++ b/Escape-the-Dawn/ShaderProgram.cpp @@ -84,20 +84,16 @@ bool Shader::IsCompiled() const return m_ShaderHandle != 0; } -ShaderProgram::ShaderProgram() -{ - Initialize(); -} - ShaderProgram::~ShaderProgram() { - Unbind(); - glDeleteProgram(m_ShaderProgramHandle); + if (m_ShaderProgramHandle != 0) { + glDeleteProgram(m_ShaderProgramHandle); + } } -void ShaderProgram::AddShader(std::unique_ptr shader) +void ShaderProgram::AddShader(std::shared_ptr shader) { - m_Shaders.push_back(std::move(shader)); + m_Shaders.push_back(shader); } void ShaderProgram::Compile() @@ -111,6 +107,11 @@ void ShaderProgram::Compile() GLuint ShaderProgram::Link() { + if (m_Shaders.size() == 0) { + LOG_ERROR("Failed to link shader program: No shaders bound"); + return 0; + } + LOG_INFO("Linking shader program"); m_ShaderProgramHandle = glCreateProgram(); for (auto &shader : m_Shaders) { @@ -119,15 +120,16 @@ GLuint ShaderProgram::Link() glLinkProgram(m_ShaderProgramHandle); if (GLERROR("glLinkProgram")) return 0; - - for (auto &shader : m_Shaders) { - shader.release(); - } m_Shaders.clear(); return m_ShaderProgramHandle; } +GLuint ShaderProgram::GetHandle() +{ + return m_ShaderProgramHandle; +} + void ShaderProgram::Bind() { if (m_ShaderProgramHandle == 0) @@ -139,9 +141,4 @@ void ShaderProgram::Bind() void ShaderProgram::Unbind() { glActiveShaderProgram(0, 0); -} - -void ShaderProgram::Initialize() -{ - m_ShaderProgramHandle = 0; -} +} \ No newline at end of file diff --git a/Escape-the-Dawn/ShaderProgram.h b/Escape-the-Dawn/ShaderProgram.h index 3f2dfb1..341bb64 100644 --- a/Escape-the-Dawn/ShaderProgram.h +++ b/Escape-the-Dawn/ShaderProgram.h @@ -6,11 +6,7 @@ #include #include -#define _CRT_SECURE_NO_WARNINGS -#include -#define GLFW_INCLUDE_GLU -#include -#include +#include "OpenGL.h" #include "glerror.h" @@ -68,23 +64,20 @@ public: class ShaderProgram { public: - ShaderProgram(); + ShaderProgram() + : m_ShaderProgramHandle(0) { } ~ShaderProgram(); - void AddShader(std::unique_ptr shader); - + void AddShader(std::shared_ptr shader); void Compile(); GLuint Link(); - + GLuint GetHandle(); void Bind(); - void Unbind(); private: GLuint m_ShaderProgramHandle; - std::vector> m_Shaders; - - void Initialize(); + std::vector> m_Shaders; }; #endif // ShaderProgram_h__ \ No newline at end of file diff --git a/Escape-the-Dawn/Shaders/AABB.frag.glsl b/Escape-the-Dawn/Shaders/AABB.frag.glsl new file mode 100644 index 0000000..16bbb30 --- /dev/null +++ b/Escape-the-Dawn/Shaders/AABB.frag.glsl @@ -0,0 +1,17 @@ +#version 430 + +uniform vec4 Color; + +in VertexData { + vec3 Position; + vec3 Normal; + vec2 TextureCoord; + vec3 ShadowCoord; +} Input; + +out vec4 FragmentColor; + +void main() { + //FragmentColor = vec4(1.0 - gl_Color.r, 1.0 - gl_Color.g, 1.0 - gl_Color.b, 0.0); + FragmentColor = Color; +} \ No newline at end of file diff --git a/Escape-the-Dawn/Shaders/Fragment.glsl b/Escape-the-Dawn/Shaders/Fragment.glsl index d74889f..a16878d 100644 --- a/Escape-the-Dawn/Shaders/Fragment.glsl +++ b/Escape-the-Dawn/Shaders/Fragment.glsl @@ -1,18 +1,109 @@ -#version 440 +#version 430 -uniform mat4 MVP; -uniform sampler2D texture0; +uniform mat4 model; +uniform mat4 view; + +layout(binding=0) uniform sampler2D texture0; +layout(binding=1) uniform sampler2D shadowMap; + +const int maxNumberOfLights = 82; +uniform int numberOfLights; +uniform vec3 position[maxNumberOfLights]; +uniform vec3 specular[maxNumberOfLights]; +uniform vec3 diffuse[maxNumberOfLights]; +uniform float constantAttenuation[maxNumberOfLights]; +uniform float linearAttenuation[maxNumberOfLights]; +uniform float quadraticAttenuation[maxNumberOfLights]; +uniform float spotExponent[maxNumberOfLights]; in VertexData { vec3 Position; vec3 Normal; vec2 TextureCoord; + vec3 ShadowCoord; } Input; -out vec4 FragmentColor; +vec3 scene_ambient = vec3(0.3); + +out vec4 fragmentColor; -void main() -{ +void main() { + + // Texture vec4 texel = texture2D(texture0, Input.TextureCoord); - FragmentColor = texel; + //vec4 texel = (blend.x * texel0) + (blend.y * texel1) + (blend.z * texel2); + + // + // Phong shading + // + + // Ambient light + vec3 La = scene_ambient; // Ambient light + vec3 Ks = vec3(0.3, 0.3, 0.3); // Specular reflectance + vec3 Kd = vec3(1.0, 1.0, 1.0); // Diffuse reflectance + vec3 Ka = vec3(1.0, 1.0, 1.0); // Ambient reflectance + vec3 Is; + vec3 Id; + + // Shadows + //float cosTheta = clamp(dot(Input.Normal, vec3(0, 1, 0)), 0.0, 1.0); + //float bias = 0.001 * tan(acos(cosTheta)); // cosTheta is dot( n,l ), clamped between 0 and 1 + //bias = clamp(bias, 0.0, 0.01); + float visibility = 1.0; + if (Input.ShadowCoord.x >= 0.0 && Input.ShadowCoord.x <= 1.0 && Input.ShadowCoord.y >= 0.0 && Input.ShadowCoord.y <= 1.0) { + float bias = 0.0005; + vec4 shadowMapValue = texture(shadowMap, Input.ShadowCoord.xy); + if (shadowMapValue.z < clamp(Input.ShadowCoord.z - bias, 0, 1)) { + visibility = 0.5; + } + } + + vec3 totalLighting = La * Ka * visibility; + + float attenuation; + + for(int i = 0; i < numberOfLights && i < maxNumberOfLights; i++) + { + // Light + //vec3 lightPosition = vec3(0, 0, 2); + vec3 Ls = specular[i]; // Specular light + vec3 Ld = diffuse[i]; // Diffuse light + + vec3 lightPosView = vec3(view * vec4(position[i], 1.0)); + vec3 surfacePosition = vec3(model * vec4(Input.Position, 1.0)); + vec3 surfacePosView = vec3(view * vec4(surfacePosition, 1.0)); + vec3 surfaceToLight = normalize(lightPosView - surfacePosView); + mat3 normalMatrix = transpose(inverse(mat3(view * model))); + vec3 surfaceNormal = normalize(normalMatrix * Input.Normal); + + float dist = length(position[i] - surfacePosition); + + attenuation = 1.0 / (constantAttenuation[i] + + linearAttenuation[i] * dist + + quadraticAttenuation[i] * pow(dist, 2.0)); + //attenuation = attenuation * pow(clampedCosine, spotExponent[i]); + + // Diffuse light + float dotProd = dot(surfaceToLight, surfaceNormal); + dotProd = max(dotProd, 0.0); + + Id = Ld * Kd * abs(dotProd) * attenuation; + + // Specular light + vec3 reflection = reflect(-surfaceToLight, surfaceNormal); + float dotSpecular = dot(reflection, normalize(-surfacePosView)); + dotSpecular = max(dotSpecular, 0.0); + float specularFactor = pow(dotSpecular, 30.0); // Specular factor + + Is = attenuation * Ls * Ks * specularFactor; + + totalLighting = totalLighting + Id + Is; + } + + fragmentColor = vec4(totalLighting, 1.0) * texel; + + + //fragmentColor = vec4(Id, 1.0) * texel; + + //fragmentColor = texel; } \ No newline at end of file diff --git a/Escape-the-Dawn/Shaders/Normals.frag.glsl b/Escape-the-Dawn/Shaders/Normals.frag.glsl new file mode 100644 index 0000000..fd1bb9a --- /dev/null +++ b/Escape-the-Dawn/Shaders/Normals.frag.glsl @@ -0,0 +1,9 @@ +#version 430 + +uniform mat4 MVP; + +out vec4 FragmentColor; + +void main() { + FragmentColor = vec4(1.0, 1.0, 1.0, 1.0); +} \ No newline at end of file diff --git a/Escape-the-Dawn/Shaders/Normals.geo.glsl b/Escape-the-Dawn/Shaders/Normals.geo.glsl new file mode 100644 index 0000000..0f72a8e --- /dev/null +++ b/Escape-the-Dawn/Shaders/Normals.geo.glsl @@ -0,0 +1,34 @@ +#version 430 + +uniform mat4 MVP; + +layout(triangles) in; +layout(line_strip, max_vertices = 6) out; + +in VertexData { + vec3 Position; + vec3 Normal; + vec2 TextureCoord; +} Input[3]; + +out VertexData { + vec3 Position; + vec3 Normal; + vec2 TextureCoord; +} Output; + +void main() +{ + for (int i = 0; i < gl_in.length(); i++) + { + gl_Position = MVP * vec4(Input[i].Position, 1.0); + EmitVertex(); + gl_Position = MVP * vec4(Input[i].Position + Input[i].Normal, 1.0); + EmitVertex(); + EndPrimitive(); + + Output.Position = Input[i].Position; + Output.Normal = Input[i].Normal; + Output.TextureCoord = Input[i].TextureCoord; + } +} \ No newline at end of file diff --git a/Escape-the-Dawn/Shaders/ShadowMap.frag.glsl b/Escape-the-Dawn/Shaders/ShadowMap.frag.glsl new file mode 100644 index 0000000..adae8d5 --- /dev/null +++ b/Escape-the-Dawn/Shaders/ShadowMap.frag.glsl @@ -0,0 +1,9 @@ +#version 430 + +uniform mat4 MVP; + +layout(location = 0) out float FragmentDepth; + +void main() { + FragmentDepth = gl_FragCoord.z; +} \ No newline at end of file diff --git a/Escape-the-Dawn/Shaders/ShadowMap.vert.glsl b/Escape-the-Dawn/Shaders/ShadowMap.vert.glsl new file mode 100644 index 0000000..042411c --- /dev/null +++ b/Escape-the-Dawn/Shaders/ShadowMap.vert.glsl @@ -0,0 +1,22 @@ +#version 430 + +uniform mat4 MVP; + +layout(location = 0) in vec3 Position; +layout(location = 1) in vec3 Normal; +layout(location = 2) in vec2 TextureCoord; + +out VertexData { + vec3 Position; + vec3 Normal; + vec2 TextureCoord; +} Output; + +void main() +{ + gl_Position = MVP * vec4(Position, 1.0); + + Output.Position = Position; + Output.Normal = Normal; + Output.TextureCoord = TextureCoord; +} \ No newline at end of file diff --git a/Escape-the-Dawn/Shaders/Vertex.glsl b/Escape-the-Dawn/Shaders/Vertex.glsl index 92b8723..2b5b0e5 100644 --- a/Escape-the-Dawn/Shaders/Vertex.glsl +++ b/Escape-the-Dawn/Shaders/Vertex.glsl @@ -1,6 +1,7 @@ -#version 440 +#version 430 uniform mat4 MVP; +uniform mat4 DepthMVP; layout(location = 0) in vec3 Position; layout(location = 1) in vec3 Normal; @@ -10,6 +11,7 @@ out VertexData { vec3 Position; vec3 Normal; vec2 TextureCoord; + vec3 ShadowCoord; } Output; void main() @@ -19,4 +21,5 @@ void main() Output.Position = Position; Output.Normal = Normal; Output.TextureCoord = TextureCoord; + Output.ShadowCoord = vec3(DepthMVP * vec4(Position, 1.0)); } \ No newline at end of file diff --git a/Escape-the-Dawn/Shaders/VisualizeDepth.frag.glsl b/Escape-the-Dawn/Shaders/VisualizeDepth.frag.glsl new file mode 100644 index 0000000..42e55f3 --- /dev/null +++ b/Escape-the-Dawn/Shaders/VisualizeDepth.frag.glsl @@ -0,0 +1,24 @@ +#version 430 + +layout(binding = 0) uniform sampler2D DepthTexture; + +in VertexData { + vec3 Position; + vec2 TextureCoord; +} Input; + +out vec4 FragmentColor; + +float LinearizeDepth(float z) +{ + float n = 0.1; // camera z near + float f = 800.0; // camera z far + return (2.0 * n) / (f + n - z * (f - n)); +} + +void main() { + float z = texture(DepthTexture, Input.TextureCoord).x; + vec4 color = vec4(z, z, z, 0); + + FragmentColor = color; +} \ No newline at end of file diff --git a/Escape-the-Dawn/Shaders/VisualizeDepth.vert.glsl b/Escape-the-Dawn/Shaders/VisualizeDepth.vert.glsl new file mode 100644 index 0000000..32e6205 --- /dev/null +++ b/Escape-the-Dawn/Shaders/VisualizeDepth.vert.glsl @@ -0,0 +1,17 @@ +#version 430 + +layout(location = 0) in vec3 Position; +layout(location = 2) in vec2 TextureCoord; + +out VertexData { + vec3 Position; + vec2 TextureCoord; +} Output; + +void main() +{ + gl_Position = vec4(Position, 1.0); + + Output.Position = Position; + Output.TextureCoord = TextureCoord; +} \ No newline at end of file diff --git a/Escape-the-Dawn/Sounds/hallelujah.wav b/Escape-the-Dawn/Sounds/hallelujah.wav new file mode 100644 index 0000000..9fc1cb4 Binary files /dev/null and b/Escape-the-Dawn/Sounds/hallelujah.wav differ diff --git a/Escape-the-Dawn/Sounds/hum.wav b/Escape-the-Dawn/Sounds/hum.wav new file mode 100644 index 0000000..30601bf Binary files /dev/null and b/Escape-the-Dawn/Sounds/hum.wav differ diff --git a/Escape-the-Dawn/Sounds/siren.wav b/Escape-the-Dawn/Sounds/siren.wav new file mode 100644 index 0000000..54a0238 Binary files /dev/null and b/Escape-the-Dawn/Sounds/siren.wav differ diff --git a/Escape-the-Dawn/System.h b/Escape-the-Dawn/System.h index f295857..f62eda9 100644 --- a/Escape-the-Dawn/System.h +++ b/Escape-the-Dawn/System.h @@ -19,7 +19,9 @@ public: virtual void UpdateEntity(double dt, EntityID entity, EntityID parent) { } // Called when a component is created - virtual void OnComponentCreated(std::string type, std:: shared_ptr component) { } + virtual void OnComponentCreated(std::string type, std::shared_ptr component) { } + // Called when a component is removed + virtual void OnComponentRemoved(std::string type, Component* component) { } protected: World* m_World; diff --git a/Escape-the-Dawn/Systems/CollisionSystem.cpp b/Escape-the-Dawn/Systems/CollisionSystem.cpp index f9c5a8a..ab91656 100644 --- a/Escape-the-Dawn/Systems/CollisionSystem.cpp +++ b/Escape-the-Dawn/Systems/CollisionSystem.cpp @@ -3,7 +3,7 @@ void Systems::CollisionSystem::UpdateEntity(double dt, EntityID entity, EntityID parent) { - if (parent != 0) + /*if (parent != 0) { auto transform = m_World->GetComponent(entity, "Transform"); auto parentTransform = m_World->GetComponent(parent, "Transform"); @@ -11,6 +11,120 @@ void Systems::CollisionSystem::UpdateEntity(double dt, EntityID entity, EntityID transform->Position[0] += parentTransform->Position[0]; transform->Position[1] += parentTransform->Position[1]; transform->Position[2] += parentTransform->Position[2]; + }*/ + + auto collisionComponent = m_World->GetComponent(entity, "Collision"); + if (!collisionComponent) + return; + + // Clear old collisions + collisionComponent->CollidingEntities.clear(); + + // Quit out if we're not interested in collision events + if (!collisionComponent->Interested) + return; + + auto entities = m_World->GetEntities(); + + for (auto pair : *entities) { + EntityID entity2 = pair.first; + EntityID parent2 = pair.second; + + // Check if entity2 is a child of entity + /*auto currentParent = parent; + bool childOfEntity2 = false; + while (currentParent != 0) { + if (currentParent == entity2) { + childOfEntity2 = true; + break; + } + currentParent = entities[currentParent]; + } + if (childOfEntity2) + continue;*/ + + // Check if we're the parent to entity2 + + //pair.first, pair.second; + if(entity == entity2) + continue; + + Intersects(entity, entity2); } - LOG_INFO("Updating entity %i with parent %i", entity, parent); } + +void Systems::CollisionSystem::Intersects(EntityID aEntity, EntityID bEntity) +{ + auto aTransform = m_World->GetComponent(aEntity, "Transform"); + if(aTransform == nullptr) + return; + auto bTransform = m_World->GetComponent(bEntity, "Transform"); + if(bTransform == nullptr) + return; + + auto aCollisionComponent = m_World->GetComponent(aEntity, "Collision"); + if(aCollisionComponent == nullptr) + return; + auto bCollisionComponent = m_World->GetComponent(bEntity, "Collision"); + if(bCollisionComponent == nullptr) + return; + + + auto aBounds = m_World->GetComponent(aEntity, "Bounds"); + + auto bBounds = m_World->GetComponent(bEntity, "Bounds"); + + glm::vec3 aPos = aTransform->Position + (aBounds->Origin * aTransform->Scale); + glm::vec3 bPos = bTransform->Position + (bBounds->Origin * bTransform->Scale); + + glm::vec3 aMax = aPos + aBounds->VolumeVector * aTransform->Scale; + glm::vec3 aMin = aPos - aBounds->VolumeVector * aTransform->Scale; + glm::vec3 bMax = bPos + bBounds->VolumeVector * bTransform->Scale; + glm::vec3 bMin = bPos - bBounds->VolumeVector * bTransform->Scale; + + if (aMin.x <= bMax.x && bMin.x <= aMax.x) { + if (aMin.y <= bMax.y && bMin.y <= aMax.y) { + if (aMin.z <= bMax.z && bMin.z <= aMax.z) { + aCollisionComponent->CollidingEntities.push_back(aEntity); + bCollisionComponent->CollidingEntities.push_back(bEntity); + return; + } + } + } +} + +void Systems::CollisionSystem::CreateBoundingBox(std::shared_ptr bounds) +{ + float width = abs(bounds->VolumeVector.x); + float height = abs(bounds->VolumeVector.y); + float depth = abs(bounds->VolumeVector.z); + + GLfloat vertices[] = { + bounds->Origin.x - width, bounds->Origin.y - height, bounds->Origin.z - depth, 1.0, + bounds->Origin.x + width, bounds->Origin.y - height, bounds->Origin.z - depth, 1.0, + bounds->Origin.x + width, bounds->Origin.y + height, bounds->Origin.z - depth, 1.0, + bounds->Origin.x - width, bounds->Origin.y + height, bounds->Origin.z - depth, 1.0, + bounds->Origin.x - width, bounds->Origin.y - height, bounds->Origin.z + depth, 1.0, + bounds->Origin.x + width, bounds->Origin.y - height, bounds->Origin.z + depth, 1.0, + bounds->Origin.x + width, bounds->Origin.y + height, bounds->Origin.z + depth, 1.0, + bounds->Origin.x - width, bounds->Origin.y + height, bounds->Origin.z + depth, 1.0, + }; + + GLuint vbo_vertices; + glGenBuffers(1, &vbo_vertices); + glBindBuffer(GL_ARRAY_BUFFER, vbo_vertices); + glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); + glBindBuffer(GL_ARRAY_BUFFER, 0); + + GLushort elements[] = { + 0, 1, 2, 3, + 4, 5, 6, 7, + 0, 4, 1, 5, + 2, 6, 3, 7 + }; + GLuint ibo_elements; + glGenBuffers(1, &ibo_elements); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo_elements); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(elements), elements, GL_STATIC_DRAW); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); +} \ No newline at end of file diff --git a/Escape-the-Dawn/Systems/CollisionSystem.h b/Escape-the-Dawn/Systems/CollisionSystem.h index 5c4c448..c4494b9 100644 --- a/Escape-the-Dawn/Systems/CollisionSystem.h +++ b/Escape-the-Dawn/Systems/CollisionSystem.h @@ -3,8 +3,11 @@ #include "System.h" #include "logging.h" +#include #include "Components/Transform.h" +#include "Components/Collision.h" +#include "Components/Bounds.h" namespace Systems { @@ -16,6 +19,8 @@ public: : System(world) { } void UpdateEntity(double dt, EntityID entity, EntityID parent) override; + void Intersects(EntityID, EntityID); + void CreateBoundingBox(std::shared_ptr); }; } diff --git a/Escape-the-Dawn/Systems/InputSystem.cpp b/Escape-the-Dawn/Systems/InputSystem.cpp index fc29849..495cc55 100644 --- a/Escape-the-Dawn/Systems/InputSystem.cpp +++ b/Escape-the-Dawn/Systems/InputSystem.cpp @@ -23,6 +23,35 @@ void Systems::InputSystem::Update(double dt) m_CurrentMouseDeltaY = ypos - m_LastMouseY; m_LastMouseX = xpos; m_LastMouseY = ypos; + + // Lock mouse while holding LMB + if (m_CurrentMouseState[GLFW_MOUSE_BUTTON_LEFT]) { + m_LastMouseX = m_Renderer->WIDTH / 2.f; // xpos; + m_LastMouseY = m_Renderer->HEIGHT / 2.f; // ypos; + glfwSetCursorPos(m_Renderer->GetWindow(), m_LastMouseX, m_LastMouseY); + } + // Hide/show cursor with LMB + if (m_CurrentMouseState[GLFW_MOUSE_BUTTON_LEFT] && !m_LastMouseState[GLFW_MOUSE_BUTTON_LEFT]) { + glfwSetInputMode(m_Renderer->GetWindow(), GLFW_CURSOR, GLFW_CURSOR_HIDDEN); + } + if (!m_CurrentMouseState[GLFW_MOUSE_BUTTON_LEFT] && m_LastMouseState[GLFW_MOUSE_BUTTON_LEFT]) { + glfwSetInputMode(m_Renderer->GetWindow(), GLFW_CURSOR, GLFW_CURSOR_NORMAL); + } + +#ifdef DEBUG + // Wireframe + if (m_CurrentKeyState[GLFW_KEY_F1] && !m_LastKeyState[GLFW_KEY_F1]) { + m_Renderer->DrawWireframe(!m_Renderer->DrawWireframe()); + } + // Normals + if (m_CurrentKeyState[GLFW_KEY_F2] && !m_LastKeyState[GLFW_KEY_F2]) { + m_Renderer->DrawNormals(!m_Renderer->DrawNormals()); + } + // Bounds + if (m_CurrentKeyState[GLFW_KEY_F3] && !m_LastKeyState[GLFW_KEY_F3]) { + m_Renderer->DrawBounds(!m_Renderer->DrawBounds()); + } +#endif } void Systems::InputSystem::UpdateEntity(double dt, EntityID entity, EntityID parent) @@ -38,3 +67,6 @@ void Systems::InputSystem::UpdateEntity(double dt, EntityID entity, EntityID par input->dX = m_CurrentMouseDeltaX; input->dY = m_CurrentMouseDeltaY; } + +std::array Systems::InputSystem::m_CurrentKeyState; +std::array Systems::InputSystem::m_LastKeyState; diff --git a/Escape-the-Dawn/Systems/InputSystem.h b/Escape-the-Dawn/Systems/InputSystem.h index 73a5946..99cb01f 100644 --- a/Escape-the-Dawn/Systems/InputSystem.h +++ b/Escape-the-Dawn/Systems/InputSystem.h @@ -13,7 +13,7 @@ namespace Systems class InputSystem : public System { public: - InputSystem(World* world, std::shared_ptr renderer) + InputSystem(World* world, std::shared_ptr renderer) : System(world), m_Renderer(renderer) { } void Update(double dt) override; @@ -21,13 +21,13 @@ public: private: std::shared_ptr m_Renderer; - - std::array m_CurrentKeyState; - std::array m_LastKeyState; + static std::array m_CurrentKeyState; + static std::array m_LastKeyState; std::array m_CurrentMouseState; std::array m_LastMouseState; float m_CurrentMouseDeltaX, m_CurrentMouseDeltaY; float m_LastMouseX, m_LastMouseY; + }; } diff --git a/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp b/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp index e69de29..2e71570 100644 --- a/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp +++ b/Escape-the-Dawn/Systems/LevelGenerationSystem.cpp @@ -0,0 +1,138 @@ +#include "LevelGenerationSystem.h" + +Systems::LevelGenerationSystem::LevelGenerationSystem( World* world ) + : System(world) +{ + elapsedtime = 0; + + velocity = 0; + startx = 0; + startyz = glm::vec2(0, -1000); +} + +void Systems::LevelGenerationSystem::SpawnObstacle() +{ + typeRandom = 0 + (rand() % 10); + + EntityID ent; + + ent = m_World->CreateEntity(); + obstacles.push_back(ent); + m_World->SetProperty(ent, "Name", std::string("Obstacle")); + transform = m_World->AddComponent(ent, "Transform"); + bounds = m_World->AddComponent(ent, "Bounds"); + collision = m_World->AddComponent(ent, "Collision"); + model = m_World->AddComponent(ent, "Model"); + auto sound = m_World->AddComponent(ent, "SoundEmitter"); + + + positionRandom = -500 + startx + (rand() % 1000); + transform->Position = glm::vec3(positionRandom, startyz); + //transform->Velocity = glm::vec3(0.f, 10.f, 100.f); + + sound->Loop = true; + sound->Gain = 1.f; + sound->ReferenceDistance = 15.f; + m_World->GetSystem("SoundSystem")->PlaySound(sound, "Sounds/hum.wav"); + + if(typeRandom >= 0 && typeRandom < 2) // Mountain stuff :D + { + float scale = (float)(rand() % 1000) / 250; + transform->Scale = glm::vec3(scale); + bounds->VolumeVector = glm::vec3(9, 12, 7); + bounds->Origin = glm::vec3(1,11,-1); + model->ModelFile = "Models/obstacle_mountain_1.obj"; + } + else if(typeRandom >= 2 && typeRandom < 5) // Single Mountain :D + { + float scale = (float)(rand() % 1000) / 200; + transform->Scale = glm::vec3(scale); + bounds->VolumeVector = glm::vec3(3.5f, 7.5f, 3.5f); + bounds->Origin = glm::vec3(0,7.5f,0); + model->ModelFile = "Models/obstacle_mountain_2.obj"; + } + else if(typeRandom >= 5 && typeRandom < 8) + { + float scale = (float)(rand() % 1000) / 100; + transform->Scale = glm::vec3(scale); + bounds->VolumeVector = glm::vec3(1, 1, 1); + bounds->Origin = glm::vec3(0,1,0); + model->ModelFile = "Models/obstacle_cube_1.obj"; + } + if(typeRandom >= 8 && typeRandom < 10) + { + float scale = (float)(rand() % 1000) / 100; + bounds->VolumeVector = glm::vec3(4, 4, 4); + bounds->Origin = glm::vec3(0,4,0); + pointLight = m_World->AddComponent(ent, "PointLight"); + pointLight->Specular = glm::vec3(1.0, 1.0, 1.0); + pointLight->Diffuse = glm::vec3(0.3, 1.0, 0.3); + pointLight->constantAttenuation = 0.f; + pointLight->linearAttenuation = 1.f; + pointLight->quadraticAttenuation = 0.f; + pointLight->spotExponent = 0.0f; + + powerUp = m_World->AddComponent(ent, "PowerUp"); + powerUp->Speed = 10.f; + + model->ModelFile = "Models/powerup.obj"; + } + + + // Put it below ground level + transform->Position.y -= bounds->VolumeVector.y * 2.f; + +} + +void Systems::LevelGenerationSystem::Update( double dt ) +{ + + elapsedtime += dt; + + if(elapsedtime > 0.1){ + SpawnObstacle(); + elapsedtime = 0; + } + + std::list removethis; + + for(auto ent : obstacles) + { + auto transform = m_World->GetComponent(ent, "Transform"); + + transform->Velocity.z = -velocity; + transform->Position += transform->Velocity * (float)dt; + + // Stop raising obstacles when they reach ground level + if (transform->Velocity.y > 0 && transform->Position.y >= 0) { + transform->Position.y = 0; + transform->Velocity.y = 0; + } + + if(transform->Position.z > 800) + { + removethis.push_back(ent); + } + } + + for(auto ent : removethis) + { + m_World->RemoveEntity(ent); + obstacles.remove(ent); + } + removethis.clear(); + +} + +void Systems::LevelGenerationSystem::UpdateEntity( double dt, EntityID entity, EntityID parent ) +{ + if( m_World->GetProperty(entity, "Name") == "PlayerShip") + { + auto transformComponent = m_World->GetComponent(entity, "Transform"); + startyz = glm::vec2(0, transformComponent->Position.z - 1000); + startx = transformComponent->Position.x; + velocity = transformComponent->Velocity.z; + } +} + + diff --git a/Escape-the-Dawn/Systems/LevelGenerationSystem.h b/Escape-the-Dawn/Systems/LevelGenerationSystem.h index e69de29..864c047 100644 --- a/Escape-the-Dawn/Systems/LevelGenerationSystem.h +++ b/Escape-the-Dawn/Systems/LevelGenerationSystem.h @@ -0,0 +1,50 @@ +#ifndef LevelGenerationSystem_h__ +#define LevelGenerationSystem_h__ + +#include "System.h" +#include "Systems/SoundSystem.h" +#include "World.h" +#include "Components/Transform.h" +#include "Components/Bounds.h" +#include "Components/Collision.h" +#include "Components/Model.h" +#include "Components/PointLight.h" +#include "Components/SoundEmitter.h" +#include "Components/PowerUp.h" + + +namespace Systems +{ + class LevelGenerationSystem : public System + { + public: + LevelGenerationSystem(World* world); + + + void SpawnObstacle(); + + void Update(double dt) override; + void UpdateEntity(double dt, EntityID entity, EntityID parent) override; + + private: + int typeRandom; + int positionRandom; + glm::vec2 startyz; + float startx; + + double elapsedtime; + + std::list obstacles; + float velocity; + + std::shared_ptr transform; + std::shared_ptr bounds; + std::shared_ptr collision; + std::shared_ptr model; + std::shared_ptr pointLight; + std::shared_ptr powerUp; + }; +} + + +#endif // LevelGenerationSystem_h__ \ No newline at end of file diff --git a/Escape-the-Dawn/Systems/PlayerSystem.cpp b/Escape-the-Dawn/Systems/PlayerSystem.cpp index e69de29..6e44d64 100644 --- a/Escape-the-Dawn/Systems/PlayerSystem.cpp +++ b/Escape-the-Dawn/Systems/PlayerSystem.cpp @@ -0,0 +1,126 @@ +#include "PlayerSystem.h" +#include "World.h" + +Systems::PlayerSystem::PlayerSystem( World* world ) : System(world) +{ + m_PlayerSpeed = 20; + m_PlayerOriginalBounds = glm::vec3(0); +} + +void Systems::PlayerSystem::Update(double dt) +{ +} + +void Systems::PlayerSystem::UpdateEntity(double dt, EntityID entity, EntityID parent) +{ + auto transform = m_World->GetComponent(entity, "Transform"); + if (transform == nullptr) + return; + auto input = m_World->GetComponent(entity, "Input"); + if (input == nullptr) + return; + + auto name = m_World->GetProperty(entity, "Name"); + if (name == "Camera") { + glm::vec3 Camera_Right = glm::vec3(glm::vec4(1, 0, 0, 0) * transform->Orientation); + glm::vec3 Camera_Forward = glm::vec3(glm::vec4(0, 0, 1, 0) * transform->Orientation); + + float speed = m_PlayerSpeed; + if(input->KeyState[GLFW_KEY_LEFT_SHIFT]) { + speed *= 4.0f; + } + if(input->KeyState[GLFW_KEY_LEFT_ALT]) { + speed /= 4.0f; + } + if(input->KeyState[GLFW_KEY_A] || input->KeyState[GLFW_KEY_LEFT]) { + transform->Position -= Camera_Right * (float)dt * speed; + } + else if(input->KeyState[GLFW_KEY_D] || input->KeyState[GLFW_KEY_RIGHT]) { + transform->Position += Camera_Right * (float)dt * speed; + } + if(input->KeyState[GLFW_KEY_W]) { + transform->Position -= Camera_Forward * (float)dt * speed; + } + if(input->KeyState[GLFW_KEY_S]) { + transform->Position += Camera_Forward * (float)dt * speed; + } + if(input->KeyState[GLFW_KEY_SPACE]) { + transform->Position += glm::vec3(0, 1, 0) * (float)dt * speed; + } + if(input->KeyState[GLFW_KEY_LEFT_CONTROL]) { + transform->Position -= glm::vec3(0, 1, 0) * (float)dt * speed; + } + if (input->MouseState[GLFW_MOUSE_BUTTON_LEFT]) { + // TOUCHING THIS CODE MIGHT COUSE THE UNIVERSE TO IMPLODE, ALSO DRAGONS + //--------------------------------------------------------------------- + transform->Orientation = glm::angleAxis(input->dY/300.f,glm::vec3(1,0,0)) * transform->Orientation; + + transform->Orientation = transform->Orientation * glm::angleAxis(input->dX/300.f,glm::vec3(0,1,0)); + //--------------------------------------------------------------------- + // TOUCHING THIS CODE MIGHT COUSE THE UNIVERSE TO IMPLODE, ALSO DRAGONS + } + } + + if (name == "PlayerShip") + { + auto bounds = m_World->GetComponent(entity, "Bounds"); + if (bounds && m_PlayerOriginalBounds == glm::vec3(0)) { + m_PlayerOriginalBounds = bounds->VolumeVector; + } + + glm::vec3 Ship_Right = glm::vec3(glm::vec4(1, 0, 0, 0)); + glm::vec3 Ship_Forward = glm::vec3(glm::vec4(0, 0, 1, 0)); + + float TurnSpeed = 1.0f; + glm::vec3 Euler = glm::eulerAngles(transform->Orientation); + + if(input->KeyState[GLFW_KEY_LEFT]) { + transform->Position -= Ship_Right * (float)dt * (m_PlayerSpeed + Euler.z); + + if(Euler.z < 10.f) + { + transform->Orientation = transform->Orientation * glm::angleAxis((float)dt * TurnSpeed,glm::vec3(0,0,1)); + } + else if(Euler.z < 20.f) + { + transform->Orientation = transform->Orientation * glm::angleAxis((float)dt * TurnSpeed/2,glm::vec3(0,0,1)); + } + else if (Euler.z < 25.f) + { + transform->Orientation = transform->Orientation * glm::angleAxis((float)dt * TurnSpeed/4,glm::vec3(0,0,1)); + } + } + else if(input->KeyState[GLFW_KEY_RIGHT]) { + transform->Position += Ship_Right * (float)dt * (m_PlayerSpeed - Euler.z); + + if(Euler.z > -10.f) + { + transform->Orientation = transform->Orientation * glm::angleAxis((float)dt * TurnSpeed,glm::vec3(0,0,-1)); + } + else if(Euler.z > -20.f) + { + transform->Orientation = transform->Orientation * glm::angleAxis((float)dt * TurnSpeed/2,glm::vec3(0,0,-1)); + } + else if (Euler.z > -25.f) + { + transform->Orientation = transform->Orientation * glm::angleAxis((float)dt * TurnSpeed/4,glm::vec3(0,0,-1)); + } + } + else + { + if(Euler.z < 1.5f && Euler.z > -1.5f) + transform->Orientation = glm::angleAxis(0,glm::vec3(0,0,1)); + else if(Euler.z < 0.f) + transform->Orientation = transform->Orientation * glm::angleAxis((float)dt,glm::vec3(0,0,1)); + else if(Euler.z > 0.f) + transform->Orientation = transform->Orientation * glm::angleAxis((float)dt,glm::vec3(0,0,-1)); + } + + // Update player bounds based on rotation + if (bounds) { + Euler = glm::eulerAngles(transform->Orientation); + bounds->VolumeVector.x = m_PlayerOriginalBounds.x * glm::cos(glm::radians(Euler.z)); + } + } +} + diff --git a/Escape-the-Dawn/Systems/PlayerSystem.h b/Escape-the-Dawn/Systems/PlayerSystem.h index e69de29..0d5ccad 100644 --- a/Escape-the-Dawn/Systems/PlayerSystem.h +++ b/Escape-the-Dawn/Systems/PlayerSystem.h @@ -0,0 +1,33 @@ +#ifndef PlayerSystem_h__ +#define PlayerSystem_h__ + +#include + +#include "System.h" +#include "Components/Transform.h" +#include "Components/Input.h" +#include "Components/Collision.h" +#include "Components/Bounds.h" +#include "logging.h" + + + +namespace Systems +{ + + class PlayerSystem : public System + { + public: + PlayerSystem(World* world); + + void Update(double dt) override; + void UpdateEntity(double dt, EntityID entity, EntityID parent) override; + + private: + float m_PlayerSpeed; + glm::vec3 m_PlayerOriginalBounds; + }; + +} + +#endif // InputSystem_h__ diff --git a/Escape-the-Dawn/Systems/RenderSystem.cpp b/Escape-the-Dawn/Systems/RenderSystem.cpp index e69de29..3165a0f 100644 --- a/Escape-the-Dawn/Systems/RenderSystem.cpp +++ b/Escape-the-Dawn/Systems/RenderSystem.cpp @@ -0,0 +1,68 @@ +#include "RenderSystem.h" +#include "World.h" + +void Systems::RenderSystem::OnComponentCreated( std::string type, std:: shared_ptr component ) +{ + if(type == "Model") + { + auto modelComponent = std::static_pointer_cast(component); + + } +} + +void Systems::RenderSystem::UpdateEntity( double dt, EntityID entity, EntityID parent ) +{ + auto transformComponent = m_World->GetComponent(entity, "Transform"); + if (transformComponent == nullptr) + return; + + // Draw models + auto modelComponent = m_World->GetComponent(entity, "Model"); + if (modelComponent != nullptr) + { + if (m_CachedModels.find(modelComponent->ModelFile) == m_CachedModels.end()){ + m_CachedModels[modelComponent->ModelFile] = std::make_shared(OBJ(modelComponent->ModelFile)); + } + + auto model = m_CachedModels[modelComponent->ModelFile]; + m_Renderer->AddModelToDraw(model, transformComponent->Position, transformComponent->Orientation, transformComponent->Scale); + } + + // Debug draw bounds +#ifdef DEBUG + auto collision = m_World->GetComponent(entity, "Collision"); + auto bounds = m_World->GetComponent(entity, "Bounds"); + if (bounds != nullptr) { + glm::vec3 origin = transformComponent->Position + (transformComponent->Scale * bounds->Origin); + glm::vec3 volumeVector = transformComponent->Scale * bounds->VolumeVector; + m_Renderer->AddAABBToDraw(origin, volumeVector, (collision != nullptr && collision->CollidingEntities.size() > 0)); + } +#endif + + auto pointLightComponent = m_World->GetComponent(entity, "PointLight"); + if (pointLightComponent != nullptr) + { + m_Renderer->AddPointLightToDraw( + transformComponent->Position, + pointLightComponent->Specular, + pointLightComponent->Diffuse, + pointLightComponent->constantAttenuation, + pointLightComponent->linearAttenuation, + pointLightComponent->quadraticAttenuation, + pointLightComponent->spotExponent); + } + auto cameraComponent = m_World->GetComponent(entity, "Camera"); + if (cameraComponent != nullptr) + { + m_Renderer->GetCamera()->Position(transformComponent->Position); + m_Renderer->GetCamera()->Orientation(transformComponent->Orientation); + + m_Renderer->GetCamera()->FOV(cameraComponent->FOV); + m_Renderer->GetCamera()->NearClip(cameraComponent->NearClip); + m_Renderer->GetCamera()->FarClip(cameraComponent->FarClip); + } +} + + + + diff --git a/Escape-the-Dawn/Systems/RenderSystem.h b/Escape-the-Dawn/Systems/RenderSystem.h index e69de29..d2a182f 100644 --- a/Escape-the-Dawn/Systems/RenderSystem.h +++ b/Escape-the-Dawn/Systems/RenderSystem.h @@ -0,0 +1,41 @@ +#ifndef RenderSystem_h__ +#define RenderSystem_h__ + +#include + +#include "System.h" +#include "Model.h" +#include "Texture.h" +#include "Components/Model.h" +#include "Components/Transform.h" +#include "Components/Camera.h" +#include "Components/Bounds.h" +#include "Components/Collision.h" +#include "Renderer.h" + +namespace Systems +{ + + class RenderSystem : public System + { + public: + RenderSystem(World* world, std::shared_ptr renderer) + : System(world), m_Renderer(renderer){ } + + std::unordered_map> m_CachedModels; + + void OnComponentCreated(std::string type, std:: shared_ptr component) override; + void UpdateEntity(double dt, EntityID entity, EntityID parent) override; + + private: + std::shared_ptr m_Renderer; + + }; + + +} + + + + +#endif //RenderSystem_h__ \ No newline at end of file diff --git a/Escape-the-Dawn/Systems/SoundSystem.h b/Escape-the-Dawn/Systems/SoundSystem.h index e69de29..f8b97eb 100644 --- a/Escape-the-Dawn/Systems/SoundSystem.h +++ b/Escape-the-Dawn/Systems/SoundSystem.h @@ -0,0 +1,45 @@ +#ifndef SoundEmitter_h__ +#define SoundEmitter_h__ + +#include "System.h" +#include "Components/Transform.h" +#include "Components/SoundEmitter.h" +#include +#include +#include +#include + +namespace Systems +{ + +class SoundSystem : public System +{ +public: + SoundSystem(World* world); + + void Update(double dt) override; + void UpdateEntity(double dt, EntityID entity, EntityID parent) override; + void OnComponentCreated(std::string type, std::shared_ptr component) override; + void OnComponentRemoved(std::string type, Component* component) override; + void PlaySound(std::shared_ptr emitter, std::string fileName); + +private: + ALuint LoadFile(std::string fileName); + ALuint CreateSource(); + + //File-info + char type[4]; + unsigned long size, chunkSize; + short formatType, channels; + unsigned long sampleRate, avgBytesPerSec; + short bytesPerSample, bitsPerSample; + unsigned long dataSize; + + + std::map m_Sources; + std::map m_BufferCache; // string = fileName +}; + +} +#endif // !SoundEmitter_h__ + diff --git a/Escape-the-Dawn/Systems/SoundsSystem.cpp b/Escape-the-Dawn/Systems/SoundsSystem.cpp index e69de29..e5cdb3c 100644 --- a/Escape-the-Dawn/Systems/SoundsSystem.cpp +++ b/Escape-the-Dawn/Systems/SoundsSystem.cpp @@ -0,0 +1,189 @@ +#include "SoundSystem.h" +#include "World.h" + +Systems::SoundSystem::SoundSystem(World* world) + : System(world) +{ + //initialize OpenAL + ALCdevice* Device = alcOpenDevice(NULL); + ALCcontext* context; + if(Device) + { + context = alcCreateContext(Device, NULL); + alcMakeContextCurrent(context); + } + else + { + LOG_ERROR("OMG OPEN AL FAIL"); + } + + alGetError(); + + alSpeedOfSound(340.29f); // Speed of sound + alDistanceModel(AL_INVERSE_DISTANCE); +} + +void Systems::SoundSystem::Update(double dt) +{ + +} + +void Systems::SoundSystem::UpdateEntity(double dt, EntityID entity, EntityID parent) +{ + auto transformComponent = m_World->GetComponent(entity, "Transform"); + if (transformComponent == nullptr) + return; + + auto entityName = m_World->GetProperty(entity, "Name"); + if (entityName == "Camera") + { + glm::vec3 playerPos = transformComponent->Position; + ALfloat listenerPos[3] = { playerPos.x, playerPos.y, -playerPos.z }; + + glm::vec3 playerVel = transformComponent->Velocity; + ALfloat listenerVel[3] = { playerVel.x, playerVel.y, -playerVel.z }; + + glm::fquat playerQuatOri = transformComponent->Orientation; + glm::vec3 playerOriFW = glm::rotate(playerQuatOri, glm::vec3(0, 0, -1)); + glm::vec3 playerOriUP = glm::rotate(playerQuatOri, glm::vec3(0, 1, 0)); + ALfloat listenerOri[6] = { playerOriFW.x, playerOriFW.y, playerOriFW.z, playerOriUP.x, playerOriUP.y, playerOriUP.z }; + + //Listener + alListenerfv(AL_POSITION, listenerPos); + alListenerfv(AL_VELOCITY, listenerVel); + alListenerfv(AL_ORIENTATION, listenerOri); + } + + auto soundEmitter = m_World->GetComponent(entity, "SoundEmitter"); + if(soundEmitter != nullptr) + { + ALuint source = m_Sources[soundEmitter]; + alSourcef(source, AL_GAIN, soundEmitter->Gain); + //alSourcef(source, AL_MAX_DISTANCE, soundEmitter->MaxDistance); + alSourcef(source, AL_REFERENCE_DISTANCE, soundEmitter->ReferenceDistance); + alSourcef(source, AL_PITCH, soundEmitter->Pitch); + alSourcei(source, AL_LOOPING, soundEmitter->Loop); + + glm::vec3 emitterPos = transformComponent->Position; + ALfloat sourcePos[3] = { emitterPos.x, emitterPos.y, -emitterPos.z }; + + glm::vec3 emitterVel= transformComponent->Velocity; + ALfloat sourceVel[3] = { emitterVel.x, emitterVel.y, -emitterVel.z }; + + alSourcefv(source, AL_POSITION, sourcePos); + alSourcefv(source, AL_VELOCITY, sourceVel); + } +} + +void Systems::SoundSystem::PlaySound(std::shared_ptr emitter, std::string fileName) +{ + if (m_Sources.find(emitter.get()) == m_Sources.end()) + return; + + ALuint buffer = LoadFile(fileName); + ALuint source = m_Sources[emitter.get()]; + alSourcei(source, AL_BUFFER, buffer); + alSourcePlay(m_Sources[emitter.get()]); +} + +void Systems::SoundSystem::OnComponentCreated(std::string type, std::shared_ptr component) +{ + if(type == "SoundEmitter") { + ALuint source = CreateSource(); + m_Sources[component.get()] = source; + } +} + +void Systems::SoundSystem::OnComponentRemoved(std::string type, Component* component) +{ + if(type == "SoundEmitter") { + if (m_Sources.find(component) != m_Sources.end()) { + ALuint source = m_Sources[component]; + alDeleteSources(1, &source); + } + } +} + +ALuint Systems::SoundSystem::LoadFile(std::string fileName) +{ + if (m_BufferCache.find(fileName) != m_BufferCache.end()) + return m_BufferCache[fileName]; + + FILE *fp = NULL; + fp = fopen(fileName.c_str(), "rb"); + + //CHECK FOR VALID WAVE-FILE + fread(type, sizeof(char), 4, fp); + if(type[0]!='R' || type[1]!='I' || type[2]!='F' || type[3]!='F') { + LOG_ERROR("ERROR: No RIFF in WAVE-file"); + return 0; + } + + fread(&size, sizeof(unsigned long), 1, fp); + fread(type, sizeof(char), 4, fp); + if(type[0]!='W' || type[1]!='A' || type[2]!='V' || type[3]!='E') { + LOG_ERROR("ERROR: Not WAVE-file"); + return 0; + } + + fread(type, sizeof(char), 4, fp); + if(type[0]!='f' || type[1]!='m' || type[2]!='t' || type[3]!=' ') { + LOG_ERROR("ERROR: No fmt in WAVE-file"); + return 0; + } + + //READ THE DATA FROM WAVE-FILE + fread(&chunkSize, sizeof(unsigned long), 1, fp); + fread(&formatType, sizeof(short), 1, fp); + fread(&channels, sizeof(short), 1, fp); + fread(&sampleRate, sizeof(unsigned long), 1, fp); + fread(&avgBytesPerSec, sizeof(unsigned long), 1, fp); + fread(&bytesPerSample, sizeof(short), 1, fp); + fread(&bitsPerSample, sizeof(short), 1, fp); + + fread(type, sizeof(char), 4, fp); + if(type[0]!='d' || type[1]!='a' || type[2]!='t' || type[3]!='a') + { + LOG_ERROR("ERROR: WAVE-file Missing data"); + return 0; + } + + fread(&dataSize, sizeof(unsigned long), 1, fp); + + unsigned char* buf = new unsigned char[dataSize]; + fread(buf, sizeof(unsigned char), dataSize, fp); + fclose(fp); + + // Create buffer + ALuint format = 0; + if(bitsPerSample == 8) + { + if(channels == 1) + format = AL_FORMAT_MONO8; + else if(channels == 2) + format = AL_FORMAT_STEREO8; + } + if(bitsPerSample == 16) + { + if (channels == 1) + format = AL_FORMAT_MONO16; + else if (channels == 2) + format = AL_FORMAT_STEREO16; + } + + ALuint buffer; + alGenBuffers(1, &buffer); + alBufferData(buffer, format, buf, dataSize, sampleRate); + delete[] buf; + + m_BufferCache[fileName] = buffer; + return buffer; +} + +ALuint Systems::SoundSystem::CreateSource() +{ + ALuint source; + alGenSources((ALuint)1, &source); + + return source; +} \ No newline at end of file diff --git a/Escape-the-Dawn/Texture.cpp b/Escape-the-Dawn/Texture.cpp index 8fa587c..de050c7 100644 --- a/Escape-the-Dawn/Texture.cpp +++ b/Escape-the-Dawn/Texture.cpp @@ -1,14 +1,14 @@ #include "Texture.h" -Texture::Texture( const char* path ) +Texture::Texture(std::string path) { Load(path); } -void Texture::Load( const char* path ) +void Texture::Load(std::string path) { - texture = SOIL_load_OGL_texture(path, 0, 0, SOIL_FLAG_INVERT_Y); + texture = SOIL_load_OGL_texture(path.c_str(), 0, 0, SOIL_FLAG_INVERT_Y); } void Texture::Bind() diff --git a/Escape-the-Dawn/Texture.h b/Escape-the-Dawn/Texture.h index bf27ff3..f24cb2f 100644 --- a/Escape-the-Dawn/Texture.h +++ b/Escape-the-Dawn/Texture.h @@ -1,22 +1,21 @@ #ifndef Texture_h__ #define Texture_h__ -#include -#define GLFW_INCLUDE_GLU -#include -#include +#include + +#include "OpenGL.h" #include class Texture { public: - Texture(const char* path); + Texture(std::string path); ~Texture(); GLuint texture; - void Load(const char* path); + void Load(std::string path); void Bind(); }; diff --git a/Escape-the-Dawn/World.cpp b/Escape-the-Dawn/World.cpp index cda58ae..500395e 100644 --- a/Escape-the-Dawn/World.cpp +++ b/Escape-the-Dawn/World.cpp @@ -61,6 +61,19 @@ bool World::ValidEntity(EntityID entity) void World::RemoveEntity(EntityID entity) { m_EntityParents.erase(entity); + // Remove components + for (auto pair : m_EntityComponents[entity]) { + auto type = pair.first; + auto component = pair.second; + // Trigger events + for (auto pair : m_Systems) { + auto system = pair.second; + system->OnComponentRemoved(type, component.get()); + } + m_ComponentsOfType[type].remove(component); + } + m_EntityComponents.erase(entity); + RecycleEntityID(entity); } diff --git a/Escape-the-Dawn/World.h b/Escape-the-Dawn/World.h index c8803e5..add6ae3 100644 --- a/Escape-the-Dawn/World.h +++ b/Escape-the-Dawn/World.h @@ -2,9 +2,13 @@ #define World_h__ #include +#include #include #include #include +#include + +#include #include "logging.h" @@ -36,11 +40,27 @@ public: EntityID GetEntityParent(EntityID entity); + template + T GetProperty(EntityID entity, std::string property) + { + if(m_EntityProperties.find(entity) == m_EntityProperties.end()) + return T(); + if(m_EntityProperties[entity].find(property) == m_EntityProperties[entity].end()) + return T(); + + return boost::any_cast(m_EntityProperties[entity][property]); + } + + void SetProperty(EntityID entity, std::string property, boost::any value) + { + m_EntityProperties[entity][property] = value; + } + template std::shared_ptr AddComponent(EntityID entity, std::string componentType); std::shared_ptr AddComponent(EntityID entity, std::string componentType); template - std::shared_ptr GetComponent(EntityID entity, std::string componentType); + T* GetComponent(EntityID entity, std::string componentType); /*std::vector GetEntityChildren(EntityID entity);*/ @@ -48,6 +68,8 @@ public: // Recursively update through the scene graph void RecursiveUpdate(std::shared_ptr system, double dt, EntityID parentEntity); + std::unordered_map* GetEntities() { return &m_EntityParents; } + protected: SystemFactory m_SystemFactory; ComponentFactory m_ComponentFactory; @@ -57,9 +79,10 @@ protected: EntityID m_LastEntityID; std::stack m_RecycledEntityIDs; // A bottom to top tree. A map of child entities to parent entities. - std::unordered_map m_EntityParents; + std::unordered_map m_EntityParents ; + std::unordered_map> m_EntityProperties; - std::unordered_map>> m_ComponentsOfType; + std::unordered_map>> m_ComponentsOfType; std::unordered_map>> m_EntityComponents; EntityID GenerateEntityID(); @@ -94,9 +117,9 @@ std::shared_ptr World::AddComponent(EntityID entity, std::string componentTyp template -std::shared_ptr World::GetComponent(EntityID entity, std::string componentType) +T* World::GetComponent(EntityID entity, std::string componentType) { - return std::static_pointer_cast(m_EntityComponents[entity][componentType]); + return (T*)m_EntityComponents[entity][componentType].get(); } #endif // World_h__ \ No newline at end of file diff --git a/Escape-the-Dawn/glerror.h b/Escape-the-Dawn/glerror.h index 88f58a7..42432e4 100644 --- a/Escape-the-Dawn/glerror.h +++ b/Escape-the-Dawn/glerror.h @@ -1,8 +1,6 @@ #ifndef _GLERROR_H #define _GLERROR_H -#define GLFW_INCLUDE_GLU -#include #include #include "logging.h" diff --git a/Escape-the-Dawn/logging.h b/Escape-the-Dawn/logging.h index e23be53..cb3b140 100644 --- a/Escape-the-Dawn/logging.h +++ b/Escape-the-Dawn/logging.h @@ -2,6 +2,7 @@ #define DEBUG_H #ifdef _WIN32 +#define _CRT_SECURE_NO_WARNINGS // http://stackoverflow.com/a/2282433 #define __func__ __FUNCTION__ // http://stackoverflow.com/a/8488201 @@ -46,10 +47,13 @@ static void _LOG(_LOG_LEVEL logLevel, char* file, char* func, unsigned int line, if (logLevel > LOG_LEVEL) return; - char message[512]; va_list args; va_start(args, format); - vsnprintf_s(message, 512, format, args); + char* message = nullptr; + size_t size = vsnprintf(message, 0, format, args); + message = new char[size+1]; + message[size] = '\0'; + vsnprintf(message, size, format, args); va_end(args); if (logLevel == LOG_LEVEL_ERROR) @@ -61,6 +65,8 @@ static void _LOG(_LOG_LEVEL logLevel, char* file, char* func, unsigned int line, { std::cout << _LOG_LEVEL_PREFIX[logLevel] << message << std::endl; } + + delete[] message; } #define LOG(logLevel, format, ...) \ diff --git a/Executable/main.cpp b/Escape-the-Dawn/main.cpp similarity index 100% rename from Executable/main.cpp rename to Escape-the-Dawn/main.cpp diff --git a/Executable/Executable.vcxproj b/Executable/Executable.vcxproj deleted file mode 100644 index e63646d..0000000 --- a/Executable/Executable.vcxproj +++ /dev/null @@ -1,90 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {A9755CAA-62DC-442D-B82C-F548546CFD38} - Executable - - - - Application - true - v110 - MultiByte - - - Application - false - v110 - true - MultiByte - - - - - - - - - - - - - $(SolutionDir)\Escape-the-Dawn;$(SolutionDir)\Libraries\SOIL\src;\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) - $(SolutionDir)bin\ - $(SolutionName)-$(Configuration) - $(SolutionDir)obj\$(ProjectName)\ - - - $(SolutionDir)\Escape-the-Dawn;$(SolutionDir)\Libraries\SOIL\src;\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) - $(SolutionDir)bin\ - $(SolutionName)-$(Configuration) - $(SolutionDir)obj\$(ProjectName)\ - - - - Level3 - Disabled - true - GLEW_STATIC;DEBUG;_MBCS;%(PreprocessorDefinitions) - - - true - - - - - Level3 - MaxSpeed - true - true - true - GLEW_STATIC;_MBCS;%(PreprocessorDefinitions) - - - true - true - true - - - - - - - - {fe405cfa-8fce-4867-92cf-797e73b36482} - - - - - - \ No newline at end of file diff --git a/Executable/Executable.vcxproj.filters b/Executable/Executable.vcxproj.filters deleted file mode 100644 index 8755a3a..0000000 --- a/Executable/Executable.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/Libraries/glew-1.10.0/lib/Release/Win32/glew32s.lib b/Libraries/glew-1.10.0/lib/Release/Win32/glew32s.lib index 660a427..5beb729 100644 Binary files a/Libraries/glew-1.10.0/lib/Release/Win32/glew32s.lib and b/Libraries/glew-1.10.0/lib/Release/Win32/glew32s.lib differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.dll b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.dll new file mode 100644 index 0000000..9c8932e Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.dll differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.exp b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.exp new file mode 100644 index 0000000..9813fee Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.exp differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.ilk b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.ilk new file mode 100644 index 0000000..0e2cc84 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.ilk differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.lib b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.lib new file mode 100644 index 0000000..688ad50 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.lib differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.pdb b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.pdb new file mode 100644 index 0000000..b28c60d Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/OpenAL32.pdb differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/makehrtf.exe b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/makehrtf.exe new file mode 100644 index 0000000..e1e33af Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/makehrtf.exe differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/makehrtf.ilk b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/makehrtf.ilk new file mode 100644 index 0000000..8beac13 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/makehrtf.ilk differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/makehrtf.pdb b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/makehrtf.pdb new file mode 100644 index 0000000..496d423 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/makehrtf.pdb differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/openal-info.exe b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/openal-info.exe new file mode 100644 index 0000000..90b3bc2 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/openal-info.exe differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/openal-info.ilk b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/openal-info.ilk new file mode 100644 index 0000000..e74433b Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/openal-info.ilk differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/openal-info.pdb b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/openal-info.pdb new file mode 100644 index 0000000..3c8ea25 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Debug/openal-info.pdb differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/OpenAL32.dll b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/OpenAL32.dll new file mode 100644 index 0000000..5dc4ef8 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/OpenAL32.dll differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/OpenAL32.exp b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/OpenAL32.exp new file mode 100644 index 0000000..fd91812 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/OpenAL32.exp differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/OpenAL32.lib b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/OpenAL32.lib new file mode 100644 index 0000000..93431b7 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/OpenAL32.lib differ diff --git a/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/openal-info.exe b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/openal-info.exe new file mode 100644 index 0000000..4263497 Binary files /dev/null and b/Libraries/openal-soft-1.15.1-bin/lib/Win32/Release/openal-info.exe differ diff --git a/Tests/Debug/boost_unit_test_framework-vc110-gd-1_55.dll b/Tests/Debug/boost_unit_test_framework-vc110-gd-1_55.dll deleted file mode 100644 index 548d50c..0000000 Binary files a/Tests/Debug/boost_unit_test_framework-vc110-gd-1_55.dll and /dev/null differ diff --git a/Tests/Release/boost_unit_test_framework-vc110-1_55.dll b/Tests/Release/boost_unit_test_framework-vc110-1_55.dll deleted file mode 100644 index 492bd71..0000000 Binary files a/Tests/Release/boost_unit_test_framework-vc110-1_55.dll and /dev/null differ diff --git a/Tests/Tests.vcxproj b/Tests/Tests.vcxproj deleted file mode 100644 index 1f1fed7..0000000 --- a/Tests/Tests.vcxproj +++ /dev/null @@ -1,107 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {B9A8F4AA-BE85-45EA-84DD-652D13DD22BE} - Tests - - - - Application - true - v110 - MultiByte - - - Application - false - v110 - true - MultiByte - - - - - - - - - - - - - $(BOOST_ROOT);$(SolutionDir)\Escape-the-Dawn;$(SolutionDir)\Libraries\SOIL\src;\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) - $(BOOST_ROOT)\lib32-msvc-11.0;$(LibraryPath) - $(ProjectDir)$(Configuration)\ - $(SolutionDir)obj\$(ProjectName)\ - - - $(BOOST_ROOT);$(SolutionDir)\Escape-the-Dawn;$(SolutionDir)\Libraries\SOIL\src;\Libraries\SOIL\src;$(ProjectDir);$(SolutionDir)\Libraries;$(SolutionDir)\Libraries\glew-1.10.0\include;$(SolutionDir)\Libraries\glfw-3.0.4\include;$(SolutionDir)\Libraries\glm-0.9.5.2;$(IncludePath) - $(BOOST_ROOT)\lib32-msvc-11.0;$(LibraryPath) - $(ProjectDir)$(Configuration)\ - $(SolutionDir)obj\$(ProjectName)\ - - - - Level3 - Disabled - true - - - true - Console - boost_unit_test_framework-vc110-gd-1_55.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - $(OutDir)$(TargetName)$(TargetExt) --log_level=test_suite - - - Running tests - - - - - Level3 - MaxSpeed - true - true - true - - - true - true - true - boost_unit_test_framework-vc110-1_55.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - $(OutDir)$(TargetName)$(TargetExt) --log_level=test_suite - - - Running tests - - - - - - - - {fe405cfa-8fce-4867-92cf-797e73b36482} - - - - - - \ No newline at end of file diff --git a/Tests/Tests.vcxproj.filters b/Tests/Tests.vcxproj.filters deleted file mode 100644 index 8755a3a..0000000 --- a/Tests/Tests.vcxproj.filters +++ /dev/null @@ -1,22 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Source Files - - - \ No newline at end of file diff --git a/Tests/main.cpp b/Tests/main.cpp deleted file mode 100644 index 027263d..0000000 --- a/Tests/main.cpp +++ /dev/null @@ -1,64 +0,0 @@ -#include "logging.h" - -#include "World.h" -#include "Components/Transform.h" - -#define BOOST_TEST_MODULE World -#define BOOST_TEST_DYN_LINK -#include - -BOOST_AUTO_TEST_CASE(Parenting) -{ - World world; - - // Parenting - EntityID ent1 = world.CreateEntity(); - BOOST_CHECK(ent1 != 0); // 0 is reserved for world - BOOST_CHECK(ent1 == 1); - BOOST_CHECK(world.GetEntityParent(ent1) == 0); - EntityID ent2 = world.CreateEntity(ent1); - BOOST_CHECK(ent2 != 0); - BOOST_CHECK(ent2 == ent1 + 1); - BOOST_CHECK(world.GetEntityParent(ent2) == ent1); -} - -BOOST_AUTO_TEST_CASE(SceneGraphTraversal) -{ - World world; - - EntityID ent1 = world.CreateEntity(); - auto t1 = world.AddComponent(ent1, "Transform"); - t1->Position[0] = 1.0f; - t1->Position[1] = 1.0f; - t1->Position[2] = 1.0f; - EntityID ent2 = world.CreateEntity(ent1); - auto t2 = world.AddComponent(ent2, "Transform"); - t2->Position[0] = 1.0f; - t2->Position[1] = 1.0f; - t2->Position[2] = 1.0f; - - world.Update(0.0); - - LOG_INFO("ent1: %f %f %f", t1->Position[0], t1->Position[1], t1->Position[2]); - LOG_INFO("ent2: %f %f %f", t2->Position[0], t2->Position[1], t2->Position[2]); -} - -BOOST_AUTO_TEST_CASE(Recycling) -{ - World world; - - // EntityID recycling - EntityID ent11 = world.CreateEntity(); // 1 - world.RemoveEntity(ent11); - EntityID ent12 = world.CreateEntity(); // 1 - BOOST_REQUIRE(ent11 == ent12); -} - -BOOST_AUTO_TEST_CASE(ComponentCreation) -{ - World world; - - EntityID ent = world.CreateEntity(); - BOOST_CHECK(world.AddComponent(ent, "Transform") != nullptr); - BOOST_CHECK(world.AddComponent(ent, "Input") != nullptr); -} \ No newline at end of file