载入中...
搜索中...
未找到
OceanGpuSpectrum.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4
5#include <array>
8
9namespace eve::graphics {
10class Graphics;
11}
12namespace eve::gpgpu {
13class Gpgpu;
14}
15namespace eve::fluids {
16class OceanSeaTransition;
17class OceanGpuSpectrum;
18class OceanGpuFrameBuilder;
19class OceanGpuReadbackBuilder;
20
23public:
25 double time() const { return time_; }
26
27private:
28 friend class OceanGpuSpectrum;
31 std::uint64_t owner_ = 0, revision_ = 0;
32 double time_ = 0.0;
33};
34
40 unsigned resolution = 0;
41 double length = 0.0;
42};
45 unsigned resolution = 0, firstRow = 0;
46 double length = 0.0;
47};
53 unsigned width = 0, height = 0, bandCount = 0;
54 double seaLevel = 0.0;
55 std::array<OceanGpuAtlasBand, 4> bands{};
56};
57
88
91public:
103
104private:
105 std::shared_ptr<const OceanSpectrumData> data_, target_;
106 double start_ = 0.0, duration_ = 1.0;
107 graphics::Graphics& graphics_;
108 gpgpu::Gpgpu& compute_;
109};
110
113public:
120
121private:
122 friend class OceanGpuSpectrum;
123 OceanGpuFrameBuilder(OceanGpuSpectrum& owner, double time) : owner_(owner), time_(time) {}
124 OceanGpuSpectrum& owner_;
125 double time_;
126};
127
130public:
136
137private:
138 friend class OceanGpuSpectrum;
140 const OceanGpuSpectrum& owner_;
141 OceanGpuFrameToken token_;
142};
143} // namespace eve::fluids
#define EVENGINE_API_DOMAINS
Definition Export.h:110
OceanGpuFrameToken token
std::shared_ptr< OceanGpuSpectrum > owner
OnnxCompute * compute
Graphics * graphics
uint32_t index
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Synchronous borrowed submission builder; do not retain across owner destruction.
EVENGINE_API_DOMAINS Result< OceanGpuFrameToken > submit() const
Evolve all six spectral fields and inverse FFT in one command sequence; no CPU readback....
Opaque revision of a completed GPU ocean; copying does not extend resource lifetime.
double time() const
Simulation timestamp of this completed projection.
Borrowed diagnostic readback builder; revision checked again at build, never silently reads a newer f...
EVENGINE_API_DOMAINS Result< OceanSpectrumFrame > build() const
Download a completed projection into an owning CPU frame for parity tests and diagnostics....
Prepare GPU allocation from an owning immutable spectrum lease; providers borrowed through build().
EVENGINE_API_DOMAINS Result< std::unique_ptr< OceanGpuSpectrum > > build() const
Allocate compiled pipelines and band buffers; Unsupported explicitly selects a caller-chosen CPU path...
Render-thread-owned GPU projection of immutable spectral coefficients, with no independent clock....
EVENGINE_API_DOMAINS Result< OceanGpuBandView > band(const OceanGpuFrameToken &token, unsigned index) const
Validate revision and borrow one band for immediate same-device consumption; no allocation.
EVENGINE_API_DOMAINS OceanGpuFrameBuilder frameBuilder(double time)
Prepare a cheap call-only builder; owner must outlive submit().
EVENGINE_API_DOMAINS OceanGpuReadbackBuilder readbackBuilder(const OceanGpuFrameToken &token) const
Prepare explicit diagnostic readback; no readback occurs in normal GPU rendering.
OceanGpuSpectrum & operator=(const OceanGpuSpectrum &)=delete
OceanGpuSpectrum(const OceanGpuSpectrum &)=delete
EVENGINE_API_DOMAINS ~OceanGpuSpectrum()
EVENGINE_API_DOMAINS Result< OceanGpuAtlasView > atlas(const OceanGpuFrameToken &token) const
Validate revision and borrow the complete rendering atlas for immediate same-device copying.
Immutable finite sea-state transition; the caller supplies the only simulation clock....
Immutable initial spectrum; data is shared only with owning frame builders.
GPGPU module — compute shaders + storage buffers via the active Graphics backend. Uses the graphics q...
Definition Gpgpu.h:23
GLSL compute kernels for the GPU surface-flow solver.
Definition FluidTarget.h:12
Fluids module — interactive surface fluid simulation.
Definition Fluids.h:35
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Transient backend buffer slice shared between sibling GPU modules. @ownership Non-owning; nativeHandl...
One band's XYZ displacement planes in the resident rendering atlas.
Call-only borrowed packed float atlas; each four RGBA8 bytes preserve one float's bits....
std::array< OceanGpuAtlasBand, 4 > bands
Call-only borrowed planar float buffer: displacement XYZ then velocity XYZ, each N*N floats....
GpuResidentBufferView buffer