34 lines
775 B
C++
34 lines
775 B
C++
// Copyright (c) 2023 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "dawnlibs.hpp"
|
|
#include "physics/3d/Ray3D.hpp"
|
|
|
|
typedef int64_t scenechunk_t;
|
|
|
|
#define SCENE_CHUNK_SIZE_2D 512
|
|
|
|
namespace Dawn {
|
|
class Scene;
|
|
class Collider3D;
|
|
struct Collider3DRayResult;
|
|
|
|
class ScenePhysicsManager {
|
|
protected:
|
|
Scene *scene;
|
|
// std::map<scenechunk_t, std::vector<SceneItem*>> chunkItems;
|
|
// std::map<SceneItem*, std::vector<scenechunk_t>> itemChunks;
|
|
|
|
public:
|
|
ScenePhysicsManager(Scene *scene);
|
|
|
|
void update();
|
|
|
|
std::vector<struct Collider3DRayResult> raycast3DAll(struct Ray3D ray);
|
|
|
|
friend class Scene;
|
|
};
|
|
} |