lmgl 1.0.0
A lightweight OpenGL graphics engine library written in C++
Loading...
Searching...
No Matches
lmgl::scene::LODLevel Struct Reference

Level of Detail (LOD) structure representing a single LOD level. More...

#include <lod.hpp>

Public Member Functions

 LODLevel (std::shared_ptr< Mesh > m, float distance)
 Constructor for LODLevel.
 

Public Attributes

std::shared_ptr< Meshmesh
 Shared pointer to the mesh representing this LOD level.
 
float max_distance_sq
 Maximum distance squared at which this LOD level is used.
 

Detailed Description

Level of Detail (LOD) structure representing a single LOD level.

Each LOD level contains a mesh and the maximum distance squared at which this LOD is used. The distance is squared to avoid unnecessary square root calculations during distance comparisons. This structure is used within the LOD class to manage multiple levels of detail for 3D objects.

See also
LOD

Constructor & Destructor Documentation

◆ LODLevel()

lmgl::scene::LODLevel::LODLevel ( std::shared_ptr< Mesh > m,
float distance )
inline

Constructor for LODLevel.

Parameters
mShared pointer to the mesh for this LOD level.
distanceMaximum distance at which this LOD level is used.

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