载入中...
搜索中...
未找到
PcgBiomeController.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Result.h"
5
6namespace eve::procgen {
7
10
13 double centerX = 0.0;
14 double centerY = 0.0;
15 double centerZ = 0.0;
16 double sizeX = 0.0;
17 double sizeY = 0.0;
18 double sizeZ = 0.0;
19};
20
28public:
30 [[nodiscard]] Result<void> configure(double x, double y, double z, double range,
31 double impostorLoadingRange, PcgBiomeLoadMode mode);
33 [[nodiscard]] Result<void> fitToTerrain(double minX, double originY, double minZ,
34 double sizeX, double sizeY, double sizeZ);
36 [[nodiscard]] Result<void> fitToAllTerrains(double minX, double minY, double minZ,
37 double sizeX, double sizeY, double sizeZ);
39 [[nodiscard]] PcgTerrainStreamingTier tierAt(double x, double y, double z) const noexcept;
41 [[nodiscard]] const PcgBiomeLoadingBounds& regularBounds() const noexcept { return regular_; }
43 [[nodiscard]] const PcgBiomeLoadingBounds& impostorBounds() const noexcept { return impostor_; }
45 [[nodiscard]] double range() const noexcept { return range_; }
47 [[nodiscard]] PcgBiomeLoadMode loadMode() const noexcept { return mode_; }
48
49private:
50 [[nodiscard]] Result<void> publish(double x, double y, double z, double range,
51 double impostorLoadingRange, PcgBiomeLoadMode mode);
52
53 PcgBiomeLoadingBounds regular_{};
54 PcgBiomeLoadingBounds impostor_{};
55 double x_ = 0.0;
56 double y_ = 0.0;
57 double z_ = 0.0;
58 double range_ = 0.0;
59 double impostorLoadingRange_ = 0.0;
60 PcgBiomeLoadMode mode_ = PcgBiomeLoadMode::Disabled;
61};
62
63} // namespace eve::procgen
float y
Definition AnimClip.cpp:738
float x
Definition AnimClip.cpp:738
float z
Definition AnimClip.cpp:738
#define EVENGINE_API_DOMAINS
Definition Export.h:110
Range range
Move-only, checked operation results for the common layer.
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Native runtime state for Pcg BiomeController placement and automatic terrain loading bounds.
const PcgBiomeLoadingBounds & impostorBounds() const noexcept
Return the impostor terrain loading bounds.
const PcgBiomeLoadingBounds & regularBounds() const noexcept
Return the regular terrain loading bounds.
double range() const noexcept
Return the current biome radius.
PcgBiomeLoadMode loadMode() const noexcept
Return the current TerrainLoader mode.
Result< int > publish(Heightmap &target, std::vector< float > candidate)
Publish.
PcgTerrainStreamingTier
Runtime representation selected by Pcg's regular and impostor ranges.
PcgBiomeLoadMode
Pcg TerrainLoader activation modes retained by a biome controller.
Axis-aligned world-space loading bounds owned by one biome controller.