3#include "../types/types.hpp"
4#include "../util/color.hpp"
15 float x{0.0f},
y{0.0f},
z{0.0f};
20 constexpr Vertex() noexcept = default;
31 :
x(_x),
y(_y),
z(_z),
color(c),
uv(texCoord) {}
40 constexpr Vertex(
float _x,
float _y,
float _z,
const Color& c) noexcept
49 constexpr Vertex(
float _x,
float _y,
float _z) noexcept
59 :
Vertex(v.x, v.y, v.z, c, texCoord) {}
67 :
Vertex(v.x, v.y, v.z, c) {}
const Color BLACK(0, 0, 0)
Black.
Definition audiomanager.cpp:4
RGBA color stored as normalized floating-point components.
Definition color.hpp:12
Two-component floating-point vector.
Definition vector2.hpp:13
Three-component floating-point vector.
Definition vector3.hpp:13
A single renderable vertex: position, color and texture coordinate.
Definition vertex.hpp:14
Color color
Vertex color.
Definition vertex.hpp:16
constexpr Vertex() noexcept=default
Constructs a vertex at the origin, black, with zero UV.
constexpr Vertex(float _x, float _y, float _z, const Color &c) noexcept
Constructs a colored vertex with a zero texture coordinate.
Definition vertex.hpp:40
Vector2 uv
Texture coordinate.
Definition vertex.hpp:17
float z
Position components.
Definition vertex.hpp:15
float y
Definition vertex.hpp:15
float x
Definition vertex.hpp:15
constexpr Vertex(float _x, float _y, float _z) noexcept
Constructs a black vertex from explicit components.
Definition vertex.hpp:49
constexpr Vertex(const Vector3 &v, const Color &c) noexcept
Constructs a colored vertex from a position vector.
Definition vertex.hpp:66
constexpr Vertex(const Vector3 &v) noexcept
Constructs a black vertex from a position vector.
Definition vertex.hpp:73
constexpr Vertex(const Vector3 &v, const Color &c, const Vector2 &texCoord) noexcept
Constructs a fully specified vertex from a position vector.
Definition vertex.hpp:58