group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
Minimap Struct Reference

#include <Minimap.hpp>

Inheritance diagram for Minimap:
[legend]
Collaboration diagram for Minimap:
[legend]

Classes

struct  Dot

Public Member Functions

 Minimap ()
void update (float dt, const HudGameState &state, HudTweenPool &tweens) override
 Called each frame before draw(). Update animation, consume events.
void draw (HudContext &ctx, float drawX, float drawY) override
 Emit geometry into the draw context.
Public Member Functions inherited from HudWidget
virtual ~HudWidget ()=default

Public Attributes

float mapSize = 275.f
 Pixel size of the Radar.svg quad.
float dotSize = 12.25f
float dotZoneRadius = 109.5f
 Radius of the enemy-dot projection circle, in unscaled HUD pixels.
float dotZoneOffsetX = -1.f
 X offset of the dot projection circle from the SVG center.
float dotZoneOffsetY = 4.f
 Y offset of the dot projection circle from the SVG center.
bool showDotZoneDebug = false
Public Attributes inherited from HudWidget
bool visible = true
HudAnchor anchor = HudAnchor::TopLeft
float offsetX = 0.f
float offsetY = 0.f
float width = 0.f
float height = 0.f
HudColor tint {1.f, 1.f, 1.f, 1.f}
float uiScale_ = 1.f
 Set by Hud each frame (screenH / 1080).

Private Attributes

float localX_ = 0.f
float localZ_ = 0.f
float localYaw_ = 0.f
 Player yaw in radians.
float worldRange_ = 100.f
std::vector< Dotenemies_

Constructor & Destructor Documentation

◆ Minimap()

Minimap::Minimap ( )

Member Function Documentation

◆ draw()

void Minimap::draw ( HudContext & ctx,
float drawX,
float drawY )
overridevirtual

Emit geometry into the draw context.

Parameters
ctxImmediate-mode draw API.
drawXResolved pixel X (anchor + offset already applied).
drawYResolved pixel Y.

Implements HudWidget.

Here is the call graph for this function:

◆ update()

void Minimap::update ( float dt,
const HudGameState & state,
HudTweenPool & tweens )
overridevirtual

Called each frame before draw(). Update animation, consume events.

Implements HudWidget.

Member Data Documentation

◆ dotSize

float Minimap::dotSize = 12.25f

◆ dotZoneOffsetX

float Minimap::dotZoneOffsetX = -1.f

X offset of the dot projection circle from the SVG center.

◆ dotZoneOffsetY

float Minimap::dotZoneOffsetY = 4.f

Y offset of the dot projection circle from the SVG center.

◆ dotZoneRadius

float Minimap::dotZoneRadius = 109.5f

Radius of the enemy-dot projection circle, in unscaled HUD pixels.

◆ enemies_

std::vector<Dot> Minimap::enemies_
private

◆ localX_

float Minimap::localX_ = 0.f
private

◆ localYaw_

float Minimap::localYaw_ = 0.f
private

Player yaw in radians.

◆ localZ_

float Minimap::localZ_ = 0.f
private

◆ mapSize

float Minimap::mapSize = 275.f

Pixel size of the Radar.svg quad.

◆ showDotZoneDebug

bool Minimap::showDotZoneDebug = false

◆ worldRange_

float Minimap::worldRange_ = 100.f
private

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