Own a CPU snapshot of Pcg's planar-reflection mask and evaluate player movement against it. 更多...
#include <WaterReflectionMasker.h>
Public 成员函数 | |
| Result< void > | configure (WaterReflectionMaskChannel channel, float minimum, float maximum, bool reflectionsEnabled) |
| Configure inclusive thresholds, channel selection and initial scene-profile state. | |
| Result< void > | setMask (const image::ImageData &mask) |
| Replace the owned mask snapshot from any readable ImageData format. | |
| void | clearMask () noexcept |
| Clear the mask; subsequent evaluations disable reflections when state changes. | |
| Result< WaterReflectionMaskTransition > | evaluate (float playerX, float playerZ, float terrainX, float terrainZ, float terrainWidth, float terrainDepth, WaterPlanarReflectionSettings &settings) |
| Sample a player X/Z position in one terrain's origin and size and update planar reflection settings. | |
| bool | getEnabled () const noexcept |
| Return the last published mask state. | |
| 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. | |
详细描述
Own a CPU snapshot of Pcg's planar-reflection mask and evaluate player movement against it.
setMask copies ImageData pixels. evaluate mutates only settings.enabled and the retained height-feature state when the sampled boolean changes; no image or terrain pointer is retained. @thread Game thread only.
在文件 WaterReflectionMasker.h 第 26 行定义.
成员函数说明
◆ clearMask()
|
noexcept |
Clear the mask; subsequent evaluations disable reflections when state changes.
在文件 WaterReflectionMasker.cpp 第 36 行定义.
◆ configure()
| Result< void > eve::graphics::WaterReflectionMasker::configure | ( | WaterReflectionMaskChannel | channel, |
| float | minimum, | ||
| float | maximum, | ||
| bool | reflectionsEnabled | ||
| ) |
Configure inclusive thresholds, channel selection and initial scene-profile state.
在文件 WaterReflectionMasker.cpp 第 17 行定义.
引用了 c, eve::Diagnostic::error(), eve::InvalidArgument, maximum, minimum , 以及 eve::Result< T >::success().
◆ evaluate()
| Result< WaterReflectionMaskTransition > eve::graphics::WaterReflectionMasker::evaluate | ( | float | playerX, |
| float | playerZ, | ||
| float | terrainX, | ||
| float | terrainZ, | ||
| float | terrainWidth, | ||
| float | terrainDepth, | ||
| WaterPlanarReflectionSettings & | settings | ||
| ) |
Sample a player X/Z position in one terrain's origin and size and update planar reflection settings.
在文件 WaterReflectionMasker.cpp 第 38 行定义.
引用了 eve::graphics::A, eve::graphics::B, eve::graphics::Disabled, eve::graphics::Enabled, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::graphics::G, hit, eve::InvalidArgument, p, eve::graphics::R, eve::graphics::RGBA, settings, eve::Result< T >::success(), u, eve::graphics::Unchanged, v, value, x , 以及 y.
◆ getEnabled()
|
inlinenoexcept |
Return the last published mask state.
在文件 WaterReflectionMasker.h 第 40 行定义.
◆ getHeightFeaturesEnabled()
|
inlinenoexcept |
Return Pcg's coupled height-feature state.
在文件 WaterReflectionMasker.h 第 42 行定义.
◆ getSampleX()
|
inlinenoexcept |
Return the most recently sampled pixel X or -1 when no in-bounds pixel was sampled.
在文件 WaterReflectionMasker.h 第 44 行定义.
◆ getSampleY()
|
inlinenoexcept |
Return the most recently sampled pixel Y or -1 when no in-bounds pixel was sampled.
在文件 WaterReflectionMasker.h 第 46 行定义.
◆ setMask()
| Result< void > eve::graphics::WaterReflectionMasker::setMask | ( | const image::ImageData & | mask | ) |
Replace the owned mask snapshot from any readable ImageData format.
在文件 WaterReflectionMasker.cpp 第 27 行定义.
引用了 c, eve::Diagnostic::error(), eve::Result< T >::failure(), height, eve::InvalidArgument, mask, eve::Result< T >::success(), width, x , 以及 y.
该类的文档由以下文件生成:
- src/modules/graphics/WaterReflectionMasker.h
- src/modules/graphics/WaterReflectionMasker.cpp