Class Mesh
Defined in File Mesh.hpp
Inheritance Relationships
Base Type
public Cacao::Asset
(Class Asset)
Class Documentation
-
class Mesh : public Cacao::Asset
Asset type for 3D mesh data.
Public Functions
-
virtual void Realize()
Synchronously convert the mesh data into a form suitable for rendering.
- Throws:
BadRealizeStateException – If the mesh is already realized
BadInitStateException – If the graphics backend is not initialized or connected
-
virtual std::shared_future<void> RealizeAsync()
Asynchronously convert the mesh data into a form suitable for rendering.
- Throws:
BadRealizeStateException – If the mesh is already realized
BadInitStateException – If the graphics backend is not initialized or connected
- Returns:
A future that will resolve when realization is complete or fails
Public Static Functions
-
static inline std::shared_ptr<Mesh> Create(std::vector<Vertex> &&vtx, std::vector<glm::uvec3> &&idx, const std::string &addr)
Create a new mesh from vertex and index data.
- Parameters:
vtx – The vertices of the mesh
idx – The indices of the mesh, grouped in sets of triangles, corresponding to the vertex index in vtx
addr – The resource address identifier to associate with the mesh
-
virtual void Realize()