group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
WorldData.hpp File Reference

Shared world geometry for collision / movement / raycast systems. More...

#include "SweptCollision.hpp"
#include <array>
#include <cmath>
#include <glm/geometric.hpp>
Include dependency graph for WorldData.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  physics::detail::ActiveWorldState
 Shared singleton state for the runtime-switchable world. More...

Namespaces

namespace  physics
 Pure physics math — no ECS types, no registry.
namespace  physics::detail
 Active world (runtime-switchable).

Functions

ActiveWorldStatephysics::detail::activeWorldState ()
 Access the shared active-world state (Meyer's singleton).
void physics::setActiveWorld (const WorldGeometry &geo)
 Set the world geometry that activeWorld() returns.
const WorldGeometryphysics::activeWorld ()
 Return the world geometry most recently set via setActiveWorld(), or fall back to testWorld() if none has been set.
WorldBrush physics::makeRamp (float xMin, float xMax, float zMin, float zMax, float height)
 Create a ramp brush that rises along +Z.
WorldBrush physics::makeDiagonalWall (glm::vec3 center, float halfLen, float halfThick, float height, glm::vec3 dir)
 Create a diagonal wall brush from a centre, direction, and dimensions.
const WorldGeometryphysics::testWorld ()
 The physics test playground.

Detailed Description

Shared world geometry for collision / movement / raycast systems.

Provides three entry points:

  • testWorld() — hardcoded physics playground for development.
  • setActiveWorld() / activeWorld() — runtime-switchable world geometry, used when loading map files via MapLoader. Both client and server must call setActiveWorld() with identical data for prediction parity.