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

Central registry mapping named assets to renderer model indices. More...

#include <cstdint>
#include <glm/vec3.hpp>
#include <string>
#include <unordered_map>
#include <vector>
Include dependency graph for AssetRegistry.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  AssetEntry
 One entry in the asset registry. More...
class  AssetRegistry
 Central asset registry — maps names to renderer model indices. More...

Enumerations

enum class  AssetRole : uint8_t { Map , Prop , Entity , Effect }
 Describes how a registered asset should be used. More...

Detailed Description

Central registry mapping named assets to renderer model indices.

Every loaded model (map, characters, weapons, props) goes through this registry so there is a single source of truth for "model index N = what." Both client and server can query asset IDs by name; only the client populates the renderer model index.

Props can be loaded with collision, producing collision data that is merged into the active world.

Enumeration Type Documentation

◆ AssetRole

enum class AssetRole : uint8_t
strong

Describes how a registered asset should be used.

Enumerator
Map 

Static world geometry — rendered in scene pass, has collision.

Prop 

Static placed object — rendered in scene pass, optionally has collision.

Entity 

Dynamic entity model (player, weapon) — drawn via EntityRenderCmd only.

Effect 

Procedural effect (glow sphere, beam) — drawn via EntityRenderCmd only.