group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
entity_interpolation::InterpolatedTransform Struct Reference

Result of sampling an entity's interpolation buffer. More...

#include <EntityInterpolation.hpp>

Collaboration diagram for entity_interpolation::InterpolatedTransform:
[legend]

Public Attributes

glm::vec3 position {0.0f}
 Interpolated (or fallback) position.
glm::vec3 velocity {0.0f}
 Interpolated (or fallback) velocity (PR-28).
float yaw = 0.0f
 Interpolated (or fallback) yaw.
float pitch = 0.0f
 Interpolated (or fallback) pitch (PR-28).
std::uint8_t moveMode = 0
 MoveMode enum cast (PR-28).
std::uint8_t wallRunSide = 0
 WallSide enum cast (PR-28).
bool grounded = false
 PR-28.
bool sprinting = false
 PR-28.
bool crouching = false
 PR-28.
AnimSnapshot anim {}
 PR-29: server-authoritative animation state at the render tick.
bool fromBuffer = false
 True if a real lerp happened; false on fallback.

Detailed Description

Result of sampling an entity's interpolation buffer.

PR-28 extended the result with the animator-input fields the renderer also needs at the same render time. Continuous fields (position, velocity, yaw, pitch) are LERPed between bracketing samples; discrete fields (moveMode, wallRunSide, grounded, sprinting, crouching) take the value of the older bracketing sample (no fractional state-machine state — pose transitions snap at the same instant the interpolation crosses the sample).

Member Data Documentation

◆ anim

AnimSnapshot entity_interpolation::InterpolatedTransform::anim {}

PR-29: server-authoritative animation state at the render tick.

Per-slot timeRatio is LERPed between bracketing samples when both share the same clipIdRaw; otherwise snaps to older (clip transitions are discrete state). Caller hands this to CharacterAnimator::renderFromServer(...).

◆ crouching

bool entity_interpolation::InterpolatedTransform::crouching = false

PR-28.

◆ fromBuffer

bool entity_interpolation::InterpolatedTransform::fromBuffer = false

True if a real lerp happened; false on fallback.

◆ grounded

bool entity_interpolation::InterpolatedTransform::grounded = false

PR-28.

◆ moveMode

std::uint8_t entity_interpolation::InterpolatedTransform::moveMode = 0

MoveMode enum cast (PR-28).

◆ pitch

float entity_interpolation::InterpolatedTransform::pitch = 0.0f

Interpolated (or fallback) pitch (PR-28).

◆ position

glm::vec3 entity_interpolation::InterpolatedTransform::position {0.0f}

Interpolated (or fallback) position.

◆ sprinting

bool entity_interpolation::InterpolatedTransform::sprinting = false

PR-28.

◆ velocity

glm::vec3 entity_interpolation::InterpolatedTransform::velocity {0.0f}

Interpolated (or fallback) velocity (PR-28).

◆ wallRunSide

std::uint8_t entity_interpolation::InterpolatedTransform::wallRunSide = 0

WallSide enum cast (PR-28).

◆ yaw

float entity_interpolation::InterpolatedTransform::yaw = 0.0f

Interpolated (or fallback) yaw.


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