Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
GltfMeshLoader.h
Go to the documentation of this file.
1#pragma once
2#include <filesystem>
3#include <glm/glm.hpp>
4
7#include <tiny_gltf.h>
8
9namespace EngineCore {
10 class MeshLoaderGltf : public MeshLoader {
11 public:
12 void useDefaultTexture(std::vector<std::unique_ptr<TextureLoadData>> &textureLoadData);
13
14 void
15 loadMesh(const std::filesystem::path &filePath, std::vector<Vertex> &vertices, std::vector<uint32_t> &indices,
16 std::vector<std::unique_ptr<TextureLoadData>>& textureLoadData) override;
17 private:
18
19 glm::vec3 getVec3FromMemory(const float *memory, size_t accessIndex,
20 bool invert_x = false, bool invert_y = false, bool invert_z = false);
21 glm::vec2 getVec2FromMemory(const float* memory, size_t accessIndex);
22
23 tinygltf::Model &
24 getModel(const std::filesystem::path &filePath, tinygltf::Model &model, tinygltf::TinyGLTF &loader) const;
25 };
26}
27
void loadMesh(const std::filesystem::path &filePath, std::vector< Vertex > &vertices, std::vector< uint32_t > &indices, std::vector< std::unique_ptr< TextureLoadData > > &textureLoadData) override
void useDefaultTexture(std::vector< std::unique_ptr< TextureLoadData > > &textureLoadData)
glm::vec2 getVec2FromMemory(const float *memory, size_t accessIndex)
tinygltf::Model & getModel(const std::filesystem::path &filePath, tinygltf::Model &model, tinygltf::TinyGLTF &loader) const
glm::vec3 getVec3FromMemory(const float *memory, size_t accessIndex, bool invert_x=false, bool invert_y=false, bool invert_z=false)
Log category system implementation.