14#include <glm/vec2.hpp>
15#include <glm/vec3.hpp>
16#include <glm/vec4.hpp>
17#include <glm/mat4x4.hpp>
glm::vec2 Vec2
2-component floating-point vector (xy).
@ WORLD
3D world coordinates, projected with the scene camera.
glm::mat4 Mat4
4×4 floating-point matrix.
glm::vec3 Vec3
3-component floating-point vector (xyz).
constexpr Color DEFAULT_COLOR
The default mesh color: a neutral light gray (0.7, 0.7, 0.7).
PlaneSpace
Coordinate space in which a ClipPlane is defined.
@ WORLD
World (scene) space: the plane is fixed in the scene, so it does not move when the camera moves.
@ EYE
Eye (view/camera) space: the plane is anchored to the camera and therefore travels and rotates with i...
constexpr Color WHITE
An opaque white color (1, 1, 1, 1).
FogSpace
Coordinate space (and hence the unit) of the fog distances RenderOptions::fog_start and RenderOptions...
@ NDC
Normalized device depth: the raw values of the depth buffer, in [-1, 1], where -1 is the near plane,...
constexpr Color TRANSPARENT_BLACK
A fully transparent black color (0, 0, 0, 0).
glm::vec4 Vec4
4-component floating-point vector (xyzw).
A clipping plane that can hide parts of the scene.
Vec3 normal
The plane normal vector.
float offset
Signed distance of the plane from the origin along normal.
PlaneSpace space
The space ClipPlane::normal and ClipPlane::offset refer to.
An RGBA color with floating-point components.
float g
Green channel, [0, 1].
float r
Red channel, [0, 1].
float b
Blue channel, [0, 1].
constexpr Color()=default
float a
Alpha (opacity) channel, [0, 1]. 1.0 = fully opaque.
constexpr Color(float r_, float g_, float b_, float a_=1.0f)
Construct a Color from RGBA values.
A light source for the Blinn-Phong shading model.
bool is_directional
Whether this is a directional light (default: true).
Color color
Color of the light (default: white).
Vec3 position
Position of the light.
float intensity
Brightness multiplier (default: 1.0).
A triangle defined by three vertex indices.
uint32_t v2
Index of the third vertex in Mesh::vertices.
uint32_t v1
Index of the second vertex in Mesh::vertices.
uint32_t v0
Index of the first vertex in Mesh::vertices.
int x
Left edge of the bitmap, in image pixels.