载入中...
搜索中...
未找到
PcgTerrainStreaming.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
7
8namespace eve::procgen {
9
11enum class PcgTerrainStreamingTier { Regular = 0, Impostor = 1, Unloaded = 2 };
12
15 float regularRange = 1000.f;
16 float impostorRange = 2000.f;
18};
19
26public:
29
31 [[nodiscard]] Result<void> setTarget(TerrainStreamingCache* cache, float worldUnitsPerSample);
33 void setAuthority(bool enabled);
35 const PcgTerrainStreamingState& state() const noexcept { return state_; }
37 int regularRadiusChunks() const noexcept;
39 int impostorRadiusChunks() const noexcept;
41 [[nodiscard]] Result<TerrainStreamStats> streamAround(int worldSampleX, int worldSampleY, int maxLoads = 0);
43 PcgTerrainStreamingTier tierForDistance(float worldDistance) const noexcept;
44
46 PhotoModeFieldAcceptance acceptsPhotoModeField(const PhotoModeAssignment& assignment) const noexcept override;
48 [[nodiscard]] Result<void> applyPhotoModeField(const PhotoModeAssignment& assignment) override;
49
50private:
51 int rangeToChunks(float range) const noexcept;
52
53 TerrainStreamingCache* cache_ = nullptr;
55 bool authority_ = false;
56};
57
58} // namespace eve::procgen
#define EVENGINE_API_DOMAINS
Definition Export.h:110
Range range
IPhotoModeFieldSink public API.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Explicit PhotoMode owner for a borrowed terrain streaming cache. @lifetime The target cache must outl...
const PcgTerrainStreamingState & state() const noexcept
Return retained world-space range state.
Runtime decoded-chunk cache for an EVTR terrain asset.
PcgTerrainStreamingTier
Runtime representation selected by Pcg's regular and impostor ranges.
PhotoModeFieldAcceptance
Capability implemented by the composition root that routes assignments to domain owners.
bool enabled
One reversible field assignment in a photo-mode transaction.
Pcg world-space terrain streaming ranges and their chunk-space projection.
TerrainStreamStats public API.