Cogs.Core
AssetImporterLoader.h
1#pragma once
2
3#include <glm/glm.hpp>
4
5#include "Resources/IModelLoader.h"
6
7struct aiMesh;
8struct aiScene;
9struct aiMaterial;
10struct aiNode;
11
12namespace Cogs
13{
14 namespace Core
15 {
16 class Context;
17 class ModelManager;
18 struct ModelPart;
19
21 {
22 public:
23 bool canLoad(Context * context, const ModelLoadInfo & loadInfo);
24 bool load(Context * context, const ModelLoadInfo & loadInfo);
25
26 private:
27 void handleAssImpNode(Context * context, Model & root, size_t parent, const aiScene * scene, const aiNode * node, const glm::mat4 & parentTransform);
28 void handleAssImpMesh(Context * context, Model & root, ModelPart & modelPart, const aiMesh * mesh, const glm::mat4 & localTransform, const glm::mat4 & globalTransform);
29 void handleAssImpMaterial(Context* context, ModelLoadFlags flags, const aiScene* scene, const aiMaterial* aiMaterial, MaterialInstance& material, std::string texturePath);
30
31 void handleBones(const aiMesh * mesh, Model & root, const glm::mat4 & globalTransform, Mesh * meshData);
32
33 bool hasBones(const aiScene * scene, const aiNode * node);
34 };
35 }
36}
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
ModelLoadFlags
Model loading flags. May be combined with resource loading flags.
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
Material instances represent a specialized Material combined with state for all its buffers and prope...
Meshes contain streams of vertex data in addition to index data and options defining geometry used fo...
Definition: Mesh.h:265
Model resources define a template for a set of connected entities, with resources such as meshes,...
Definition: Model.h:56