Files
mcpe/source/client/renderer/Frustum.hpp
2023-08-05 15:34:07 +03:00

39 lines
973 B
C++

/********************************************************************
Minecraft: Pocket Edition - Decompilation Project
Copyright (C) 2023 iProgramInCpp
The following code is licensed under the BSD 1 clause license.
SPDX-License-Identifier: BSD-1-Clause
********************************************************************/
#pragma once
#include "client/common/Matrix.hpp"
#include "client/common/AABB.hpp"
class Frustum
{
public:
void normalizePlane(Matrix*, int);
//it's inlined in GameRenderer
static void doOurJobInGameRenderer();
static Frustum frustum;
public:
Matrix m[19];
};
class FrustumData
{
public:
bool pointInFrustum(float x, float y, float z);
bool sphereInFrustum(float x, float y, float z, float radius);
bool cubeFullyInFrustum(float x1, float y1, float z1, float x2, float y2, float z2);
bool cubeInFrustum(float x1, float y1, float z1, float x2, float y2, float z2);
bool cubeInFrustum(const AABB& aabb);
public:
Frustum x;
};