Correlation 4.10.0
An Analysis Tool for Liquids and for Amorphous Solids
Loading...
Searching...
No Matches
LodController.hpp
Go to the documentation of this file.
1
8
9#pragma once
10
11#include <cstddef>
12
13namespace correlation::render3d {
14
19enum class LodLevel {
23};
24
35
41public:
42 constexpr LodController() noexcept = default;
43
50 [[nodiscard]] LodRenderPolicy evaluatePolicy(std::size_t atom_count,
51 bool is_interacting = false) const noexcept;
52
53 [[nodiscard]] std::size_t highThreshold() const noexcept { return high_threshold_; }
54 [[nodiscard]] std::size_t mediumThreshold() const noexcept { return medium_threshold_; }
55
56 void setHighThreshold(std::size_t threshold) noexcept { high_threshold_ = threshold; }
57 void setMediumThreshold(std::size_t threshold) noexcept { medium_threshold_ = threshold; }
58
59private:
60 std::size_t high_threshold_{5000};
61 std::size_t medium_threshold_{25000};
62};
63
64} // namespace correlation::render3d
LodRenderPolicy evaluatePolicy(std::size_t atom_count, bool is_interacting=false) const noexcept
Evaluates the active rendering policy.
Definition LodController.cpp:13
std::size_t medium_threshold_
Definition LodController.hpp:61
std::size_t high_threshold_
Definition LodController.hpp:60
std::size_t mediumThreshold() const noexcept
Definition LodController.hpp:54
void setHighThreshold(std::size_t threshold) noexcept
Definition LodController.hpp:56
constexpr LodController() noexcept=default
void setMediumThreshold(std::size_t threshold) noexcept
Definition LodController.hpp:57
std::size_t highThreshold() const noexcept
Definition LodController.hpp:53
Definition Camera3D.hpp:14
LodLevel
Definition LodController.hpp:19
@ Low
Systems > 25k atoms: Simplified point sprites, bonds suppressed during motion.
Definition LodController.hpp:22
@ High
Systems < 5k atoms: Full analytical ray-cast spheres and cylinder bonds.
Definition LodController.hpp:20
@ Medium
Systems 5k-25k atoms: Sphere impostors and line bonds.
Definition LodController.hpp:21
Effective rendering policy derived from LOD state and camera motion.
Definition LodController.hpp:29
LodLevel level
Current active LOD tier.
Definition LodController.hpp:30
float quality_scale
Sphere quality/resolution factor in [0.0, 1.0].
Definition LodController.hpp:33
bool render_bonds
Whether bond geometry should be rendered.
Definition LodController.hpp:31
bool render_wireframe
Whether simulation box lines should be rendered.
Definition LodController.hpp:32