group2
0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
KillcamBoxWidget.hpp
Go to the documentation of this file.
1
3
4
#pragma once
5
6
#include "
hud/HudWidget.hpp
"
7
8
#include <glm/glm.hpp>
9
13
struct
KillcamBoxWidget
:
HudWidget
14
{
15
KillcamBoxWidget
();
16
17
void
update
(
float
dt,
const
HudGameState
& state,
HudTweenPool
& tweens)
override
;
18
void
draw
(
HudContext
& ctx,
float
drawX,
float
drawY)
override
;
19
20
private
:
21
HudKillerBox
box_
{};
22
glm::mat4
viewProj_
{1.f};
23
float
screenW_
= 1280.f;
24
float
screenH_
= 720.f;
25
};
HudWidget.hpp
Base struct for all HUD widgets.
HudContext
Accumulates HUD geometry during a frame for batch rendering.
Definition
HudContext.hpp:19
HudTweenPool
Fixed-size tween pool. No heap allocations.
Definition
HudTween.hpp:35
HudGameState
Snapshot of game state consumed by the HUD each frame.
Definition
HudTypes.hpp:367
HudKillerBox
Killcam killer marker — the killer's world AABB + nickname, used on the death screen to float the kil...
Definition
HudTypes.hpp:223
HudWidget
Base class for a retained HUD element.
Definition
HudWidget.hpp:16
KillcamBoxWidget::draw
void draw(HudContext &ctx, float drawX, float drawY) override
Emit geometry into the draw context.
Definition
KillcamBoxWidget.cpp:48
KillcamBoxWidget::screenW_
float screenW_
Definition
KillcamBoxWidget.hpp:23
KillcamBoxWidget::viewProj_
glm::mat4 viewProj_
Definition
KillcamBoxWidget.hpp:22
KillcamBoxWidget::screenH_
float screenH_
Definition
KillcamBoxWidget.hpp:24
KillcamBoxWidget::update
void update(float dt, const HudGameState &state, HudTweenPool &tweens) override
Called each frame before draw(). Update animation, consume events.
Definition
KillcamBoxWidget.cpp:39
KillcamBoxWidget::KillcamBoxWidget
KillcamBoxWidget()
Definition
KillcamBoxWidget.cpp:33
KillcamBoxWidget::box_
HudKillerBox box_
Definition
KillcamBoxWidget.hpp:21
src
client
hud
widgets
KillcamBoxWidget.hpp
Generated by
1.16.1