Struct Vertex

Struct Documentation

struct Vertex

All data about a given vertex in a mesh.

Public Functions

inline Vertex(glm::vec3 position, glm::vec2 texCoords = glm::vec2(0.0f), glm::vec3 tangent = glm::vec3(0.0f), glm::vec3 bitangent = glm::vec3(0.0f), glm::vec3 normal = glm::vec3(0.0f))

Create a new vertex.

Parameters:
  • position – The position in local space

  • texCoords – The texture coordinates (optional, defaults to {0, 0})

  • tangent – The right vector in tangent space (optional, defaults to {0, 0, 0})

  • bitangent – The front vector in tangent space (optional, defaults to {0, 0, 0})

  • normal – The up vector in tangent space (optional, defaults to {0, 0, 0})

Public Members

const glm::vec3 position

The position in local space.

const glm::vec2 texCoords

The texture coordinates.

const glm::vec3 tangent

The right vector in tangent space.

const glm::vec3 bitangent

The front vector in tangent space.

const glm::vec3 normal

The up vector in tangent space.