wavelength 1.0.0
Loading...
Searching...
No Matches
frustum.h
Go to the documentation of this file.
1#pragma once
2
3#include "math/plane.h"
4#include "os/prnstream.h"
5
6class Sphere;
7
16class Frustum {
17public:
32 void Set(float flNear, float flFar, float flFov, float flAspect);
33
34 Plane mFront; // +0x00
35 Plane mBack; // +0x10
36 Plane mLeft; // +0x20
37 Plane mRight; // +0x30
38 Plane mTop; // +0x40
39 Plane mBottom; // +0x50
40};
41
53PrnStream &operator<<(PrnStream &stream, const Frustum &frustum);
54
56constexpr int kVu0StatusStickySign = 0x80;
57
71int IsSphereOutsideFrustum(const Sphere &sphere, const Frustum &frustum);
72
82bool IsPointInsideFrustum(const Vector3 &point, const Frustum &frustum);
Six-plane view volume.
Definition frustum.h:16
Plane mFront
Definition frustum.h:34
Plane mTop
Definition frustum.h:38
Plane mLeft
Definition frustum.h:36
Plane mRight
Definition frustum.h:37
Plane mBottom
Definition frustum.h:39
Plane mBack
Definition frustum.h:35
void Set(float flNear, float flFar, float flFov, float flAspect)
Build the six planes of a perspective view volume.
Text output stream.
Definition prnstream.h:16
Bounding sphere.
Definition sphere.h:17
PrnStream & operator<<(PrnStream &stream, const Frustum &frustum)
Write the six planes of a view volume.
constexpr int kVu0StatusStickySign
Bit of the VU0 status flag IsSphereOutsideFrustum() reports, the sticky sign flag.
Definition frustum.h:56
int IsSphereOutsideFrustum(const Sphere &sphere, const Frustum &frustum)
Report whether a sphere lies wholly outside at least one plane of a view volume.
bool IsPointInsideFrustum(const Vector3 &point, const Frustum &frustum)
Report whether a point lies on the inner side of every plane of a view volume.
Plane equation, padded to a PlayStation 2 quadword.
Definition plane.h:15
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14