Raftel Engine
 
Loading...
Searching...
No Matches
Raftel::Vertex Struct Reference

Represents a 3D vertex with attributes like position, normal, and texture coordinates. More...

#include <mesh.hpp>

Public Member Functions

 Vertex ()=default
 Default constructor for the Vertex structure.
 
 Vertex (const glm::vec3 &position, const glm::vec3 &normal, const glm::vec2 &texCoord)
 Constructor for the Vertex structure.
 
bool operator== (const Vertex &other) const
 

Public Attributes

glm::vec3 position
 The position of the vertex in 3D space.
 
glm::vec3 normal
 The normal vector of the vertex for lighting calculations.
 
glm::vec2 texCoord
 The texture coordinates of the vertex.
 

Detailed Description

Represents a 3D vertex with attributes like position, normal, and texture coordinates.

The Vertex structure is used to store vertex data for a 3D mesh, including position, normal vector, and texture coordinates. This structure is typically used as input to shaders for rendering the mesh.

Definition at line 54 of file mesh.hpp.

Constructor & Destructor Documentation

◆ Vertex()

Raftel::Vertex::Vertex ( const glm::vec3 & position,
const glm::vec3 & normal,
const glm::vec2 & texCoord )
inline

Constructor for the Vertex structure.

Parameters
positionThe position of the vertex.
normalThe normal vector of the vertex.
texCoordsThe texture coordinates of the vertex.

Definition at line 70 of file mesh.hpp.

Member Function Documentation

◆ operator==()

bool Raftel::Vertex::operator== ( const Vertex & other) const
inline

Definition at line 74 of file mesh.hpp.

Member Data Documentation

◆ normal

glm::vec3 Raftel::Vertex::normal

The normal vector of the vertex for lighting calculations.

Definition at line 56 of file mesh.hpp.

◆ position

glm::vec3 Raftel::Vertex::position

The position of the vertex in 3D space.

Definition at line 55 of file mesh.hpp.

◆ texCoord

glm::vec2 Raftel::Vertex::texCoord

The texture coordinates of the vertex.

Definition at line 57 of file mesh.hpp.


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