载入中...
搜索中...
未找到
WaterReflectionMasker.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Result.h"
4
5#include <cstdint>
6#include <vector>
7
8namespace ssq { class Table; }
9namespace eve::image { class ImageData; }
10
11namespace eve::graphics {
12
13struct WaterPlanarReflectionSettings;
14
16enum class WaterReflectionMaskChannel { R = 0, G = 1, B = 2, A = 3, RGBA = 4 };
19
27public:
29 [[nodiscard]] Result<void> configure(WaterReflectionMaskChannel channel, float minimum, float maximum,
30 bool reflectionsEnabled);
32 [[nodiscard]] Result<void> setMask(const image::ImageData& mask);
34 void clearMask() noexcept;
36 [[nodiscard]] Result<WaterReflectionMaskTransition> evaluate(float playerX, float playerZ,
37 float terrainX, float terrainZ, float terrainWidth, float terrainDepth,
40 bool getEnabled() const noexcept { return enabled_; }
42 bool getHeightFeaturesEnabled() const noexcept { return heightFeaturesEnabled_; }
44 int getSampleX() const noexcept { return sampleX_; }
46 int getSampleY() const noexcept { return sampleY_; }
47
48private:
49 struct Pixel { float r=0.f,g=0.f,b=0.f,a=0.f; };
50 WaterReflectionMaskChannel channel_ = WaterReflectionMaskChannel::R;
51 float minimum_ = .35f;
52 float maximum_ = 1.f;
53 int width_ = 0;
54 int height_ = 0;
55 std::vector<Pixel> pixels_;
56 bool enabled_ = false;
57 bool heightFeaturesEnabled_ = false;
58 int sampleX_ = -1;
59 int sampleY_ = -1;
60};
61
64
65} // namespace eve::graphics
int mask
#define EVENGINE_API_BACKENDS
Definition Export.h:108
float maximum[3]
float minimum[3]
tensor::Graph g
Definition GpuGraph.cpp:7
double r
MeleePoint3 b
Definition MeleeHit.cpp:41
MeleePoint3 a
Definition MeleeHit.cpp:40
Move-only, checked operation results for the common layer.
TerrainThermalSettings settings
Move-only operation result carrying either a value or Status.
Definition Result.h:155
Own a CPU snapshot of Pcg's planar-reflection mask and evaluate player movement against it.
bool getHeightFeaturesEnabled() const noexcept
Return Pcg's coupled height-feature state.
int getSampleX() const noexcept
Return the most recently sampled pixel X or -1 when no in-bounds pixel was sampled.
int getSampleY() const noexcept
Return the most recently sampled pixel Y or -1 when no in-bounds pixel was sampled.
bool getEnabled() const noexcept
Return the last published mask state.
Represents raw pixel data.
Definition ImageData.h:38
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
WaterReflectionMaskChannel
Pcg ReflectionMasker channel selection.
void exposeWaterReflectionMaskerBindings(ssq::Table &table)
Register Pcg reflection-mask bindings.
WaterReflectionMaskTransition
Observable reflection-state transition after one player-position sample.
enum EVENGINE_API_FOUNDATION Table
OT_TABLE (editable via Runtime table APIs / ReflectedPropertyModel).
Definition Runtime.h:121
EVEngine ECS 集成层:底层实现使用 sunxfancy/ECS.hpp https://github.com/sunxfancy/ECS.hpp
Definition ECS.h:14
Authored planar-reflection policy with no camera or texture ownership.