Struct LayerViewBase

Inheritance Relationships

Derived Type

Struct Documentation

struct LayerViewBase

Non-templated base for runtime layer handling.

A layer stores one scalar value per NavCel (triangle).

Subclassed by navmap::LayerView< T >

Public Functions

virtual ~LayerViewBase() = default
virtual LayerType type() const = 0
Returns:

Type tag of the underlying storage.

virtual const std::string &name() const = 0
Returns:

Layer name (unique within the registry).

virtual size_t size() const = 0
Returns:

Number of items (= number of NavCels).

virtual std::uint64_t content_hash() const = 0

Return 64-bit content hash (cached; recomputed lazily).

inline void mark_dirty() const noexcept

Mark content dirty (forces hash recompute on next query).

Protected Attributes

mutable bool hash_dirty_ = {true}
mutable std::uint64_t hash_cache_ = {0}