Unravel Engine C++ Reference
Loading...
Searching...
No Matches
unravel::lod_data Struct Reference

Contains level of detail (LOD) data for an entity per view. Uses distance-based hysteresis for stable LOD selection combined with time-based dithered transitions. More...

#include <model.h>

Public Member Functions

void calculate_screen_rect (const camera &cam)
 

Public Attributes

std::uint32_t current_lod_index = 0
 Current LOD index being rendered.
 
std::uint32_t target_lod_index = 0
 Target LOD index to transition to.
 
float current_time = 0.0f
 Current time in the LOD transition.
 
float transition_time = 0.0f
 Total time for the LOD transition.
 
float percent = 0.0f
 Percentage of the model visible (0.0 to 100.0).
 
irect32_t rect
 Screen rectangle of the model.
 
math::vec3 center
 Center of the model in world space.
 

Detailed Description

Contains level of detail (LOD) data for an entity per view. Uses distance-based hysteresis for stable LOD selection combined with time-based dithered transitions.

Definition at line 33 of file model.h.

Member Function Documentation

◆ calculate_screen_rect()

void unravel::lod_data::calculate_screen_rect ( const camera & cam)

Definition at line 164 of file model.cpp.

Member Data Documentation

◆ center

math::vec3 unravel::lod_data::center

Center of the model in world space.

Definition at line 41 of file model.h.

◆ current_lod_index

std::uint32_t unravel::lod_data::current_lod_index = 0

Current LOD index being rendered.

Definition at line 35 of file model.h.

◆ current_time

float unravel::lod_data::current_time = 0.0f

Current time in the LOD transition.

Definition at line 37 of file model.h.

◆ percent

float unravel::lod_data::percent = 0.0f

Percentage of the model visible (0.0 to 100.0).

Definition at line 39 of file model.h.

◆ rect

irect32_t unravel::lod_data::rect

Screen rectangle of the model.

Definition at line 40 of file model.h.

◆ target_lod_index

std::uint32_t unravel::lod_data::target_lod_index = 0

Target LOD index to transition to.

Definition at line 36 of file model.h.

◆ transition_time

float unravel::lod_data::transition_time = 0.0f

Total time for the LOD transition.

Definition at line 38 of file model.h.


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