Assimp-based model loading and CPU-side mesh/texture data types.
More...
#include <cstddef>
#include <cstdint>
#include <glm/glm.hpp>
#include <string>
#include <vector>
Go to the source code of this file.
|
| bool | loadModel (const std::string &path, LoadedModel &outModel, bool flipUVs=false) |
| | Load a model file via Assimp and decode its embedded textures.
|
| |
Assimp-based model loading and CPU-side mesh/texture data types.
◆ AlphaMode
glTF alpha blending mode.
| Enumerator |
|---|
| Opaque | |
| Mask | |
| Blend | |
◆ loadModel()
| 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.
- Parameters
-
| 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). |
- Returns
- True on success; false on failure (error logged via SDL_Log).