5 Struct DR_ENTITY
gullradriel edited this page 2026-10-09 00:55:18 +02:00

DR_ENTITY

Module: DEAD_RECKONING: latency hiding with extrapolation and convergence blending

Dead reckoned entity with extrapolation and convergence state. More...

#include "n_dead_reckoning.h"

Public Attributes

Name
int update_count
Number of state updates received.
DR_STATE prev_predicted
Where we THOUGHT entity was when update arrived (P0, V0).
double pos_threshold
Position error threshold for sending updates (distance).
DR_STATE last_known
Most recent authoritative state (P0', V0', A0').
DR_VEC3 display_vel
Current blended/rendered velocity.
DR_VEC3 display_pos
Current blended/rendered position.
bool blending
True if currently blending toward last_known.
double blend_time
Duration of convergence blend in seconds.
double blend_start
Timestamp when blending started.
DR_BLEND blend_mode
Convergence blending mode.
DR_VEC3 bezier_p3
End point (extrapolated last_known at blend_time).
DR_VEC3 bezier_p2
Control point 2.
DR_VEC3 bezier_p1
Control point 1.
DR_VEC3 bezier_p0
Start point (previous predicted position).
DR_ALGO algo
Extrapolation algorithm.

Detailed Description

struct DR_ENTITY;

Dead reckoned entity with extrapolation and convergence state.

Tracks the last known authoritative state, the previous predicted state at the moment a new update arrived, and all parameters needed for extrapolation and convergence blending.

Public Attributes Documentation

variable update_count

int update_count;

Number of state updates received.

variable prev_predicted

DR_STATE prev_predicted;

Where we THOUGHT entity was when update arrived (P0, V0).

variable pos_threshold

double pos_threshold;

Position error threshold for sending updates (distance).

variable last_known

DR_STATE last_known;

Most recent authoritative state (P0', V0', A0').

variable display_vel

DR_VEC3 display_vel;

Current blended/rendered velocity.

variable display_pos

DR_VEC3 display_pos;

Current blended/rendered position.

variable blending

bool blending;

True if currently blending toward last_known.

variable blend_time

double blend_time;

Duration of convergence blend in seconds.

variable blend_start

double blend_start;

Timestamp when blending started.

variable blend_mode

DR_BLEND blend_mode;

Convergence blending mode.

variable bezier_p3

DR_VEC3 bezier_p3;

End point (extrapolated last_known at blend_time).

variable bezier_p2

DR_VEC3 bezier_p2;

Control point 2.

variable bezier_p1

DR_VEC3 bezier_p1;

Control point 1.

variable bezier_p0

DR_VEC3 bezier_p0;

Start point (previous predicted position).

variable algo

DR_ALGO algo;

Extrapolation algorithm.