SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Vertex Struct Reference

#include <MeshData.hpp>

Public Member Functions

 Vertex ()=default
 Vertex (float px, float py, float pz, float nx, float ny, float nz, float tx, float ty, float tz, float tw, float u=0.0f, float v=0.0f)
void SetColor (float r, float g, float b, float a)
void SetNormal (float x, float y, float z)
void SetPosition (float x, float y, float z)
void SetTexCoord (float u, float v)

Static Public Member Functions

static constexpr std::array< size_t, 6 > GetAttributeOffsets ()
static constexpr std::array< size_t, 6 > GetAttributeSizes ()
static constexpr size_t GetSize ()

Public Attributes

float a
float b
int boneIDs [4] = {-1, -1, -1, -1}
float boneWeights [4] = {0, 0, 0, 0}
float g
float nx
float ny
float nz
float px
float py
float pz
float r
float tw
float tx
float ty
float tz
float u
float v

Detailed Description

Standard 96-byte vertex format: position, normal, tangent, color, UV, and up to 4 skinning bone influences.

Definition at line 16 of file MeshData.hpp.

Constructor & Destructor Documentation

◆ Vertex() [1/2]

Sleak::Vertex::Vertex ( )
default

◆ Vertex() [2/2]

Sleak::Vertex::Vertex ( float px,
float py,
float pz,
float nx,
float ny,
float nz,
float tx,
float ty,
float tz,
float tw,
float u = 0.0f,
float v = 0.0f )
inline

Definition at line 27 of file MeshData.hpp.

Member Function Documentation

◆ GetAttributeOffsets()

constexpr std::array< size_t, 6 > Sleak::Vertex::GetAttributeOffsets ( )
inlinestaticconstexpr

Definition at line 62 of file MeshData.hpp.

◆ GetAttributeSizes()

constexpr std::array< size_t, 6 > Sleak::Vertex::GetAttributeSizes ( )
inlinestaticconstexpr

Definition at line 54 of file MeshData.hpp.

◆ GetSize()

constexpr size_t Sleak::Vertex::GetSize ( )
inlinestaticconstexpr

Definition at line 58 of file MeshData.hpp.

◆ SetColor()

void Sleak::Vertex::SetColor ( float r,
float g,
float b,
float a )
inline

Definition at line 46 of file MeshData.hpp.

◆ SetNormal()

void Sleak::Vertex::SetNormal ( float x,
float y,
float z )
inline

Definition at line 42 of file MeshData.hpp.

◆ SetPosition()

void Sleak::Vertex::SetPosition ( float x,
float y,
float z )
inline

Definition at line 38 of file MeshData.hpp.

◆ SetTexCoord()

void Sleak::Vertex::SetTexCoord ( float u,
float v )
inline

Definition at line 50 of file MeshData.hpp.

Member Data Documentation

◆ a

float Sleak::Vertex::a

Definition at line 20 of file MeshData.hpp.

◆ b

float Sleak::Vertex::b

Definition at line 20 of file MeshData.hpp.

◆ boneIDs

int Sleak::Vertex::boneIDs[4] = {-1, -1, -1, -1}

Definition at line 22 of file MeshData.hpp.

◆ boneWeights

float Sleak::Vertex::boneWeights[4] = {0, 0, 0, 0}

Definition at line 23 of file MeshData.hpp.

◆ g

float Sleak::Vertex::g

Definition at line 20 of file MeshData.hpp.

◆ nx

float Sleak::Vertex::nx

Definition at line 18 of file MeshData.hpp.

◆ ny

float Sleak::Vertex::ny

Definition at line 18 of file MeshData.hpp.

◆ nz

float Sleak::Vertex::nz

Definition at line 18 of file MeshData.hpp.

◆ px

float Sleak::Vertex::px

Definition at line 17 of file MeshData.hpp.

◆ py

float Sleak::Vertex::py

Definition at line 17 of file MeshData.hpp.

◆ pz

float Sleak::Vertex::pz

Definition at line 17 of file MeshData.hpp.

◆ r

float Sleak::Vertex::r

Definition at line 20 of file MeshData.hpp.

◆ tw

float Sleak::Vertex::tw

Definition at line 19 of file MeshData.hpp.

◆ tx

float Sleak::Vertex::tx

Definition at line 19 of file MeshData.hpp.

◆ ty

float Sleak::Vertex::ty

Definition at line 19 of file MeshData.hpp.

◆ tz

float Sleak::Vertex::tz

Definition at line 19 of file MeshData.hpp.

◆ u

float Sleak::Vertex::u

Definition at line 21 of file MeshData.hpp.

◆ v

float Sleak::Vertex::v

Definition at line 21 of file MeshData.hpp.