resonance 1.0.1
Loading...
Searching...
No Matches
Frustum Class Reference

Six-plane view volume. More...

#include <frustum.h>

Collaboration diagram for Frustum:

Public Member Functions

Frustum & Set (float flNear, float flFar, float flFov, float flAspect)
 Build the six planes of a perspective view volume.

Public Attributes

Plane mFront
Plane mBack
Plane mLeft
Plane mRight
Plane mTop
Plane mBottom

Detailed Description

Six-plane view volume.

The class is not polymorphic and emits no RTTI descriptor, so the name is inferred. The member order and the member titles both come from the dump routine at 0x0054f798, which walks six consecutive quadwords and writes them under "\n\tfront:", "\n\tback:", "\n\tleft:", "\n\tright:", "\n\ttop:", and "\n\tbottom:". The order is therefore recovered rather than assumed, and it is not the order the per-vertex clip flags of Rnd::DrawVert use.

Member Function Documentation

◆ Set()

Frustum & Frustum::Set ( float flNear,
float flFar,
float flFov,
float flAspect )

Build the six planes of a perspective view volume.

Every plane is expressed in camera space. A caller that needs world space therefore transforms the result afterwards. Rnd::Cam::UpdateProjection() is the only caller recovered.

The four side planes pass through the origin unless flFov is zero. A zero flFov gives each side plane the distance of the unit offset it is built through.

Parameters
flNearDistance to the near plane.
flFarDistance to the far plane.
flFovField of view in radians.
flAspectVertical extent divided by the horizontal extent.
Returns
This view volume.
Ghidra address:
NTSC-U/C: 0x00550b78
Ghidra address:
PAL: 0x005911b8

Member Data Documentation

◆ mFront

Plane Frustum::mFront

◆ mBack

Plane Frustum::mBack

◆ mLeft

Plane Frustum::mLeft

◆ mRight

Plane Frustum::mRight

◆ mTop

Plane Frustum::mTop

◆ mBottom

Plane Frustum::mBottom

The documentation for this class was generated from the following file: