Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Vertex.h
Go to the documentation of this file.
1#pragma once
2
3#include <glm/glm.hpp>
4
15struct Vertex {
16 Vertex() = default;
17 Vertex(glm::vec3 pos) : position(glm::vec4(pos, 0.0f)) {}
18
19 glm::vec4 position = glm::vec4(0.0f); // xyz = position, w = unused
20 glm::vec4 normal = glm::vec4(0.0f); // xyz = normal, w = unused
21 glm::vec4 tangent = glm::vec4(0.0f, 0.0f, 0.0f, 1.0f); // xyz = tangent, w = handedness (+1/-1)
22 glm::vec2 textureCoordinate = glm::vec2(0.0f);
23 glm::vec2 lightmapUvCoordinate = glm::vec2(0.0f);
24};
25
26static_assert(sizeof(Vertex) == 64, "Vertex struct size mismatch");
27
Converters from other number / vector systems into glm.
Definition Converter.cpp:24
The fundamental building block of all meshes in this engine.
Definition Vertex.h:15
glm::vec2 lightmapUvCoordinate
Definition Vertex.h:23
glm::vec4 normal
Definition Vertex.h:20
Vertex(glm::vec3 pos)
Definition Vertex.h:17
glm::vec4 tangent
Definition Vertex.h:21
glm::vec4 position
Definition Vertex.h:19
glm::vec2 textureCoordinate
Definition Vertex.h:22
Vertex()=default