mirror of
https://github.com/AxioDL/zeus.git
synced 2025-07-04 12:15:56 +00:00
Alternate call for CFrustum plane generation
This commit is contained in:
parent
69627f4bf3
commit
8702ae7d97
@ -12,10 +12,9 @@ class CFrustum
|
|||||||
CPlane planes[6];
|
CPlane planes[6];
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline void updatePlanes(const CTransform& modelview, const CProjection& projection)
|
inline void updatePlanes(const CMatrix4f& modelview, const CMatrix4f& projection)
|
||||||
{
|
{
|
||||||
CMatrix4f mv = modelview.toMatrix4f();
|
CMatrix4f mvp = projection * modelview;
|
||||||
CMatrix4f mvp = projection.getCachedMatrix() * mv;
|
|
||||||
CMatrix4f mvp_rm = mvp.transposed();
|
CMatrix4f mvp_rm = mvp.transposed();
|
||||||
|
|
||||||
#if __SSE__
|
#if __SSE__
|
||||||
@ -85,6 +84,11 @@ public:
|
|||||||
planes[5].normalize();
|
planes[5].normalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline void updatePlanes(const CTransform& modelview, const CProjection& projection)
|
||||||
|
{
|
||||||
|
updatePlanes(modelview.toMatrix4f(), projection.getCachedMatrix());
|
||||||
|
}
|
||||||
|
|
||||||
inline bool aabbFrustumTest(const CAABox& aabb) const
|
inline bool aabbFrustumTest(const CAABox& aabb) const
|
||||||
{
|
{
|
||||||
CVector3f vmin, vmax;
|
CVector3f vmin, vmax;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user