wavelength 1.0.0
Loading...
Searching...
No Matches
pscam.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4
5#include "math/frustum.h"
6#include "math/transform.h"
7#include "math/vector3.h"
8#include "os/mem.h"
9#include "rnd/rndcam.h"
10
18class PsCam : public RndCam {
19public:
27 explicit PsCam(const char *pszName);
28
33 ~PsCam() override;
34
41 void *operator new(size_t nSize) {
42 return PoolMemAlloc(static_cast<int>(nSize), "Cam", 0);
43 }
44
50 void operator delete(void *pBlock) {
51 PoolMemFree(pBlock);
52 }
53
70 int DrawShowing() override;
71
80 static void Init();
81
90 static RndObject *New(const char *pszName) {
91 return new PsCam(pszName);
92 }
93};
94
95// The globals below are the draw state PsCam::DrawShowing() sets up for the mesh and particle
96// paths. Every title is inferred from the computation that fills the global.
97
108
115
122
129
136
143
150
Six-plane view volume.
Definition frustum.h:16
static void Init()
Install the camera factory and build the default camera.
PsCam(const char *pszName)
Construct a camera with the default projection.
~PsCam() override
int DrawShowing() override
Make this camera the one the frame is drawn through.
static RndObject * New(const char *pszName)
Create a camera.
Definition pscam.h:90
RndCam(const char *pszName)
Construct a camera looking along y with a quarter-turn field of view, from 1 to 1000 units.
RndObject(const char *pszName)
Construct an object and register it under a name.
void * PoolMemAlloc(int nSize, const char *pszTag, int nAlign)
Allocate a block from the pool heaps and bill it to a tag.
void PoolMemFree(void *pBlock)
Return a block PoolMemAlloc() handed out to the pool heap that owns it.
Transform g_viewportUnscaledXfm
Clip to GS coordinate transform without the guard band scaling.
Frustum g_drawFrustum
The view volume widened by the guard band, in world space.
Transform g_viewProjectUnscaledXfm
World to clip transform without the guard band widening.
Transform g_viewProjectXfm
World to clip transform, the projection widened by the guard band.
Transform g_viewportXfm
Clip to GS coordinate transform, scaled by the guard band.
Vector3 g_particleProjectScale
The widened projection scale on each axis, with y negated, and two zero components.
Vector3 g_invGuardBandScale
Reciprocal of the factor the view is widened by on each axis before clipping.
Transform g_viewProjectBiasedXfm
g_viewProjectXfm with the depth of a perspective projection moved one depth unit nearer.
Affine transform stored as three basis rows and a translation row.
Definition transform.h:18
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14