resonance 1.0.1
Loading...
Searching...
No Matches
frustum.h
Go to the documentation of this file.
1#pragma once
2
3#include "math/plane.h"
4
5namespace Rnd {
6class Dbg;
7} // namespace Rnd
8class Sphere;
9
19class Frustum {
20public:
38 Frustum &Set(float flNear, float flFar, float flFov, float flAspect);
39
40 Plane mFront; // +0x00
41 Plane mBack; // +0x10
42 Plane mLeft; // +0x20
43 Plane mRight; // +0x30
44 Plane mTop; // +0x40
45 Plane mBottom; // +0x50
46};
47
60Rnd::Dbg &operator<<(Rnd::Dbg &sink, const Frustum &frustum);
61
63constexpr int kVu0StatusStickySign = 0x80;
64
79int IsSphereOutsideFrustum(const Sphere &sphere, const Frustum &frustum);
Six-plane view volume.
Definition frustum.h:19
Plane mFront
Definition frustum.h:40
Plane mTop
Definition frustum.h:44
Plane mLeft
Definition frustum.h:42
Plane mRight
Definition frustum.h:43
Frustum & Set(float flNear, float flFar, float flFov, float flAspect)
Build the six planes of a perspective view volume.
Plane mBottom
Definition frustum.h:45
Plane mBack
Definition frustum.h:41
Sink that the engine formats its diagnostic and failure text into.
Definition dbg.h:33
Bounding sphere.
Definition sphere.h:15
constexpr int kVu0StatusStickySign
Bit of the VU0 status flag IsSphereOutsideFrustum() reports, the sticky sign flag.
Definition frustum.h:63
Rnd::Dbg & operator<<(Rnd::Dbg &sink, const Frustum &frustum)
Write the six planes of a view volume to a diagnostic sink.
int IsSphereOutsideFrustum(const Sphere &sphere, const Frustum &frustum)
Report whether a sphere lies wholly outside at least one plane of a view volume.
The rendering engine.
Definition animhelper.h:3
Plane equation, padded to a PlayStation 2 quadword.
Definition plane.h:14