The models of the track and the cars of a race, and their drawing from the state of the race.
More...
#include <raceview.h>
|
| | ~RaceView () |
| | Release race rendering resources before the renderer's GPU device is destroyed.
|
| | RaceView (const RaceView &)=delete |
| | Prevent copying renderer-bound race resources.
|
| RaceView & | operator= (const RaceView &)=delete |
| | Prevent assignment of renderer-bound race resources.
|
| void | Draw (SceneRenderer &renderer, float share) const |
| | Draw each view of the race from the active camera of its vehicle, the views laid out as the race lays them out, blended between the last two frames of the race as the PC release blends them, and the HUD of each view over it.
|
| void | ToggleFreeCamera () |
| | Toggle a free camera initialised from the first viewport without changing race cameras.
|
| bool | FreeCameraEnabled () const |
| void | MoveFreeCamera (float seconds, const std::array< float, 3 > &movement, const std::array< float, 2 > &rotation) |
| | Move the free camera independently of simulation time, including while paused.
|
| std::array< float, 4 > | ClearColor () const |
The models of the track and the cars of a race, and their drawing from the state of the race.
◆ ~RaceView()
| coastline::RaceView::~RaceView |
( |
| ) |
|
Release race rendering resources before the renderer's GPU device is destroyed.
◆ RaceView()
| coastline::RaceView::RaceView |
( |
const RaceView & | | ) |
|
|
delete |
Prevent copying renderer-bound race resources.
◆ Load()
Read the models of a track and the cars of the import.
- Parameters
-
| renderer | The renderer that draws them. |
| defaults | The directory of the assets of the selected pack. |
| track | The track, an index of g_apszTrackFilenames. |
| cars | The car of each vehicle of the race, from the first. A vehicle that takes another car or colour during the race loads it as it is drawn. |
- Returns
- The view, or nothing with the reason logged.
◆ operator=()
Prevent assignment of renderer-bound race resources.
◆ Draw()
| void coastline::RaceView::Draw |
( |
SceneRenderer & | renderer, |
|
|
float | share ) const |
Draw each view of the race from the active camera of its vehicle, the views laid out as the race lays them out, blended between the last two frames of the race as the PC release blends them, and the HUD of each view over it.
- Parameters
-
| renderer | The renderer of the frame, between Begin() and End(). |
| share | How far the frame is from the previous frame of the race to the current one, from 0 to 1. |
◆ ToggleFreeCamera()
| void coastline::RaceView::ToggleFreeCamera |
( |
| ) |
|
Toggle a free camera initialised from the first viewport without changing race cameras.
Enabling requires an active camera in the first viewport.
◆ FreeCameraEnabled()
| bool coastline::RaceView::FreeCameraEnabled |
( |
| ) |
const |
- Returns
- Whether the free camera replaces the first viewport and hides the HUD.
◆ MoveFreeCamera()
| void coastline::RaceView::MoveFreeCamera |
( |
float | seconds, |
|
|
const std::array< float, 3 > & | movement, |
|
|
const std::array< float, 2 > & | rotation ) |
Move the free camera independently of simulation time, including while paused.
- Parameters
-
| seconds | Frame duration in seconds, clamped to [0, 0.1]. |
| movement | Forward, rightward, and upward motion in world units per second. |
| rotation | Yaw and pitch changes in radians for this frame. |
◆ ClearColor()
| std::array< float, 4 > coastline::RaceView::ClearColor |
( |
| ) |
const |
- Returns
- The colour the frame clears to: the fog of the race in a single view, and black around the views of a split screen.
The documentation for this class was generated from the following file: