summaryrefslogtreecommitdiff
path: root/src/world.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.hpp')
-rw-r--r--src/world.hpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/world.hpp b/src/world.hpp
index 12e0285..e8882b2 100644
--- a/src/world.hpp
+++ b/src/world.hpp
@@ -1,9 +1,14 @@
#pragma once
#include "xe_game_object.hpp"
-#include "chunk_renderer.hpp"
+#include "skinned_renderer.hpp"
#include "chunk.hpp"
+#define GLM_FORCE_RADIANS
+#include <glm/common.hpp>
+#include <glm/fwd.hpp>
+#include <glm/geometric.hpp>
+
#include <vector>
namespace app {
@@ -12,6 +17,11 @@ class World {
public:
+ struct Ray {
+ glm::ivec3 pos;
+ int hit;
+ };
+
World(xe::GameObject& viewer, int renderDistance, int worldSeed);
~World();
@@ -20,6 +30,8 @@ class World {
void render(xe::Camera& camera);
+ Ray raycast(float distance, int steps);
+
private:
void resetChunks();
@@ -36,7 +48,7 @@ class World {
const xe::GameObject& viewer;
std::vector<xe::GameObject> loadedChunks;
- ChunkRenderer chunkRenderer;
+ SkinnedRenderer skinnedRenderer;
};