|
Toast Engine
|


Public Types | |
| using | Index = uint32_t |
Public Member Functions | |
| Mesh (const std::vector< uint8_t > &data) | |
| Mesh (std::string_view name, std::vector< renderer::Vertex > &&vertices, std::vector< uint32_t > &&indices) | |
| Mesh (std::string_view name, std::vector< renderer::Vertex > &&vertices, std::vector< uint32_t > &&indices, std::vector< renderer::SkinVertex > &&skin_vertices) | |
| auto | type () const -> std::string_view override |
| auto | vertices () const -> const std::vector< renderer::Vertex > & |
| auto | indices () const -> const std::vector< Index > & |
| auto | skinVertices () const -> const std::vector< renderer::SkinVertex > & |
| auto | isSkinned () const noexcept -> bool |
| auto | boundingSphere () const -> const glm::vec4 & |
| Local-space bounding sphere: xyz centre, w radius. | |
| auto | gpuMesh () const -> const renderer::VulkanMesh & |
| auto | gpuMesh () -> renderer::VulkanMesh & |
| auto | name () const -> const std::string & |
| auto | toBinary () const -> std::vector< uint8_t > |
| Public Member Functions inherited from assets::Asset | |
| Asset (const Asset &)=delete | |
| auto | operator= (const Asset &) -> Asset &=delete |
| auto | refCount () const noexcept -> uint32_t |
Additional Inherited Members | |
| Protected Member Functions inherited from assets::Asset | |
| void | addRef () noexcept |
| void | release () noexcept |
| assets::Mesh::Mesh | ( | std::string_view | name, |
| std::vector< renderer::Vertex > && | vertices, | ||
| std::vector< uint32_t > && | indices, | ||
| std::vector< renderer::SkinVertex > && | skin_vertices ) |
| skin_vertices | Per-vertex joint influences; must be empty or exactly as long as vertices |
|
nodiscard |
Local-space bounding sphere: xyz centre, w radius.
Cached on first use - caster culling asks once per instance per frame, and Bistro's vertex buffers are too large to walk that often
Padded generously for skinned meshes, whose sphere covers the bind pose only: a limb can swing outside it, and a wrongly culled caster is a shadow popping out of existence while a wrongly kept one is a draw
|
inlinenodiscard |
|
inlinenodiscardoverridevirtual |
Implements assets::Asset.