|
wavelength 1.0.0
|
The camera of the tunnel. More...
#include <playercamfx.h>
Public Types | |
| typedef void(PlayerCamFX::* | Algorithm) (GfxTunnel *, Transform &, Transform &, int, bool) |
| An algorithm that places the camera for a player. | |
Public Member Functions | |
| PlayerCamFX (int nPlayer, int nNumTracks, bool bBoss) | |
| Find the camera objects and the intro animation. | |
| ~PlayerCamFX () | |
| Release the camera. | |
| void | Poll (GfxTunnel *pTunnel, GfxArena *pArena, float flTick, float flTime) |
| Place the camera objects for a frame. | |
| void | SetSlide (const Transform *pXfm, float flBlend) |
| Slide the view towards a transform, or stop sliding. | |
| void | SetZoomedOut (int nZoomedOut) |
| Select the far pull back, and start the pull back to it. | |
| void | SetZoom (float flZoom) |
| Set a pull back as a multiple of the far one, and start the pull back to it. | |
| void | Reset (bool bNearPullBack) |
| Return the camera to its start. | |
| void | Kick (float flAmount) |
| Kick the jiggle of the camera. | |
| void | SetBlendAlgorithm (const char *pszName, float flBlend) |
| Blend in a second algorithm by its name. | |
| void | SetBlend (float flBlend) |
| Set the blend towards the second algorithm. | |
| const Transform & | GetCamera () const |
| const Transform & | GetView () const |
| float | GetPullBackLevel () const |
| int | GetZoomedOut () const |
| const Vector3 * | GetScreenJiggle () const |
Static Public Member Functions | |
| static void | LoadConfig (DataArray *pConfig, DataArray *pDefaults, GfxTunnel *pTunnel, int nOption) |
| Load the shared settings, and register the algorithms. | |
The camera of the tunnel.
It follows a player with one of a set of algorithms.
The class is not polymorphic. The name comes from the type of the algorithm table, a map of pointers to members of PlayerCamFX. The object is 0x1f0 bytes. An algorithm places the camera behind a frame of the tunnel. The view then pulls back from the camera along the frame, plays the intro fly-in before the song starts, slides towards a transform the tunnel supplies, and jiggles when kicked.
| typedef void(PlayerCamFX::* PlayerCamFX::Algorithm) (GfxTunnel *, Transform &, Transform &, int, bool) |
An algorithm that places the camera for a player.
The first transform receives the frame of the track and the second the camera. The integer is the player and the flag records a game of several players on one console.
| PlayerCamFX::PlayerCamFX | ( | int | nPlayer, |
| int | nNumTracks, | ||
| bool | bBoss ) |
Find the camera objects and the intro animation.
| nPlayer | The player the camera follows. |
| nNumTracks | The number of tracks. It places the centre of the tunnel. |
| bBoss | Whether the song is a boss song. A boss song selects the boss intro. |
| PlayerCamFX::~PlayerCamFX | ( | ) |
Release the camera.
Place the camera objects for a frame.
| pTunnel | The tunnel. |
| pArena | The arena of the tunnel. The routine does not read it. |
| flTick | The tick of the song. The intro runs while the tick is early enough. |
| flTime | The time of the song. The pull back runs over it. |
| void PlayerCamFX::SetSlide | ( | const Transform * | pXfm, |
| float | flBlend ) |
Slide the view towards a transform, or stop sliding.
| pXfm | The transform, or null to stop. |
| flBlend | How far the view slides, from 0 to 1. |
|
static |
Load the shared settings, and register the algorithms.
| pConfig | The configuration. |
| pDefaults | The defaults of the configuration. |
| pTunnel | The tunnel. The routine does not read it. |
| nOption | The fourth argument every loader of the tunnel receives. A non-zero value skips the registration of the algorithms. |
| void PlayerCamFX::SetZoomedOut | ( | int | nZoomedOut | ) |
Select the far pull back, and start the pull back to it.
| nZoomedOut | Non-zero for the far pull back. |
| void PlayerCamFX::SetZoom | ( | float | flZoom | ) |
Set a pull back as a multiple of the far one, and start the pull back to it.
| flZoom | The multiple, or 0 to use the near or far pull back. |
| void PlayerCamFX::Reset | ( | bool | bNearPullBack | ) |
Return the camera to its start.
The intro is not played again.
| bNearPullBack | Take the near pull back at once rather than the selected one. |
| void PlayerCamFX::Kick | ( | float | flAmount | ) |
Kick the jiggle of the camera.
A camera at rest also takes new random directions to jiggle in.
| flAmount | The speed the kick adds. |
| void PlayerCamFX::SetBlendAlgorithm | ( | const char * | pszName, |
| float | flBlend ) |
Blend in a second algorithm by its name.
| pszName | The name, or null for no second algorithm. |
| flBlend | The blend towards the second algorithm, from 0 to 1. |
| void PlayerCamFX::SetBlend | ( | float | flBlend | ) |
Set the blend towards the second algorithm.
| flBlend | The blend, from 0 to 1. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |