Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Toggle main menu visibility
Loading...
Searching...
No Matches
FrustumCulling.hpp
1
#pragma once
2
3
#include <Common/Rendering/RenderViewData.hpp>
4
5
namespace
Grindstone::Renderer
{
6
struct
CullingFrustum
{
7
bool
isOrtho;
// TODO: Remove this when ortho projection CreateFrustum is fixed.
8
float
nearRight;
9
float
nearTop;
10
float
nearDistance;
11
float
farDistance;
12
};
13
14
struct
AABB
{
15
glm::vec3 min;
16
glm::vec3 max;
17
};
18
19
struct
OBB
{
20
glm::vec3 center = {};
21
glm::vec3 extents = {};
22
glm::vec3 axes[3] = {};
23
};
24
25
bool
IsInFrustum(
const
CullingFrustum
& frustum,
const
glm::mat4& viewModelMatrix,
const
AABB
& aabb);
26
CullingFrustum
CreateFrustum(
const
Grindstone::Rendering::RenderViewData
& renderViewData);
27
}
Grindstone::Renderer
Definition
AttachmentInfo.hpp:15
Grindstone::Renderer::AABB
Definition
FrustumCulling.hpp:14
Grindstone::Renderer::CullingFrustum
Definition
FrustumCulling.hpp:6
Grindstone::Renderer::OBB
Definition
FrustumCulling.hpp:19
Grindstone::Rendering::RenderViewData
Definition
RenderViewData.hpp:7
plugins
Grindstone.Renderables.3D
include
FrustumCulling.hpp
Generated by
1.17.0