|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
Type-neutral vertex carrying the universal 60-byte attribute layout. More...
#include <VertexFormats.hpp>
Collaboration diagram for MayaFlux::Kakshya::Vertex:Public Attributes | |
| glm::vec3 | color { 1.0F } |
| glm::vec3 | normal { 0.0F, 0.0F, 1.0F } |
| glm::vec3 | position |
| float | scalar { 1.0F } |
| Normalised scalar; maps to size / thickness / weight at offset 24. | |
| glm::vec3 | tangent { 1.0F, 0.0F, 0.0F } |
| glm::vec2 | uv { 0.0F } |
| Texture coordinates; zero unless set by UV generation. | |
Type-neutral vertex carrying the universal 60-byte attribute layout.
The common substrate for geometry construction and spatial sampling before a concrete vertex type is chosen. Shares the exact byte layout of PointVertex, LineVertex, and MeshVertex so a Vertex byte buffer is a drop-in for any of them: position, color, scalar, uv, normal, tangent at identical offsets. Callers project into the concrete type via to_point_vertex(), to_line_vertex(), to_mesh_vertex() when the field semantics (size vs thickness vs weight) matter, but the raw bytes are already pipeline-ready.
scalar maps to size (PointVertex), thickness (LineVertex), or weight (MeshVertex) at offset 24. uv defaults to zero and is overridden by UV generation (UVFieldProcessor, FieldOperator UV fields). normal and tangent default to the canonical Z-up / X-right frame.
Layout (60 bytes): offset 0 position vec3 (12) offset 12 color vec3 (12) offset 24 scalar float (4) offset 28 uv vec2 (8) offset 36 normal vec3 (12) offset 48 tangent vec3 (12)
Definition at line 32 of file VertexFormats.hpp.