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

First-person weapon viewmodel descriptor sent per frame. More...

#include <RendererTypes.hpp>

Collaboration diagram for WeaponViewmodel:
[legend]

Public Attributes

int32_t modelIndex = -1
 Renderer-side model handle.
glm::mat4 transform {1.0f}
 Transform in viewmodel space (relative to camera).
ViewmodelHands hands {}
 Optional first-person hands attached to weapon grip mounts.
ViewmodelAttachment debugPoint {}
 Optional red debug marker for live mount tweaking.
bool visible = false
 False = skip drawing this frame (e.g. weapon hidden).

Detailed Description

First-person weapon viewmodel descriptor sent per frame.

Game.cpp computes the viewmodel transform from camera state + sway/recoil each frame and hands it off via setWeaponViewmodel().

Member Data Documentation

◆ debugPoint

ViewmodelAttachment WeaponViewmodel::debugPoint {}

Optional red debug marker for live mount tweaking.

◆ hands

ViewmodelHands WeaponViewmodel::hands {}

Optional first-person hands attached to weapon grip mounts.

◆ modelIndex

int32_t WeaponViewmodel::modelIndex = -1

Renderer-side model handle.

◆ transform

glm::mat4 WeaponViewmodel::transform {1.0f}

Transform in viewmodel space (relative to camera).

◆ visible

bool WeaponViewmodel::visible = false

False = skip drawing this frame (e.g. weapon hidden).


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