|
group2 0.1.0
CSE 125 Group 2
|
Assimp model loading, embedded texture decoding, and scene-graph traversal. More...
#include "ModelLoader.hpp"#include <SDL3/SDL_log.h>#include <stb_image.h>#include <assimp/GltfMaterial.h>#include <assimp/Importer.hpp>#include <assimp/material.h>#include <assimp/postprocess.h>#include <assimp/scene.h>#include <glm/gtc/type_ptr.hpp>Macros | |
| #define | STB_IMAGE_IMPLEMENTATION |
Functions | |
| bool | loadModel (const std::string &path, LoadedModel &outModel, bool flipUVs) |
| Load a model file via Assimp and decode its embedded textures. | |
Assimp model loading, embedded texture decoding, and scene-graph traversal.
| #define STB_IMAGE_IMPLEMENTATION |
| bool loadModel | ( | const std::string & | path, |
| LoadedModel & | outModel, | ||
| bool | flipUVs = false |
||
| ) |
Load a model file via Assimp and decode its embedded textures.
Extracts PBR material properties (metallic, roughness, emissive factors) and tangent vectors for normal mapping. Traverses the full scene-graph and bakes per-node transforms into vertex data.
| path | Absolute path to the model file (GLB, OBJ, FBX, …). |
| outModel | Filled on success. |
| flipUVs | Flip V texture coordinates (V = 1 − V). Set true for models from tools that use V=0 at bottom (Blender, OBJ). |