lmgl 1.0.0
A lightweight OpenGL graphics engine library written in C++
Loading...
Searching...
No Matches
lmgl::scene::Vertex Struct Reference

Represents a single vertex in 3D space. More...

#include <mesh.hpp>

Public Member Functions

 Vertex (const glm::vec3 &pos=glm::vec3(0.0f), const glm::vec3 &norm=glm::vec3(0.0f, 1.0f, 0.0f), const glm::vec4 &col=glm::vec4(1.0f), const glm::vec2 &uv=glm::vec2(0.0f))
 Constructor for the Vertex struct.
 

Public Attributes

glm::vec3 position
 Position of the vertex in 3D space.
 
glm::vec3 normal
 Normal vector at the vertex.
 
glm::vec4 color
 Color of the vertex.
 
glm::vec2 uvs
 Texture coordinates (UVs) of the vertex.
 
glm::vec3 tangent
 Texture tangent.
 
glm::vec3 bitangent
 Texture bitangetn.
 

Detailed Description

Represents a single vertex in 3D space.

The Vertex struct encapsulates the properties of a vertex, including its position, normal vector, color, and texture coordinates (UVs). This structure is commonly used in 3D graphics applications to define the attributes of vertices in a mesh.

Constructor & Destructor Documentation

◆ Vertex()

lmgl::scene::Vertex::Vertex ( const glm::vec3 & pos = glm::vec3(0.0f),
const glm::vec3 & norm = glm::vec3(0.0f, 1.0f, 0.0f),
const glm::vec4 & col = glm::vec4(1.0f),
const glm::vec2 & uv = glm::vec2(0.0f) )
inline

Constructor for the Vertex struct.

Initializes a Vertex with specified position, normal, color, and UVs. Default values are provided for each attribute.

Parameters
posPosition of the vertex (default is (0.0, 0.0, 0.0)).
normNormal vector at the vertex (default is (0.0, 1.0, 0.0)).
colColor of the vertex (default is (1.0, 1.0, 1.0, 1.0)).
uvTexture coordinates of the vertex (default is (0.0, 0.0)).

The documentation for this struct was generated from the following file: