Fish - FiberLib for VISH 0.3
Fish - The Fiber Bundle API for the Vish Visualization Shell
Wizt::LanternFestival Struct Reference

Behavior is similar to a map<VCamera, RefPtr<Lanternfish>> but the number of entries here remains limited. More...

#include <Lanternfish.hpp>

Inheritance diagram for Wizt::LanternFestival:
Wizt::GridAnemoneState Wizt::FieldSlice::SliceAnemoneState

Classes

struct  LanternView

Public Types

using Parameters = LanternFestivalParameters
using LanternViewSequence = std::list<LanternView>
using lock_readonly = std::shared_lock<MemCore::shared_mutex>
using lock_writable = std::unique_lock<MemCore::shared_mutex>

Public Member Functions

RefPtr< LanternfishgetExactLantern (const Parameters &LFP) const
 Get a lantern exactly matching the given camera position.
RefPtr< LanternfishgetBestLantern (const Parameters &LFP) const
 Returns the best fitting lantern which is always valid.
RefPtr< LanternfishgetMostRecentValidLantern () const
 As needed for the "frozen" feature and as fallback when no best Lantern could be found.
RefPtr< LanternfishnewLantern (const RefPtr< Grid > &G, const RefPtr< Chart > &chart, const LanternFestival::Parameters &LFP)
void setLanternGrid (const RefPtr< Grid > &G, const RefPtr< Chart > &chart)
bool hasSameLanternGrid (const RefPtr< Grid > &G, const RefPtr< Chart > &chart) const

Public Attributes

WeakPtr< Fiber::GridmyGrid
WeakPtr< Chart > myChart
std::unordered_map< WeakPtr< Grid >, LanternViewSequence > myLanternView
MemCore::shared_mutex myLanternView_mutex

Static Public Attributes

static unsigned LanternsToRemember = 128

Detailed Description

Behavior is similar to a map<VCamera, RefPtr<Lanternfish>> but the number of entries here remains limited.

Member Function Documentation

◆ getExactLantern()

RefPtr< Lanternfish > Wizt::LanternFestival::getExactLantern ( const Parameters & LFP) const

Get a lantern exactly matching the given camera position.

It may be invalid (is under creation or has data under creation).

References getExactLantern().

Referenced by getExactLantern().