Immutable analytic sea shared by geometry and buoyancy consumers. Owns every wave; no scene, GPU or physics pointer is retained. Concurrent const queries are safe. Time is supplied by the simulation owner, never read internally. Identical inputs are repeatable on one backend; cross-platform parity is numerical, not bitwise. The sum of horizontal steepness is bounded to keep inversion unique. 更多...
#include <OceanSurface.h>
Public 成员函数 | |
| EVENGINE_API_DOMAINS Result< OceanSurfaceSample > | sample (glm::dvec2 worldXZ, double time) const |
| Invert horizontal displacement and sample the actual world-space surface. | |
| EVENGINE_API_DOMAINS Result< glm::dvec3 > | position (glm::dvec2 parameterXZ, double time) const |
| Displace a material-space mesh point using the same wave function as queries. | |
静态 Public 成员函数 | |
| static EVENGINE_API_DOMAINS Result< OceanSurface > | create (const OceanSurfaceSettings &settings) |
| Validate and copy a wave set, normalizing direction vectors. | |
详细描述
Immutable analytic sea shared by geometry and buoyancy consumers. Owns every wave; no scene, GPU or physics pointer is retained. Concurrent const queries are safe. Time is supplied by the simulation owner, never read internally. Identical inputs are repeatable on one backend; cross-platform parity is numerical, not bitwise. The sum of horizontal steepness is bounded to keep inversion unique.
在文件 OceanSurface.h 第 48 行定义.
成员函数说明
◆ create()
|
static |
Validate and copy a wave set, normalizing direction vectors.
- 参数
-
settings Borrowed only during this call; at most 64 finite components.
- 返回
- Owned immutable surface or InvalidArgument; no external state changes.
在文件 OceanSurface.cpp 第 53 行定义.
引用了 finite, settings, eve::Result< T >::success(), eve::fluids::ocean_script::vector() , 以及 w.
◆ position()
| Result< glm::dvec3 > eve::fluids::OceanSurface::position | ( | glm::dvec2 | parameterXZ, |
| double | time | ||
| ) | const |
Displace a material-space mesh point using the same wave function as queries.
- 返回
- World position or InvalidArgument for invalid coordinates/time. @thread Const and reentrant; no retained inputs or callbacks.
在文件 OceanSurface.cpp 第 73 行定义.
引用了 position, eve::Result< T >::success(), time , 以及 eve::fluids::ocean_script::vector().
◆ sample()
| Result< OceanSurfaceSample > eve::fluids::OceanSurface::sample | ( | glm::dvec2 | worldXZ, |
| double | time | ||
| ) | const |
Invert horizontal displacement and sample the actual world-space surface.
- 参数
-
worldXZ Finite world coordinates in metres, magnitude at most 1e9. time Injected seconds, magnitude at most 1e9.
- 返回
- Height, normal and approximate particle velocity, or InvalidArgument. @thread Const, reentrant; no callbacks and no retained input references.
在文件 OceanSurface.cpp 第 78 行定义.
引用了 eve::fluids::OceanSurfaceSample::height, q, sample(), eve::Result< T >::success(), time , 以及 eve::fluids::ocean_script::vector().
被这些函数引用 sample().
该类的文档由以下文件生成:
- src/modules/fluids/OceanSurface.h
- src/modules/fluids/OceanSurface.cpp