group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
DebugUI Class Reference

Forward-declared to avoid pulling in heavy particle headers. More...

#include <DebugUI.hpp>

Classes

struct  ShotDebugPair
struct  ExternalPanel
 Build the unified debug menu window. More...

Public Member Functions

bool init (SDL_Window *window)
 Create the ImGui context and initialise the SDL3 input backend.
void shutdown ()
 Destroy the ImGui context and shut down the SDL3 input backend.
void processEvent (const SDL_Event *event)
 Forward an SDL event to the ImGui input backend.
void newFrame ()
 Begin a new ImGui frame. Call before any ImGui draw calls.
void buildUI (const Registry &registry, int tickCount, float &mouseSensitivity, float &gamepadLookSensitivity, systems::GamepadAimAssistConfig &aimAssistCfg, bool &renderSeparateFromPhysics, bool &inputSyncedWithPhysics, bool &limitFPSToMonitor, float physicsHz, float fpsCurrent, float fpsMin, float fpsMax, float fps1pLow, float fps5pLow)
 Build the ECS inspector window contents.
void buildParticleUI (ParticleSystem &ps, glm::vec3 eyePos, glm::vec3 forward)
 Build the Particle System debug/control window.
void buildNetworkUI (const NetworkStats &stats)
 Build the Network Stats window showing ping, bandwidth, and update rate.
void buildNetworkSimUI ()
 Build the Network Simulator window with sliders to add fake round-trip latency and packet loss.
int getSimulatedLatencyMs () const noexcept
 The current latency-simulator setting in milliseconds (0–200).
int getSimulatedLossPercent () const noexcept
 The current packet-loss setting (0–50 %).
