12#ifndef FOOLSENGINE_MODEL_H
13#define FOOLSENGINE_MODEL_H
18#include <unordered_set>
23#include <assimp/Importer.hpp>
24#include <assimp/scene.h>
25#include <assimp/material.h>
79 StaticModel(
const std::vector<std::shared_ptr<StaticMesh>>& meshHandles,
const std::vector<std::shared_ptr<Material>>& materialHandles);
210 std::shared_ptr<IResource>
createResource(
const nlohmann::json& methodParameters)
override;
ResourceConstructor(int explicitlyInitializeMe)
Definition resource_database.hpp:491
Resource(int explicitlyInitializeMe)
Definition resource_database.hpp:389
StaticModelFromFile()
Creates a StaticModelFromFile object.
Definition model.cpp:91
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a StaticModel resource based on its parameters.
Definition model.cpp:95
static std::string getResourceConstructorName()
Gets the resource constructor type string for this constructor.
Definition model.hpp:199
This engine's representation of a single unrigged 3D model.
Definition model.hpp:54
void destroyResource()
Destroys the resources associated with this object.
Definition model.cpp:86
std::vector< std::shared_ptr< StaticMesh > > getMeshHandles() const
Gets the list of StaticMeshes associated with this Model object.
Definition model.cpp:68
std::vector< std::shared_ptr< StaticMesh > > mMeshHandles
The meshes that make up this model.
Definition model.hpp:112
StaticModel(const std::vector< std::shared_ptr< StaticMesh > > &meshHandles, const std::vector< std::shared_ptr< Material > > &materialHandles)
Constructs a model out of a list of handles to meshes and materials.
Definition model.cpp:28
void stealResources(StaticModel &other)
Utility method for taking resources from another instance of this class.
Definition model.cpp:74
std::vector< std::shared_ptr< Material > > getMaterialHandles() const
Gets the materials associated with this model object.
Definition model.cpp:69
void free()
Utility method for destroying resources associated with this model.
Definition model.cpp:70
void releaseResource()
Releases resources associated with this object so that they may be claimed by another part of the pro...
Definition model.cpp:89
~StaticModel()
Model destructor.
Definition model.cpp:37
std::vector< std::shared_ptr< Material > > mMaterialHandles
The materials that correspond to each mesh on this model.
Definition model.hpp:117
static std::string getResourceTypeName()
Gets the resource type string for this object.
Definition model.hpp:61
static std::string getComponentTypeName()
Gets the component type string for this object.
Definition model.hpp:68
StaticModel & operator=(StaticModel &&other)
Move assignment.
Definition model.cpp:45
void copyResources(const StaticModel &other)
Utility method for deeply replicating resources from another instance of this class.
Definition model.cpp:82
Header file that makes Resource objects useable as ECS components.
Functions related to rendering materials.
A file containing the ToyMaker::StaticMesh class and related structures.
Namespace containing all class definitions and functions related to the ToyMaker engine.
Definition camera_system.hpp:20
A file containing class definitions for wrappers over OpenGL shader programs.
Header containing definitions of classes and functions related to loading and using Texture resources...
Contains engine's built-in vertex definitions, along with their associated attribute locations in the...