Skip to content

ludus::graphics::renderer::MeshDescription

Ludus Wiki · API overview · Browse API

Struct

Borrowed static position/optional-UV triangle-list geometry, copied by CreateMesh. Authored views must be empty or contain exactly VertexCount elements; creation validates their extents before reading and copies them without retaining the caller's storage.

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

#include <ludus/graphics/renderer/renderer.hpp>
struct ludus::graphics::renderer::MeshDescription final

Fields

Positions

const ludus::foundation::math::Vector3* ludus::graphics::renderer::MeshDescription::Positions = nullptr
Finite mesh-local XYZ positions, tightly packed Vector3 records.

Related types: ludus::foundation::math::Vector3

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

VertexCount

ludus::foundation::usize ludus::graphics::renderer::MeshDescription::VertexCount = 0
Number of positions, positive and representable by uint32.

Related types: ludus::foundation::usize

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

Indices

const ludus::foundation::uint32* ludus::graphics::renderer::MeshDescription::Indices = nullptr
Mesh-local uint32 indices; every value must be below VertexCount.

Related types: ludus::foundation::uint32

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

IndexCount

ludus::foundation::usize ludus::graphics::renderer::MeshDescription::IndexCount = 0
Positive multiple of three, representable by uint32.

Related types: ludus::foundation::usize

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

Texcoords

const ludus::foundation::math::Vector2* ludus::graphics::renderer::MeshDescription::Texcoords = nullptr
Optional finite top-left UVs, exactly VertexCount records; null supplies zero UV. Copied into the shared position/UV mesh stream during creation.

Related types: ludus::foundation::math::Vector2

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

Normals

const ludus::foundation::math::Vector3* ludus::graphics::renderer::MeshDescription::Normals = nullptr
Optional finite nonzero mesh-local normals, normalized while copying. Lit snapshots require them.

Related types: ludus::foundation::math::Vector3

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

BakeTexcoords

const ludus::foundation::math::Vector2* ludus::graphics::renderer::MeshDescription::BakeTexcoords = nullptr
Optional finite bake-chart UVs, exactly VertexCount records; null uses Texcoords.

Related types: ludus::foundation::math::Vector2

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

Tangents

ludus::foundation::BorrowedView<const ludus::foundation::math::Vector4> ludus::graphics::renderer::MeshDescription::Tangents {}
Optional authored tangent XYZ and handedness W (+1/-1), one per vertex. Requires normals; finite nonzero XYZ is normalized/orthogonalized on copy. W=0 explicitly marks an unavailable vertex tangent and selects UV fallback. An empty view keeps the UV-derived frame. Mirrored object transforms adjust handedness.

Related types: ludus::foundation::BorrowedView · ludus::foundation::math::Vector4

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

Colors

ludus::foundation::BorrowedView<const ludus::foundation::math::Vector4> ludus::graphics::renderer::MeshDescription::Colors {}
Optional linear RGBA multiplier [0,1], one per vertex; an empty view supplies white. Used by authored material programs, including alpha acceptance.

Related types: ludus::foundation::BorrowedView · ludus::foundation::math::Vector4

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp

MaterialTexcoords1

ludus::foundation::BorrowedView<const ludus::foundation::math::Vector2> ludus::graphics::renderer::MeshDescription::MaterialTexcoords1 {}
Optional second material UV set, one per vertex; an empty view copies Texcoords. Independent of BakeTexcoords; authored material programs select UV0 or UV1.

Related types: ludus::foundation::BorrowedView · ludus::foundation::math::Vector2

Declared in modules/graphics/renderer/include/ludus/graphics/renderer/renderer.hpp