Brunot
Loading...
Searching...
No Matches
Vertex.h
Go to the documentation of this file.
1
10
// ____ __ __ __
11
// /\__ _\/\ \ /\ \/\ \
12
// \/_/\ \/\ \ \___ __ \ \ \_\ \ ___ __ __ ____ __
13
// \ \ \ \ \ _ `\ /'__`\ \ \ _ \ / __`\/\ \/\ \ /',__\ /'__`\
14
// \ \ \ \ \ \ \ \/\ __/ \ \ \ \ \/\ \L\ \ \ \_\ \/\__, `\/\ __/
15
// \ \_\ \ \_\ \_\ \____\ \ \_\ \_\ \____/\ \____/\/\____/\ \____\
16
// \/_/ \/_/\/_/\/____/ \/_/\/_/\/___/ \/___/ \/___/ \/____/
17
18
19
#pragma once
20
#include "
Utility/Math/Vector4D.h
"
21
22
namespace
gfx
23
{
24
25
26
struct
Vertex
27
{
28
Eigen::Vector2f
position
;
// The position of the vertex relative to the mesh
29
Eigen::Vector2f
textureCoord
;
// the texture coordinate associated with this vertex
30
Eigen::Vector4f
color
;
// the color applied to this vertex
31
32
// Constructor for ease of use
33
Vertex
(Eigen::Vector2f
pos
, Eigen::Vector2f uv_, Eigen::Vector4f colr)
34
:
position
(std::move(
pos
)),
textureCoord
(std::move(uv_)),
color
(std::move(colr))
35
{
36
}
37
38
Vertex
(
const
Vector4D
&
pos
,
const
Vector4D
& uv_,
const
Vector4D
& colr)
39
:
position
({
pos
.x(),
pos
.y()})
40
,
textureCoord
({uv_.x(), uv_.y()})
41
,
color
({colr.x(), colr.y(), colr.z(), colr.w()})
42
{
43
44
}
45
};
46
47
}
pos
static int pos[2]
Definition
Editor.cpp:69
Vector4D.h
gfx
Definition
VAO.h:23
Vector4D
Definition
Vector4D.h:23
gfx::Vertex::color
Eigen::Vector4f color
Definition
Vertex.h:30
gfx::Vertex::Vertex
Vertex(const Vector4D &pos, const Vector4D &uv_, const Vector4D &colr)
Definition
Vertex.h:38
gfx::Vertex::textureCoord
Eigen::Vector2f textureCoord
Definition
Vertex.h:29
gfx::Vertex::position
Eigen::Vector2f position
Definition
Vertex.h:28
gfx::Vertex::Vertex
Vertex(Eigen::Vector2f pos, Eigen::Vector2f uv_, Eigen::Vector4f colr)
Definition
Vertex.h:33
The House
source
Graphics
Vertex.h
Generated by
1.15.0