Mesh data structure for loading and managing mesh data.
More...
#include <Mesh.hpp>
|
| void | loadFromFile (const std::string &path, VirtualFileSystem *vfs) |
| | Loads mesh data from a file using the Virtual File System.
|
| void | loadFromRawFile (const std::string &relativePath) |
| | Loads a mesh directly from the physical disk, bypassing the VFS.
|
| void | clear () |
|
| void | processScene (const aiScene *scene, const std::string &textureBaseDir) |
| | Internal helper to convert an Assimp aiScene into VEX Submesh structures.
|
Mesh data structure for loading and managing mesh data.
Definition at line 41 of file Mesh.hpp.
◆ clear()
| void vex::MeshData::clear |
( |
| ) |
|
|
inline |
◆ loadFromFile()
| void vex::MeshData::loadFromFile |
( |
const std::string & | path, |
|
|
VirtualFileSystem * | vfs ) |
Loads mesh data from a file using the Virtual File System.
Uses Assimp with a custom VPKAssimpIOSystem to read files directly from VFS memory buffers (supporting compressed VPKs). Post-processes the mesh to Triangulate, Generate Normals, and Flip UVs.
- Parameters
-
| const | std::string& path - Path to the mesh file within the VFS. |
| VirtualFileSystem* | vfs - Pointer to the active VirtualFileSystem instance. |
Definition at line 271 of file Mesh.cpp.
◆ loadFromRawFile()
| void vex::MeshData::loadFromRawFile |
( |
const std::string & | relativePath | ) |
|
Loads a mesh directly from the physical disk, bypassing the VFS.
Useful for Editor assets or raw files not yet packed into VPKs. Reads relative to the executable directory.
- Parameters
-
| const | std::string& relativePath - File path relative to the executable. |
Definition at line 240 of file Mesh.cpp.
◆ processScene()
| void vex::MeshData::processScene |
( |
const aiScene * | scene, |
|
|
const std::string & | textureBaseDir ) |
|
private |
Internal helper to convert an Assimp aiScene into VEX Submesh structures.
Extracts vertices, normals, and texture coordinates. If texture coordinates are missing, initializes UVs to (-100000.0f) to signal the shader.
- Parameters
-
| const | aiScene* scene - The loaded Assimp scene pointer. |
| const | std::string& textureBaseDir - Base directory string for resolving texture paths. |
Definition at line 183 of file Mesh.cpp.
◆ meshPath
◆ submeshes
| std::vector<Submesh> vex::MeshData::submeshes |
The documentation for this struct was generated from the following files: