Class Model
Defined in File Model.hpp
Inheritance Relationships
Base Type
public Cacao::Resource
(Class Resource)
Class Documentation
-
class Model : public Cacao::Resource
A resource representation of a model file, containing meshes and textures found within.
Public Functions
-
const std::vector<std::string> ListMeshes()
Get a list of stored meshes.
- Returns:
Mesh ID list
-
const std::vector<std::string> ListTextures()
Get a list of stored textures.
- Returns:
Texture ID list
-
std::shared_ptr<Mesh> GetMesh(const std::string &id)
Retrieve a stored Mesh by its ID.
- Parameters:
id – The ID of the mesh to retrieve
- Throws:
NonexistentValueException – If the provided ID is not found in meshList
- Returns:
A handle to the mesh resource
Public Static Functions
-
static inline std::shared_ptr<Model> Create(std::vector<unsigned char> &&modelBin, const std::string &addr)
Create a new model from data.
- Parameters:
modelBin – A blob of model data encoded as FBX Binary, glTF Binary (.glb), Collada, or Wavefront OBJ
addr – The resource address identifier to associate with the model
-
const std::vector<std::string> ListMeshes()