4#include "../util/color.hpp"
5#include "../types/vector3.hpp"
50 Vector3 B(r.pos.x + r.width, r.pos.y, r.pos.z);
51 Vector3 C(
B.x, r.pos.y + r.height, r.pos.z);
Definition audiomanager.cpp:4
std::array< Triangle, 2 > rectToTriangle(const Rectangle &r) noexcept
Splits a rectangle into the two triangles that cover it.
Definition triangle.hpp:48
Triangle makeTriangle(const Vector3 &a, const Vector3 &b, const Vector3 &c, const Color &color) noexcept
Builds a triangle from three positions sharing a single color.
Definition triangle.hpp:35
RGBA color stored as normalized floating-point components.
Definition color.hpp:12
An axis-aligned rectangle with a position, size and color.
Definition rectangle.hpp:21
A triangle defined by three vertices.
Definition triangle.hpp:14
constexpr Triangle(const Vertex &v1, const Vertex &v2, const Vertex &v3) noexcept
Constructs a triangle from three vertices.
Definition triangle.hpp:23
std::array< Vertex, 3 > vertices
The triangle's three corner vertices.
Definition triangle.hpp:15
Three-component floating-point vector.
Definition vector3.hpp:13
A single renderable vertex: position, color and texture coordinate.
Definition vertex.hpp:14