Loading include/GlApplication.hpp +4 −1 Changes for include/GlApplication.hpp: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ #include <memory> #include "RenderObject.hpp" #include "RenderObjectPart.hpp" #include "model/Spaceship.hpp" class RenderObject; Loading Loading @@ -47,4 +47,7 @@ class GlApplication : public Application { float m_deltaTime; ///< elapsed time since last frame int m_framebufferWidth; ///< Window's width int m_framebufferHeight; ///< Window's height Spaceship m_spaceshipPlayer1; ///< Player 1 spaceship Spaceship m_spaceshipPlayer2; ///< Player 2 spaceship }; include/RenderObject.hpp +0 −1 Changes for include/RenderObject.hpp: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ #include <memory> #include "GlApplication.hpp" #include "RenderObjectPart.hpp" /** Loading include/RenderObjectPart.hpp +1 −1 Changes for include/RenderObjectPart.hpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ class RenderObjectPart { RenderObjectPart(RenderObjectPart &&) = default; RenderObjectPart(std::shared_ptr<VAO> vao, std::shared_ptr<Program> program, std::shared_ptr<Texture> texture, std::shared_ptr<Texture> ntexture, std::shared_ptr<Texture> stexture); void draw(Sampler * colormap, Sampler * normalmap, Sampler * specularmap); void update(const glm::mat4 & proj, const glm::mat4 & view, const glm::mat4 & mw, bool displayNormals); void update(const glm::mat4 & proj, const glm::mat4 & view, const glm::mat4 & mw); private: std::shared_ptr<VAO> m_vao; Loading include/model/Renderable.hpp +1 −5 Changes for include/model/Renderable.hpp: 1 added line, 5 removed lines. Original line number Diff line number Diff line #ifndef __RENDERABLE_HPP_ #pragma once #include <string> #include <memory> #include "glm/glm.hpp" #include "RenderObject.hpp" class Renderable { Loading @@ -20,4 +17,3 @@ class Renderable { const std::shared_ptr<RenderObject> &get_render_object() const; }; #endif // !__RENDERABLE_HPP_ include/model/Spaceship.hpp +1 −8 Changes for include/model/Spaceship.hpp: 1 added line, 8 removed lines. Original line number Diff line number Diff line #ifndef __SPACESHIP_HPP_ #pragma once #include "glm/glm.hpp" #include "Renderable.hpp" enum Player {one, two}; class Spaceship : public Renderable { Loading @@ -14,13 +11,9 @@ class Spaceship : public Renderable { glm::vec3 acceleration; Player playerNumber; public: Spaceship(const Player &playerNumber, const glm::mat4 &modelWorld); const glm::vec3 &get_acceleration() const; const Player &get_player_number() const; }; #endif // !__SPACESHIP_HPP_ Loading
include/GlApplication.hpp +4 −1 Changes for include/GlApplication.hpp: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ #include <memory> #include "RenderObject.hpp" #include "RenderObjectPart.hpp" #include "model/Spaceship.hpp" class RenderObject; Loading Loading @@ -47,4 +47,7 @@ class GlApplication : public Application { float m_deltaTime; ///< elapsed time since last frame int m_framebufferWidth; ///< Window's width int m_framebufferHeight; ///< Window's height Spaceship m_spaceshipPlayer1; ///< Player 1 spaceship Spaceship m_spaceshipPlayer2; ///< Player 2 spaceship };
include/RenderObject.hpp +0 −1 Changes for include/RenderObject.hpp: 0 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -8,7 +8,6 @@ #include <memory> #include "GlApplication.hpp" #include "RenderObjectPart.hpp" /** Loading
include/RenderObjectPart.hpp +1 −1 Changes for include/RenderObjectPart.hpp: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ class RenderObjectPart { RenderObjectPart(RenderObjectPart &&) = default; RenderObjectPart(std::shared_ptr<VAO> vao, std::shared_ptr<Program> program, std::shared_ptr<Texture> texture, std::shared_ptr<Texture> ntexture, std::shared_ptr<Texture> stexture); void draw(Sampler * colormap, Sampler * normalmap, Sampler * specularmap); void update(const glm::mat4 & proj, const glm::mat4 & view, const glm::mat4 & mw, bool displayNormals); void update(const glm::mat4 & proj, const glm::mat4 & view, const glm::mat4 & mw); private: std::shared_ptr<VAO> m_vao; Loading
include/model/Renderable.hpp +1 −5 Changes for include/model/Renderable.hpp: 1 added line, 5 removed lines. Original line number Diff line number Diff line #ifndef __RENDERABLE_HPP_ #pragma once #include <string> #include <memory> #include "glm/glm.hpp" #include "RenderObject.hpp" class Renderable { Loading @@ -20,4 +17,3 @@ class Renderable { const std::shared_ptr<RenderObject> &get_render_object() const; }; #endif // !__RENDERABLE_HPP_
include/model/Spaceship.hpp +1 −8 Changes for include/model/Spaceship.hpp: 1 added line, 8 removed lines. Original line number Diff line number Diff line #ifndef __SPACESHIP_HPP_ #pragma once #include "glm/glm.hpp" #include "Renderable.hpp" enum Player {one, two}; class Spaceship : public Renderable { Loading @@ -14,13 +11,9 @@ class Spaceship : public Renderable { glm::vec3 acceleration; Player playerNumber; public: Spaceship(const Player &playerNumber, const glm::mat4 &modelWorld); const glm::vec3 &get_acceleration() const; const Player &get_player_number() const; }; #endif // !__SPACESHIP_HPP_