CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
FlatScenePartition.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2023 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "ScenePartition.hpp"
11
13
16
17namespace CeresEngine {
18
31 private:
39
40 public:
42 [[nodiscard]] SceneObject rayCast(const Ray& ray) final;
43
44 public:
45 void rebuild() final;
46
49
52
55 };
56
57} // namespace CeresEngine
A flat scene partitioning system.
Definition FlatScenePartition.hpp:30
void rebuild() final
Rebuilds the scene partition after changes were done.
void removeSceneObject(const SceneObject &sceneObject) final
Removes an existing scene object from the scene partition structure.
void addSceneObject(const SceneObject &sceneObject) final
Adds a new scene object to the scene partition structure.
SceneObject rayCast(const Ray &ray) final
Casts a ray on the scene to find the first SceneObject that gets hit by the ray.
void updateSceneObject(const SceneObject &sceneObject) final
Updates an existing scene object on the scene partition structure.
Vector< ObjectInformation > mObjects
Definition FlatScenePartition.hpp:38
Partitions the scene into a highly-efficient representation that allows to quickly perform geometric ...
Definition ScenePartition.hpp:24
Definition Application.hpp:19
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Represents information about an object in a scene.
Definition FlatScenePartition.hpp:33
AABox boundingBox
Definition FlatScenePartition.hpp:35
SceneObject sceneObject
Definition FlatScenePartition.hpp:34
Sphere boundingSphere
Definition FlatScenePartition.hpp:36