2018-10-06 20:39:40 -07:00
|
|
|
#pragma once
|
2015-05-06 00:20:44 -07:00
|
|
|
|
2016-03-04 15:03:26 -08:00
|
|
|
#include "zeus/CPlane.hpp"
|
|
|
|
#include "zeus/CAABox.hpp"
|
2016-07-20 22:19:57 -07:00
|
|
|
#include "zeus/CProjection.hpp"
|
2015-05-06 00:20:44 -07:00
|
|
|
|
2018-12-07 17:16:50 -08:00
|
|
|
namespace zeus {
|
|
|
|
class CFrustum {
|
|
|
|
CPlane planes[6];
|
|
|
|
bool valid = false;
|
2016-07-08 11:42:42 -07:00
|
|
|
|
2015-05-06 00:20:44 -07:00
|
|
|
public:
|
2018-12-07 17:16:50 -08:00
|
|
|
void updatePlanes(const CMatrix4f& viewMtx, const CMatrix4f& projection);
|
|
|
|
void updatePlanes(const CTransform& viewPointMtx, const CProjection& projection);
|
|
|
|
bool aabbFrustumTest(const CAABox& aabb) const;
|
|
|
|
bool sphereFrustumTest(const CSphere& sphere) const;
|
|
|
|
bool pointFrustumTest(const CVector3f& point) const;
|
2015-05-06 00:20:44 -07:00
|
|
|
};
|
2018-12-07 21:23:50 -08:00
|
|
|
} // namespace zeus
|