sculpto
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
scl::vertex Struct Reference

#include <vertex.h>

Public Member Functions

 vertex ()=default
 
 vertex (const vec3 &Position, const vec3 &Normal, const vec3 &Tangent, const vec3 &Bitangent, const vec2 &TexCoords)
 
 vertex (const vec3 &Position, const vec3 &Normal, const vec2 &TexCoords)
 

Static Public Member Functions

static vertex_layout GetVertexLayout ()
 

Public Attributes

vec3 Position {}
 
vec3 Normal {}
 
vec3 Tangent {}
 
vec3 Bitangent {}
 
vec2 TexCoords {}
 

Detailed Description

Default vertex structure.

Definition at line 80 of file vertex.h.

Constructor & Destructor Documentation

◆ vertex() [1/3]

scl::vertex::vertex ( )
default

Vertex texture cordinate.

Vertex default constructor.

◆ vertex() [2/3]

scl::vertex::vertex ( const vec3 Position,
const vec3 Normal,
const vec3 Tangent,
const vec3 Bitangent,
const vec2 TexCoords 
)
inline
  • Veretex contructor by texture coordinates. It is implied that the color attribute will not be used.
Parameters
Position- vertex position.
Normal- vertex surface normal.
Tangent,Bitangent- vertex surface tangent space basis vectors.
TexCoords- vertex texture coordinates.

Definition at line 100 of file vertex.h.

100 :
vec3 Normal
Definition: vertex.h:83
vec3 Bitangent
Definition: vertex.h:85
vec3 Position
Definition: vertex.h:82
vec2 TexCoords
Definition: vertex.h:86
vec3 Tangent
Definition: vertex.h:84

◆ vertex() [3/3]

scl::vertex::vertex ( const vec3 Position,
const vec3 Normal,
const vec2 TexCoords 
)
inline
  • Veretex contructor by texture coordinates. It is implied that the color attribute will not be used.
Parameters
Position- vertex position.
Normal- vertex surface normal.
TexCoords- vertex texture coordinates.

Definition at line 111 of file vertex.h.

Member Function Documentation

◆ GetVertexLayout()

static vertex_layout scl::vertex::GetVertexLayout ( )
inlinestatic
  • Vertex layout, describing all vertex atributes getter function.
Parameters
None.
Returns
vertex layout.

Definition at line 120 of file vertex.h.

121 {
122 return vertex_layout({
123 { shader_variable_type::FLOAT3, "Position" },
124 { shader_variable_type::FLOAT3, "Normal" },
125 { shader_variable_type::FLOAT3, "Tangent" },
126 { shader_variable_type::FLOAT3, "Bitangent" },
127 { shader_variable_type::FLOAT2, "TexCoord" },
128 });
129 };

Member Data Documentation

◆ Bitangent

vec3 scl::vertex::Bitangent {}

Vertex tangent space first vector.

Definition at line 85 of file vertex.h.

◆ Normal

vec3 scl::vertex::Normal {}

Vertex position.

Definition at line 83 of file vertex.h.

◆ Position

vec3 scl::vertex::Position {}

Definition at line 82 of file vertex.h.

◆ Tangent

vec3 scl::vertex::Tangent {}

Normal of surface in vertex position.

Definition at line 84 of file vertex.h.

◆ TexCoords

vec2 scl::vertex::TexCoords {}

Vertex tangent space second vector.

Definition at line 86 of file vertex.h.


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