14#include <glm/vec2.hpp>
15#include <glm/vec3.hpp>
16#include <glm/vec4.hpp>
17#include <glm/mat4x4.hpp>
101 constexpr Color(
float r_,
float g_,
float b_,
float a_ = 1.0f)
102 :
r(r_),
g(g_),
b(b_),
a(a_) {}
glm::vec2 Vec2
2-component floating-point vector (xy).
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).
constexpr Color WHITE
An opaque white color (1, 1, 1, 1).
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 (should be unit-length).
float offset
Offset along the normal.
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.