|
group2 0.1.0
CSE 125 Group 2
|
Load collision geometry (and optionally visual data) from a map GLB file. More...
Go to the source code of this file.
Classes | |
| struct | physics::MapCollisionData |
| Collision data. More... | |
| struct | physics::MapLoadOptions |
| Load options. More... | |
Namespaces | |
| namespace | physics |
| Pure physics math — no ECS types, no registry. | |
Functions | |
| bool | physics::loadMapCollision (const std::string &path, MapCollisionData &out, const MapLoadOptions &opts={}) |
| API. | |
| bool | physics::loadPropCollision (const std::string &path, MapCollisionData &out, glm::vec3 position, float scale, bool decomposeNonConvex=false) |
| Load collision for a standalone prop GLB and append to existing collision data. | |
Load collision geometry (and optionally visual data) from a map GLB file.
Maps are authored in Blender and exported as .glb. Collision geometry is identified by Blender collection hierarchy: meshes whose Assimp scene-graph ancestor is named after the collision collection (default "Collision") are extracted as collision geometry. Everything else is treated as visual-only.
All-mesh mode (allMeshesAreCollision = true): every mesh in the file is used for both rendering and collision, preserving the authored triangles. Handy for blockout maps where the visual geometry is the collision source.
Map loading always preserves collision meshes as authored triangle surfaces. Primitive fitting is kept only for standalone prop collision. V-HACD is never part of the map load path; it remains a build-time opt-in for experimental prop decomposition only.