]> git.localhorst.tv Git - blank.git/blobdiff - src/world/World.hpp
unified location handling
[blank.git] / src / world / World.hpp
index e29474e99f47af5e164943a4965fd896cbc2ee17..8754d3992e800f518dd9b5db021a8c997a80ec9b 100644 (file)
@@ -49,7 +49,7 @@ public:
        bool Intersection(
                const Ray &,
                const glm::mat4 &M,
-               const Chunk::Pos &reference,
+               const ExactLocation::Coarse &reference,
                WorldCollision &);
 
        /// check if this ray hits an entity
@@ -101,6 +101,7 @@ public:
        void Update(Entity &, float dt);
 
        void Render(Viewport &);
+       void RenderDebug(Viewport &);
 
 private:
        using EntityHandle = std::list<Entity>::iterator;
@@ -129,6 +130,14 @@ private:
                const EntityState &
        );
 
+       /// calculate light direction and intensity at entity's location
+       void GetLight(
+               const Entity &entity,
+               glm::vec3 &direction,
+               glm::vec3 &color,
+               glm::vec3 &ambient
+       );
+
 private:
        Config config;