|
group2 0.1.0
CSE 125 Group 2
|
Load options. More...
#include <MapLoader.hpp>
Public Attributes | |
| float | scale = 1.0f |
| Uniform scale applied to every vertex position (e.g. 39.37 for m → in). | |
| std::string | collisionCollection = "Collision" |
| Name of the Blender collection (= Assimp parent node) whose children are collision geometry. | |
| bool | allMeshesAreCollision = false |
| When true, every mesh in the file is treated as both visual and collision geometry. | |
| bool | addFloorPlane = false |
| When true, an infinite floor plane is added at the lowest Y coordinate found across all collision geometry. | |
| bool | guessShapesProcessed = true |
| In separated mode (allMeshesAreCollision = false), should the loader auto-detect/guess each collision mesh's best-fitting primitive (AABB / cylinder / sphere / convex brush), or load it raw? | |
| bool | decomposeNonConvex = true |
| In separated mode with shape-guessing on, when a collision mesh is non-convex (so it can't be a single WorldBrush), should the loader run V-HACD convex decomposition to split it into multiple brushes? | |
Load options.
Configuration for map loading.
| bool physics::MapLoadOptions::addFloorPlane = false |
When true, an infinite floor plane is added at the lowest Y coordinate found across all collision geometry.
Prevents players from falling through the world even if the map mesh has tiny cracks.
| bool physics::MapLoadOptions::allMeshesAreCollision = false |
When true, every mesh in the file is treated as both visual and collision geometry.
The collisionCollection name is ignored. Ideal for prototype / blockout maps whose geometry is already simple.
| std::string physics::MapLoadOptions::collisionCollection = "Collision" |
Name of the Blender collection (= Assimp parent node) whose children are collision geometry.
Matching is case-insensitive. Meshes under this node are extracted as collision primitives and are excluded from the visual model (unless allMeshesAreCollision is also set).
| bool physics::MapLoadOptions::decomposeNonConvex = true |
In separated mode with shape-guessing on, when a collision mesh is non-convex (so it can't be a single WorldBrush), should the loader run V-HACD convex decomposition to split it into multiple brushes?
true (default) — non-convex meshes go through V-HACD; the resulting hulls are appended as WorldBrushes. Smoother collision than triMesh (no per-triangle MTV jitter) and cheaper at runtime. Costs a few hundred milliseconds to a few seconds at load time per non-convex mesh, depending on size. false — skip decomposition; non-convex meshes fall through to WorldTriMesh.
V-HACD tries FLOOD_FILL first (closed solid meshes), falling back to RAYCAST_FILL and finally SURFACE_ONLY (hollow shells like a tube without thickness) — so it works for both solid non-convex objects and walkable hollow shells.
Has no effect when guessShapesProcessed = false or when allMeshesAreCollision = true.
| bool physics::MapLoadOptions::guessShapesProcessed = true |
In separated mode (allMeshesAreCollision = false), should the loader auto-detect/guess each collision mesh's best-fitting primitive (AABB / cylinder / sphere / convex brush), or load it raw?
true (default) — run the auto-detection pipeline (AABB → cylinder → sphere → convex brush → triMesh) plus sub-collection / name forcing. Convex shapes end up as cheap primitives or brushes; only truly non-convex meshes fall back to triMesh. Convex primitives are dramatically cheaper at runtime and don't suffer triMesh edge-jitter on contact. false — preserve exactly what Blender's collision section contains: every collision mesh becomes a triangle mesh, vertex-for-vertex. Sub-collection name overrides ("Boxes/", "Cylinders/", …) and Blender primitive-name hints ("Cylinder") are ignored. Use this when the artist has authored exact collision hulls and the loader must not second- guess them.
Has no effect in prototype mode (allMeshesAreCollision = true): every mesh is collision there, and forcing all of them to triMesh would be prohibitively expensive.
| float physics::MapLoadOptions::scale = 1.0f |
Uniform scale applied to every vertex position (e.g. 39.37 for m → in).