Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
Frustum.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
13#pragma once
14
15#include "../../core/Types.hpp"
16
17#include <glm/glm.hpp>
18
19namespace esengine {
20
21struct Plane {
22 glm::vec3 normal;
24 f32 signedDistance(const glm::vec3& point) const;
25};
26
27struct Frustum {
29 void extractFromMatrix(const glm::mat4& vp);
30 bool intersectsAABB(const glm::vec3& center, const glm::vec3& halfExtents) const;
33 bool intersectsSweptSphere(const glm::vec3& a, const glm::vec3& b, f32 radius) const;
34};
35
36} // namespace esengine
Core type definitions and utilities for ESEngine.
float f32
32-bit floating point
Definition Types.hpp:59
void extractFromMatrix(const glm::mat4 &vp)
bool intersectsAABB(const glm::vec3 &center, const glm::vec3 &halfExtents) const
Plane planes[6]
Definition Frustum.hpp:28
bool intersectsSweptSphere(const glm::vec3 &a, const glm::vec3 &b, f32 radius) const
f32 signedDistance(const glm::vec3 &point) const
glm::vec3 normal
Definition Frustum.hpp:22