void buildWeaponUI (const Registry &registry)
void buildHitboxUI (const Registry &registry, HitboxRig &hitboxRig, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
 Draw the Hitbox Debug window and (optionally) capsule wireframe overlay.
void buildCollisionUI (const physics::WorldGeometry &world, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
 Draw the Collision Debug window and (optionally) wireframe overlay for all world collision primitives.
void buildWeaponSpawnerUI (const Registry &registry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
 Draw the Weapon Spawner Debug window and (optionally) wireframe overlay for all weapon spawner entities, showing their bounding boxes and spawn positions.
void buildDroppedWeaponUI (const Registry &registry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
 Draw the Dropped Weapon Debug window and (optionally) wireframe overlay for all dropped weapon entities, showing their pickup collision boxes.
void buildSpawnPointUI (const Registry &registry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
 Draw the Spawn Point Debug window and (optionally) overlay markers for all player respawn point entities, showing position and cooldown state.
void buildKillzoneUI (const Registry &registry, const glm::mat4 &viewProj, float screenWidth, float screenHeight)
 Draw the Killzone Debug window and (optionally) trigger-volume overlay.
void pushClientShot (const net::shotdebug::ShotDebugCapture &cap)
 Append a fire-time snapshot the local client just took.
void pushServerShot (const net::shotdebug::ShotDebugCapture &cap)
 Append a server-reported rewind snapshot.
void buildShotDebugUI (const glm::mat4 &viewProj, float screenWidth, float screenHeight)
 Build the Shot Debug ImGui window + 3D overlay.
void buildContactDebugUI (const glm::mat4 &viewProj, float screenWidth, float screenHeight)
 Draw the Contact Debug window + (optionally) per-contact overlay.
void render ()
 Finalise the ImGui frame. Call after all ImGui draw calls, before Renderer::drawFrame().
void toggleDebugMenu ()
 Toggle the unified debug menu on/off.
void buildDebugMenu (std::initializer_list< ExternalPanel > externalPanels)
bool consumePhysicsCsvRecordingRequest (bool &enabled) noexcept
 Consume a start/stop request from the physics CSV button.

Public Attributes

bool showHitboxWindow = false
 Show the Hitbox Debug ImGui window.
bool drawHitboxOverlay = false
 Draw 3-D capsule wireframes (independent of window visibility).
bool showCollisionWindow = false
 Show the Collision Debug ImGui window.
bool drawCollisionOverlay = false
 Draw world collision wireframes (independent of window visibility).
bool showWeaponSpawnerWindow = false
 Show the Weapon Spawner Debug ImGui window.
bool drawWeaponSpawnerOverlay = false
 Draw weapon spawner wireframes (independent of window visibility).
bool showDroppedWeaponWindow = false
 Show the Dropped Weapon Debug ImGui window.
bool drawDroppedWeaponOverlay = false
 Draw dropped weapon wireframes (independent of window visibility).
bool showSpawnPointWindow = false
 Show the Spawn Point Debug ImGui window.
bool drawSpawnPointOverlay = false
 Draw spawn point markers (independent of window visibility).
bool showKillzoneWindow = false
 Show the Killzone Debug ImGui window.
bool drawKillzoneOverlay = false
 Draw killzone trigger boxes (independent of window visibility).
std::array< ShotDebugPair, k_shotRingMaxshotRing {}
int shotRingHead = 0
 Next-write slot.
int shotRingCount = 0
 Live entries; saturates at k_shotRingMax.
bool showShotDebugWindow = false
 Show the Shot Debug panel + 3D overlay (CSGO sv_showimpacts).
bool drawShotDebugOverlay = false
int shotDebugVisibleCount = 5
 Slider value: how many of the most-recent shots to render (1-k_shotRingMax).
int shotDebugSelectIdx = 0
 1-based index into the ring (1 = newest) to highlight.
int shotDebugViewMode = 0
 Which side(s) to render in the 3D overlay.
bool drawCollisionPlanes = true
bool drawCollisionBoxes = true
bool drawCollisionBrushes = true
bool drawCollisionCylinders = true
bool drawCollisionSpheres = true
bool drawCollisionTriMeshes = true
bool showContactDebugWindow = false
 Show the Contact Debug ImGui window.
bool drawContactOverlay = false
 Draw contact-point + normal overlay in 3D.
bool drawContactPlaneSweep = true
bool drawContactBoxSweep = true
bool drawContactBrushSweep = true
bool drawContactCylinderSweep = true
bool drawContactSphereSweep = true
bool drawContactTriMeshSweep = true
bool drawContactPlaneDepen = true
bool drawContactBoxDepen = true
bool drawContactBrushDepen = true
bool drawContactCylinderDepen = true
bool drawContactSphereDepen = true
bool drawContactTriMeshDepen = true
float contactNormalLength = 16.0f
 World units of arrow length for unit-normal contacts.
float contactPointRadius = 4.0f
 Radius (px) of the contact-point circle in screen space.
bool drawMeshEdgeOverlay = false
 Draw the per-trimesh welded-edge overlay: each triangle edge is coloured green when active (real boundary / convex corner) or red when welded (internal coplanar / concave seam suppressed at runtime).
bool drawMeshVertexOverlay = false
 Optional vertex markers on welded-edge overlay (active = green dot).
bool showDebugMenu = false
 Master toggle for the unified debug menu window.
bool pendingAmmoRefill_ = false
 Set by Weapon HUD button, consumed by Game::iterate().
bool pendingAbilityLevelGrant_ = false
 Set by Weapon HUD button, consumed by Game::iterate().
std::int8_t pendingSetPrimaryWeapon_ = -1
 -1 = none; else WeaponType ordinal. Consumed by Game::iterate().
std::int8_t pendingSetSecondaryWeapon_ = -1
 Mirror for the secondary slot.

Static Public Attributes

static constexpr int k_shotRingMax = 30

Private Member Functions

void buildInspectorContents (const Registry &registry, int tickCount, float &mouseSensitivity, float &gamepadLookSensitivity, systems::GamepadAimAssistConfig &aimAssistCfg, bool &renderSeparateFromPhysics, bool &inputSyncedWithPhysics, bool &limitFPSToMonitor, float physicsHz, float fpsCurrent, float fpsMin, float fpsMax, float fps1pLow, float fps5pLow)
 Draw the body of the ECS Inspector window (everything after ImGui::Begin).
void buildMovementChart (const Registry &registry)
 Draw the standalone 2-D overhead movement chart window.
void buildBhopAnalyzer (const Registry &registry)
 Draw the bhop analyzer window.

Private Attributes

bool showInspector = false
 Per-window visibility toggles — persistent across frames.
bool showNetworkStats = false
 Show the Network Stats window.
bool showNetworkSim = false
 Show the Network Simulator (latency + loss) window.
bool showWeaponHud = false
 Show the Weapon HUD debug window (disabled by default).
bool pendingPhysicsCsvRecordingRequest_ = false
bool pendingPhysicsCsvRecordingEnabled_ = false
int simulatedLatencyMs_ = 0
 Phase 6 testing: simulated round-trip latency in ms.
int simulatedLossPct_ = 0
 Phase 6 testing: simulated UDP packet loss in percent.
bool showPosition = true
 Per-component visibility toggles — persistent across frames.
bool showPrevPosition = false
 Show PreviousPosition component row.
bool showVelocity = true
 Show Velocity component row.
bool showCollisionShape = true
 Show CollisionShape half-extents row.
bool showPlayerState = true
 Show PlayerState flags row.
bool showInputSnapshot = true
 Show InputSnapshot key-state row.
bool showViewAngles = true
 Show yaw/pitch/roll in degrees (easier to read than radians).
bool showMovementChart = false
 Show the 2-D overhead movement chart window.
bool showBhopAnalyzer = false
 Show the bhop analyzer (player-relative + gain/sync).
float bhopSpeedHistory_ [k_bhopHistorySize] = {}
float bhopGainHistory_ [k_bhopHistorySize] = {}
bool bhopAirborneHistory_ [k_bhopHistorySize] = {}
bool bhopGainingHistory_ [k_bhopHistorySize] = {}
int bhopHistoryIdx_ = 0
 Next write slot in the ring buffers.
int bhopHistoryFill_ = 0
 Samples collected so far (up to k_bhopHistorySize).
float bhopPrevHSpeed_ = 0.0f
 Previous frame's horizontal speed (for gain calc).
bool bhopHasPrevSample_ = false
float particleSpawnDist_ = 200.f
 Units ahead of camera to spawn effects.
bool energyTeslaPreviewLive_ = false
bool energyTeslaPreviewLocked_ = true
float energyTeslaGuideDist_ = 200.f
float energyTeslaEndpointForward_ = 136.f
float energyTeslaEndpointRight_ = 95.f
float energyTeslaEndpointUp_ = 32.f
float energyTeslaPreviewLockStrength_ = 1.f
bool showParticleWindow_ = false

Static Private Attributes

static constexpr int k_bhopHistorySize = 256

Detailed Description

Forward-declared to avoid pulling in heavy particle headers.

Live ECS inspector overlay powered by Dear ImGui.

Ownership split:

  • DebugUI — ImGui context, imgui_impl_sdl3 input backend, UI state
  • Renderer — imgui_impl_sdlgpu3 render backend (owns the GPU device)

Initialisation order in Game::init():

  1. debugUI.init(window) — context must exist before GPU backend init
  2. renderer.init(window) — GPU backend init happens here

Shutdown order in Game::quit():

  1. renderer.quit() — GPU backend shutdown first
  2. debugUI.shutdown() — context destroyed last

Member Function Documentation

◆ buildBhopAnalyzer()

void DebugUI::buildBhopAnalyzer ( const Registry & registry)
private

Draw the bhop analyzer window.

Shows velocity/wish vectors rotated into player-local space (player forward always points screen-up), plus numeric breakdowns, gain-per-frame, sync %, and history plots for horizontal speed and gain.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildCollisionUI()

void DebugUI::buildCollisionUI ( const physics::WorldGeometry & world,
const glm::mat4 & viewProj,
float screenWidth,
float screenHeight )

Draw the Collision Debug window and (optionally) wireframe overlay for all world collision primitives.

Parameters
worldThe world geometry to visualise.
viewProjCombined view-projection matrix for the current camera.
screenWidthViewport width in pixels.
screenHeightViewport height in pixels.

◆ buildContactDebugUI()

void DebugUI::buildContactDebugUI ( const glm::mat4 & viewProj,
float screenWidth,
float screenHeight )

Draw the Contact Debug window + (optionally) per-contact overlay.

Records every physics contact (sweep hits + per-primitive depenetration MTV contributions) when the "Capture contacts" toggle is on, then renders them in the foreground draw list:

  • small circle at each contact point (colour = source category)
  • arrow along the contact normal (length = contactNormalLength, scaled by depth for depenetration contacts) Per-source visibility toggles let you isolate (e.g.) just the trimesh-depen contributions — invaluable for debugging Phase 2 internal-edge welding.

physics::debug::beginFrame() MUST be called once per rendered frame before this — see Game::iterate.

Parameters
viewProjCombined view-projection matrix for the current camera.
screenWidthViewport width in pixels.
screenHeightViewport height in pixels.
Here is the call graph for this function:

◆ buildDebugMenu()

void DebugUI::buildDebugMenu ( std::initializer_list< ExternalPanel > externalPanels)
Here is the call graph for this function:

◆ buildDroppedWeaponUI()

void DebugUI::buildDroppedWeaponUI ( const Registry & registry,
const glm::mat4 & viewProj,
float screenWidth,
float screenHeight )

Draw the Dropped Weapon Debug window and (optionally) wireframe overlay for all dropped weapon entities, showing their pickup collision boxes.

Parameters
registryECS registry (reads DroppedWeapon, Position, CollisionShape).
viewProjCombined view-projection matrix for the current camera.
screenWidthViewport width in pixels.
screenHeightViewport height in pixels.

◆ buildHitboxUI()

void DebugUI::buildHitboxUI ( const Registry & registry,
HitboxRig & hitboxRig,
const glm::mat4 & viewProj,
float screenWidth,
float screenHeight )

Draw the Hitbox Debug window and (optionally) capsule wireframe overlay.

The window is always rendered when showHitboxWindow is true. The 3-D capsule overlay is drawn only when the "Draw Hitboxes" checkbox inside the window is checked.

Parameters
registryECS registry (reads HitboxInstance, Position, Player).
viewProjCombined view-projection matrix for the current camera.
screenWidthViewport width in pixels.
screenHeightViewport height in pixels.
Here is the call graph for this function:

◆ buildInspectorContents()

void DebugUI::buildInspectorContents ( const Registry & registry,
int tickCount,
float & mouseSensitivity,
float & gamepadLookSensitivity,
systems::GamepadAimAssistConfig & aimAssistCfg,
bool & renderSeparateFromPhysics,
bool & inputSyncedWithPhysics,
bool & limitFPSToMonitor,
float physicsHz,
float fpsCurrent,
float fpsMin,
float fpsMax,
float fps1pLow,
float fps5pLow )
private

Draw the body of the ECS Inspector window (everything after ImGui::Begin).

Factored out of buildUI so the Begin/End wrapping (and early-out when the window is hidden) lives in one place in buildUI, while the content logic lives here. Parameter list mirrors buildUI.

Here is the caller graph for this function:

◆ buildKillzoneUI()

void DebugUI::buildKillzoneUI ( const Registry & registry,
const glm::mat4 & viewProj,
float screenWidth,
float screenHeight )

Draw the Killzone Debug window and (optionally) trigger-volume overlay.

Parameters
registryECS registry (reads Killzone, Position, CollisionShape).
viewProjCombined view-projection matrix for the current camera.
screenWidthViewport width in pixels.
screenHeightViewport height in pixels.

◆ buildMovementChart()

void DebugUI::buildMovementChart ( const Registry & registry)
private

Draw the standalone 2-D overhead movement chart window.

Shows the local player dot on a 3 000 × 3 000 unit grid together with view-direction, velocity, and wish-velocity arrows.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ buildNetworkSimUI()

void DebugUI::buildNetworkSimUI ( )

Build the Network Simulator window with sliders to add fake round-trip latency and packet loss.

Useful for testing Phase 6 lag compensation and Phase 5b reconciliation under non-LAN conditions without setting up tc qdisc.

Latency slider value (0–200 ms) is written into simulatedLatencyMs_ and read by Game::iterate which forwards it to Client::setSimulatedLatencyMs. Half the value is added to outbound packets and half to inbound, modelling a symmetric network with the slider's RTT.

Packet-loss slider value (0–50 %) is written into simulatedLossPct_, forwarded to Client::setSimulatedLossPercent, and applied as an independent Bernoulli drop in each direction.

◆ buildNetworkUI()

void DebugUI::buildNetworkUI ( const NetworkStats & stats)

Build the Network Stats window showing ping, bandwidth, and update rate.

◆ buildParticleUI()

void DebugUI::buildParticleUI ( ParticleSystem & ps,
glm::vec3 eyePos,
glm::vec3 forward )

Build the Particle System debug/control window.

Parameters
psThe particle system to inspect and control.
eyePosCamera eye position (used to compute spawn position).
forwardCamera forward unit vector.
Here is the call graph for this function:

◆ buildShotDebugUI()

void DebugUI::buildShotDebugUI ( const glm::mat4 & viewProj,
float screenWidth,
float screenHeight )

Build the Shot Debug ImGui window + 3D overlay.

Parameters
viewProjCamera VP for the world→screen projection.
screenWidthViewport width in pixels.
screenHeightViewport height in pixels.

◆ buildSpawnPointUI()

void DebugUI::buildSpawnPointUI ( const Registry & registry,
const glm::mat4 & viewProj,
float screenWidth,
float screenHeight )

Draw the Spawn Point Debug window and (optionally) overlay markers for all player respawn point entities, showing position and cooldown state.

Parameters
registryECS registry (reads RespawnPoint, Position).
viewProjCombined view-projection matrix for the current camera.
screenWidthViewport width in pixels.
screenHeightViewport height in pixels.

◆ buildUI()

void DebugUI::buildUI ( const Registry & registry,
int tickCount,
float & mouseSensitivity,
float & gamepadLookSensitivity,
systems::GamepadAimAssistConfig & aimAssistCfg,
bool & renderSeparateFromPhysics,
bool & inputSyncedWithPhysics,
bool & limitFPSToMonitor,
float physicsHz,
float fpsCurrent,
float fpsMin,
float fpsMax,
float fps1pLow,
float fps5pLow )

Build the ECS inspector window contents.

Parameters
registryThe ECS registry to inspect.
tickCountTotal physics ticks elapsed.
mouseSensitivityRadians per pixel; slider (read/write).
gamepadLookSensitivityRadians per second at full right-stick deflection; slider (read/write).
aimAssistCfgGamepad aim-assist config; sliders + toggle (read/write).
renderSeparateFromPhysicsInterpolated unlimited-fps mode toggle (read/write).
inputSyncedWithPhysicsSample input once per tick vs every frame (read/write).
limitFPSToMonitorVSync on/off toggle (read/write).
physicsHzMeasured physics tick rate (Hz).
fpsCurrentMost-recent render FPS sample.
fpsMinMinimum FPS in the rolling window.
fpsMaxMaximum FPS in the rolling window.
fps1pLow1st-percentile FPS (1 % low).
fps5pLow5th-percentile FPS (5 % low).
Here is the call graph for this function:

◆ buildWeaponSpawnerUI()

void DebugUI::buildWeaponSpawnerUI ( const Registry & registry,
const glm::mat4 & viewProj,
float screenWidth,
float screenHeight )

Draw the Weapon Spawner Debug window and (optionally) wireframe overlay for all weapon spawner entities, showing their bounding boxes and spawn positions.

Parameters
registryECS registry (reads WeaponSpawner, Position, CollisionShape).
viewProjCombined view-projection matrix for the current camera.
screenWidthViewport width in pixels.
screenHeightViewport height in pixels.

◆ buildWeaponUI()

void DebugUI::buildWeaponUI ( const Registry & registry)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ consumePhysicsCsvRecordingRequest()

bool DebugUI::consumePhysicsCsvRecordingRequest ( bool & enabled)
noexcept

Consume a start/stop request from the physics CSV button.

The DebugUI toggles local client recording immediately; Game consumes this request to mirror the same state to the authoritative server.

◆ getSimulatedLatencyMs()

int DebugUI::getSimulatedLatencyMs ( ) const
inlinenodiscardnoexcept

The current latency-simulator setting in milliseconds (0–200).

Read by Game::iterate each frame to push to Client::setSimulatedLatencyMs.

◆ getSimulatedLossPercent()

int DebugUI::getSimulatedLossPercent ( ) const
inlinenodiscardnoexcept

The current packet-loss setting (0–50 %).

Read by Game::iterate each frame to push to Client::setSimulatedLossPercent.

◆ init()

bool DebugUI::init ( SDL_Window * window)

Create the ImGui context and initialise the SDL3 input backend.

Parameters
windowThe SDL window receiving input events.
Returns
False if ImGui backend initialisation fails.

◆ newFrame()

void DebugUI::newFrame ( )

Begin a new ImGui frame. Call before any ImGui draw calls.

◆ processEvent()

void DebugUI::processEvent ( const SDL_Event * event)

Forward an SDL event to the ImGui input backend.

Parameters
eventThe event to process.

◆ pushClientShot()

void DebugUI::pushClientShot ( const net::shotdebug::ShotDebugCapture & cap)

Append a fire-time snapshot the local client just took.

Pairs with any matching server view (by shotInputTick).

◆ pushServerShot()

void DebugUI::pushServerShot ( const net::shotdebug::ShotDebugCapture & cap)

Append a server-reported rewind snapshot.

Pairs with any matching client view (by shotInputTick).

◆ render()

void DebugUI::render ( )

Finalise the ImGui frame. Call after all ImGui draw calls, before Renderer::drawFrame().

◆ shutdown()

void DebugUI::shutdown ( )

Destroy the ImGui context and shut down the SDL3 input backend.

◆ toggleDebugMenu()

void DebugUI::toggleDebugMenu ( )

Toggle the unified debug menu on/off.

When visible, the debug menu shows one checkbox per debug panel. Individual panels are only drawn when their checkbox is checked.

Member Data Documentation

◆ bhopAirborneHistory_

bool DebugUI::bhopAirborneHistory_[k_bhopHistorySize] = {}
private

◆ bhopGainHistory_

float DebugUI::bhopGainHistory_[k_bhopHistorySize] = {}
private

◆ bhopGainingHistory_

bool DebugUI::bhopGainingHistory_[k_bhopHistorySize] = {}
private

◆ bhopHasPrevSample_

bool DebugUI::bhopHasPrevSample_ = false
private

◆ bhopHistoryFill_

int DebugUI::bhopHistoryFill_ = 0
private

Samples collected so far (up to k_bhopHistorySize).

◆ bhopHistoryIdx_

int DebugUI::bhopHistoryIdx_ = 0
private

Next write slot in the ring buffers.

◆ bhopPrevHSpeed_

float DebugUI::bhopPrevHSpeed_ = 0.0f
private

Previous frame's horizontal speed (for gain calc).

◆ bhopSpeedHistory_

float DebugUI::bhopSpeedHistory_[k_bhopHistorySize] = {}
private

◆ contactNormalLength

float DebugUI::contactNormalLength = 16.0f

World units of arrow length for unit-normal contacts.

Depen contacts scale this by their depth so deeper interpenetrations draw longer arrows.

◆ contactPointRadius

float DebugUI::contactPointRadius = 4.0f

Radius (px) of the contact-point circle in screen space.

◆ drawCollisionBoxes

bool DebugUI::drawCollisionBoxes = true

◆ drawCollisionBrushes

bool DebugUI::drawCollisionBrushes = true

◆ drawCollisionCylinders

bool DebugUI::drawCollisionCylinders = true

◆ drawCollisionOverlay

bool DebugUI::drawCollisionOverlay = false

Draw world collision wireframes (independent of window visibility).

◆ drawCollisionPlanes

bool DebugUI::drawCollisionPlanes = true

◆ drawCollisionSpheres

bool DebugUI::drawCollisionSpheres = true

◆ drawCollisionTriMeshes

bool DebugUI::drawCollisionTriMeshes = true

◆ drawContactBoxDepen

bool DebugUI::drawContactBoxDepen = true

◆ drawContactBoxSweep

bool DebugUI::drawContactBoxSweep = true

◆ drawContactBrushDepen

bool DebugUI::drawContactBrushDepen = true

◆ drawContactBrushSweep

bool DebugUI::drawContactBrushSweep = true

◆ drawContactCylinderDepen

bool DebugUI::drawContactCylinderDepen = true

◆ drawContactCylinderSweep

bool DebugUI::drawContactCylinderSweep = true

◆ drawContactOverlay

bool DebugUI::drawContactOverlay = false

Draw contact-point + normal overlay in 3D.

◆ drawContactPlaneDepen

bool DebugUI::drawContactPlaneDepen = true

◆ drawContactPlaneSweep

bool DebugUI::drawContactPlaneSweep = true

◆ drawContactSphereDepen

bool DebugUI::drawContactSphereDepen = true

◆ drawContactSphereSweep

bool DebugUI::drawContactSphereSweep = true

◆ drawContactTriMeshDepen

bool DebugUI::drawContactTriMeshDepen = true

◆ drawContactTriMeshSweep

bool DebugUI::drawContactTriMeshSweep = true

◆ drawDroppedWeaponOverlay

bool DebugUI::drawDroppedWeaponOverlay = false

Draw dropped weapon wireframes (independent of window visibility).

◆ drawHitboxOverlay

bool DebugUI::drawHitboxOverlay = false

Draw 3-D capsule wireframes (independent of window visibility).

◆ drawKillzoneOverlay

bool DebugUI::drawKillzoneOverlay = false

Draw killzone trigger boxes (independent of window visibility).

◆ drawMeshEdgeOverlay

bool DebugUI::drawMeshEdgeOverlay = false

Draw the per-trimesh welded-edge overlay: each triangle edge is coloured green when active (real boundary / convex corner) or red when welded (internal coplanar / concave seam suppressed at runtime).

Validates the Phase 2 mesh-cook output by eye.

◆ drawMeshVertexOverlay

bool DebugUI::drawMeshVertexOverlay = false

Optional vertex markers on welded-edge overlay (active = green dot).

◆ drawShotDebugOverlay

bool DebugUI::drawShotDebugOverlay = false

◆ drawSpawnPointOverlay

bool DebugUI::drawSpawnPointOverlay = false

Draw spawn point markers (independent of window visibility).

◆ drawWeaponSpawnerOverlay

bool DebugUI::drawWeaponSpawnerOverlay = false

Draw weapon spawner wireframes (independent of window visibility).

◆ energyTeslaEndpointForward_

float DebugUI::energyTeslaEndpointForward_ = 136.f
private

◆ energyTeslaEndpointRight_

float DebugUI::energyTeslaEndpointRight_ = 95.f
private

◆ energyTeslaEndpointUp_

float DebugUI::energyTeslaEndpointUp_ = 32.f
private

◆ energyTeslaGuideDist_

float DebugUI::energyTeslaGuideDist_ = 200.f
private

◆ energyTeslaPreviewLive_

bool DebugUI::energyTeslaPreviewLive_ = false
private

◆ energyTeslaPreviewLocked_

bool DebugUI::energyTeslaPreviewLocked_ = true
private

◆ energyTeslaPreviewLockStrength_

float DebugUI::energyTeslaPreviewLockStrength_ = 1.f
private

◆ k_bhopHistorySize

int DebugUI::k_bhopHistorySize = 256
staticconstexprprivate

◆ k_shotRingMax

int DebugUI::k_shotRingMax = 30
staticconstexpr

◆ particleSpawnDist_

float DebugUI::particleSpawnDist_ = 200.f
private

Units ahead of camera to spawn effects.

◆ pendingAbilityLevelGrant_

bool DebugUI::pendingAbilityLevelGrant_ = false

Set by Weapon HUD button, consumed by Game::iterate().

◆ pendingAmmoRefill_

bool DebugUI::pendingAmmoRefill_ = false

Set by Weapon HUD button, consumed by Game::iterate().

◆ pendingPhysicsCsvRecordingEnabled_

bool DebugUI::pendingPhysicsCsvRecordingEnabled_ = false
private

◆ pendingPhysicsCsvRecordingRequest_

bool DebugUI::pendingPhysicsCsvRecordingRequest_ = false
private

◆ pendingSetPrimaryWeapon_

std::int8_t DebugUI::pendingSetPrimaryWeapon_ = -1

-1 = none; else WeaponType ordinal. Consumed by Game::iterate().

◆ pendingSetSecondaryWeapon_

std::int8_t DebugUI::pendingSetSecondaryWeapon_ = -1

Mirror for the secondary slot.

◆ shotDebugSelectIdx

int DebugUI::shotDebugSelectIdx = 0

1-based index into the ring (1 = newest) to highlight.

0 means "show all in the visible window".

◆ shotDebugViewMode

int DebugUI::shotDebugViewMode = 0

Which side(s) to render in the 3D overlay.

Maps to a dropdown in the UI panel: 0=Both, 1=Client only, 2=Server only. The underlying data is always captured for both sides; this only filters the render.

◆ shotDebugVisibleCount

int DebugUI::shotDebugVisibleCount = 5

Slider value: how many of the most-recent shots to render (1-k_shotRingMax).

All older shots stay in the ring but are hidden from the overlay.

◆ shotRing

std::array<ShotDebugPair, k_shotRingMax> DebugUI::shotRing {}

◆ shotRingCount

int DebugUI::shotRingCount = 0

Live entries; saturates at k_shotRingMax.

◆ shotRingHead

int DebugUI::shotRingHead = 0

Next-write slot.

◆ showBhopAnalyzer

bool DebugUI::showBhopAnalyzer = false
private

Show the bhop analyzer (player-relative + gain/sync).

◆ showCollisionShape

bool DebugUI::showCollisionShape = true
private

Show CollisionShape half-extents row.

◆ showCollisionWindow

bool DebugUI::showCollisionWindow = false

Show the Collision Debug ImGui window.

◆ showContactDebugWindow

bool DebugUI::showContactDebugWindow = false

Show the Contact Debug ImGui window.

◆ showDebugMenu

bool DebugUI::showDebugMenu = false

Master toggle for the unified debug menu window.

◆ showDroppedWeaponWindow

bool DebugUI::showDroppedWeaponWindow = false

Show the Dropped Weapon Debug ImGui window.

◆ showHitboxWindow

bool DebugUI::showHitboxWindow = false

Show the Hitbox Debug ImGui window.

◆ showInputSnapshot

bool DebugUI::showInputSnapshot = true
private

Show InputSnapshot key-state row.

◆ showInspector

bool DebugUI::showInspector = false
private

Per-window visibility toggles — persistent across frames.

Show the main ECS Inspector window.

◆ showKillzoneWindow

bool DebugUI::showKillzoneWindow = false

Show the Killzone Debug ImGui window.

◆ showMovementChart

bool DebugUI::showMovementChart = false
private

Show the 2-D overhead movement chart window.

◆ showNetworkSim

bool DebugUI::showNetworkSim = false
private

Show the Network Simulator (latency + loss) window.

◆ showNetworkStats

bool DebugUI::showNetworkStats = false
private

Show the Network Stats window.

◆ showParticleWindow_

bool DebugUI::showParticleWindow_ = false
private

◆ showPlayerState

bool DebugUI::showPlayerState = true
private

Show PlayerState flags row.

◆ showPosition

bool DebugUI::showPosition = true
private

Per-component visibility toggles — persistent across frames.

Show Position component row.

◆ showPrevPosition

bool DebugUI::showPrevPosition = false
private

Show PreviousPosition component row.

◆ showShotDebugWindow

bool DebugUI::showShotDebugWindow = false

Show the Shot Debug panel + 3D overlay (CSGO sv_showimpacts).

◆ showSpawnPointWindow

bool DebugUI::showSpawnPointWindow = false

Show the Spawn Point Debug ImGui window.

◆ showVelocity

bool DebugUI::showVelocity = true
private

Show Velocity component row.

◆ showViewAngles

bool DebugUI::showViewAngles = true
private

Show yaw/pitch/roll in degrees (easier to read than radians).

◆ showWeaponHud

bool DebugUI::showWeaponHud = false
private

Show the Weapon HUD debug window (disabled by default).

◆ showWeaponSpawnerWindow

bool DebugUI::showWeaponSpawnerWindow = false

Show the Weapon Spawner Debug ImGui window.

◆ simulatedLatencyMs_

int DebugUI::simulatedLatencyMs_ = 0
private

Phase 6 testing: simulated round-trip latency in ms.

Written by the Network Simulator window's slider, read by Game::iterate to push to Client. Zero = simulator off.

◆ simulatedLossPct_

int DebugUI::simulatedLossPct_ = 0
private

Phase 6 testing: simulated UDP packet loss in percent.

Applied independently to each direction. Zero = simulator off.


The documentation for this class was generated from the following files: