Represents a single vertex in a 3D model, containing position, normal, and UV coordinates.
More...
#include <Mesh.hpp>
|
| | Vertex (const glm::vec3 &pos={}, const glm::vec3 &n={}, const glm::vec2 &u={}, const glm::ivec4 &bones=glm::ivec4(0), const glm::vec4 &weights=glm::vec4(0.0f)) |
| | Construct a new Vertex object.
|
|
| static VkVertexInputBindingDescription | getBindingDescription () |
| | Retrieves the Vulkan vertex input binding description.
|
| static std::vector< VkVertexInputAttributeDescription > | getAttributeDescriptions () |
| | Retrieves the Vulkan vertex input attribute descriptions.
|
|
| glm::vec3 | position |
| | Position of the vertex in 3D space.
|
| glm::vec3 | normal |
| | Normal vector of the vertex for lighting calculations.
|
| glm::vec2 | uv |
| | Texture coordinate (UV) of the vertex.
|
| glm::ivec4 | boneIDs |
| | Bone IDs that influence this vertex (Max 4).
|
| glm::vec4 | boneWeights |
| | Bone weight influences (sums to 1.0).
|
Represents a single vertex in a 3D model, containing position, normal, and UV coordinates.
◆ Vertex()
| Vertex::Vertex |
( |
const glm::vec3 & | pos = {}, |
|
|
const glm::vec3 & | n = {}, |
|
|
const glm::vec2 & | u = {}, |
|
|
const glm::ivec4 & | bones = glm::ivec4(0), |
|
|
const glm::vec4 & | weights = glm::vec4(0.0f) ) |
|
inline |
Construct a new Vertex object.
- Parameters
-
| pos | Position of the vertex. |
| n | Normal vector of the vertex. |
| u | Texture coordinate of the vertex. |
| bones | Bone IDs. |
| weights | Bone weights. |
◆ getAttributeDescriptions()
| std::vector< VkVertexInputAttributeDescription > Vertex::getAttributeDescriptions |
( |
| ) |
|
|
inlinestatic |
Retrieves the Vulkan vertex input attribute descriptions.
- Returns
- A vector containing the attribute descriptions.
◆ getBindingDescription()
| VkVertexInputBindingDescription Vertex::getBindingDescription |
( |
| ) |
|
|
inlinestatic |
Retrieves the Vulkan vertex input binding description.
- Returns
- The binding description.
◆ boneIDs
| glm::ivec4 Vertex::boneIDs |
Bone IDs that influence this vertex (Max 4).
◆ boneWeights
| glm::vec4 Vertex::boneWeights |
Bone weight influences (sums to 1.0).
◆ normal
Normal vector of the vertex for lighting calculations.
◆ position
| glm::vec3 Vertex::position |
Position of the vertex in 3D space.
◆ uv
Texture coordinate (UV) of the vertex.
The documentation for this struct was generated from the following file: