coastline 0.0.4
Loading...
Searching...
No Matches
scenerenderer.h File Reference

The renderer of the converted models and of flat pictures and text, on the GPU of SDL. More...

#include <array>
#include <cstddef>
#include <cstdint>
#include <filesystem>
#include <functional>
#include <memory>
#include <optional>
#include <span>
#include <string>
#include <vector>
#include <SDL3/SDL.h>
Include dependency graph for scenerenderer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  coastline::Lighting
 The lights of a model, an ambient colour and a directional colour from a direction in the space the model is placed in. More...
struct  coastline::MorphPose
 The pose of the vertices of an animated model: two keys and the share of the second. More...
struct  coastline::VertexAnimationInfo
 A vertex animation of a model, as the game plays it. More...
struct  coastline::Reflection
 The reflection of the sky on a car: the image the parts whose texture coordinates come from their normals sample, the axes those coordinates follow, and the column of the image the window starts at, as the tile of the reflection of the race takes it. More...
struct  coastline::Highlight
 The specular highlight of a car, as the PC release generates its coordinates for the tile of gDPSetHilite1Tile(): a quarter of the dot of the normal with each axis across the texture, from the offset of the tile, added to the colour drawn where the depth is equal. More...
struct  coastline::Fog
 The fog of the PC release: each vertex shows the share of its colour of the range by the reciprocal of its w, a share below 8 of 255 none, and the rest is the colour of the fog. More...
struct  coastline::CarShadow
 The shadow of a car on the track, as RenderTrackInstance() lays its texture on the ground under the car: 1024 across the texture, centred under the car, along and across its heading. More...
struct  coastline::ImageDamage
 The damage of an image of a car, as LoadCarPaintTextures() damages the image of a paint set. More...
struct  coastline::ModelOptions
 What of a glTF document a RenderModel takes, and how. More...
class  coastline::RenderDocument
 A glTF document of the import on the GPU, read and decoded once for every RenderModel of its parts: its vertices, its animations, and the images no paint colours. More...
class  coastline::RenderModel
 A converted model on the GPU: its meshes, its parts, and its animations. More...
class  coastline::VertexDisplacement
 How far each vertex of a model is moved on the GPU, such as by the dents of a car. More...
class  coastline::RenderTexture
 A texture of the renderer for flat pictures and text. More...
struct  coastline::FlatVertex
 A corner of a flat quad: its place in the space of the flat draws, its texels, and its colour. More...
class  coastline::RenderQuadBuffer
 Persistent quad slots, updated independently and drawn in a caller-specified order. More...
struct  coastline::FlatMaterial
 How a run of flat quads is coloured: the textures and the colour combiner of the RDP. More...
class  coastline::SceneRenderer
 The renderer of a frame. More...

Namespaces

namespace  coastline

Typedefs

using coastline::Matrix4 = std::array<float, 16>
 A 4 by 4 matrix, column by column.
using coastline::CarDamage = std::array<int, CAR_DAMAGE_SIDES>
 The levels of damage of the sides of a car, each from 0 for none to CAR_DAMAGE_LEVELS.

Functions

Matrix4 coastline::MultiplyMatrices (const Matrix4 &a, const Matrix4 &b)
std::optional< MorphPose > coastline::PoseAtTime (const VertexAnimationInfo &animation, float time)
 The pose of a vertex animation at a time, as the console blends its keys.

Variables

constexpr Matrix4 coastline::IDENTITY_MATRIX {1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1}
 The matrix that changes nothing.
constexpr std::array< std::array< float, 3 >, 4 > coastline::CLEAR_LIGHT_RAMP
 The ambient colours of a ramped instance of a track on a clear day, from 0 to 1.
constexpr std::size_t coastline::MAX_CAR_SHADOWS = 4
 The most shadows of cars that fall on an instance of a track.
constexpr int coastline::CAR_DAMAGE_SIDES = 8
 The number of sides of a car that take damage, as IncrementDamageTextureLevel() counts them.
constexpr int coastline::CAR_DAMAGE_LEVELS = 3
 The levels of damage of a car after the first, as LoadCarPaintTextures() makes them.

Detailed Description

The renderer of the converted models and of flat pictures and text, on the GPU of SDL.