载入中...
搜索中...
未找到
OceanRenderer.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4
6#include "fluids/OceanMesh.h"
7
8#include <memory>
9
10namespace eve::graphics {
11class Graphics;
12}
13namespace eve::fluids {
14class OceanWake;
15class OceanHullMaskFrame;
16class OceanHullMaskPublication;
17class OceanGpuRenderFrameBuilder;
18class OceanRendererBuilder;
58
79public:
80 glm::dvec2 center{0.0};
81 glm::dvec3 origin{0.0};
83 const OceanWake* wake = nullptr;
90
91private:
92 friend class OceanRenderer;
95 : renderer_(renderer), spectrum_(spectrum), token_(token) {}
96 OceanRenderer& renderer_;
97 const OceanGpuSpectrum& spectrum_;
98 OceanGpuFrameToken token_;
99};
102public:
109
110private:
111 friend class OceanRenderer;
113 : renderer_(renderer), frame_(frame) {}
114 OceanRenderer& renderer_;
115 const OceanHullMaskFrame& frame_;
116};
117} // namespace eve::fluids
#define EVENGINE_API_DOMAINS
Definition Export.h:110
OceanGpuFrameToken token
std::shared_ptr< OceanRenderer > renderer
ssq::Object frame
ssq::Object water
Graphics * graphics
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Opaque revision of a completed GPU ocean; copying does not extend resource lifetime.
Borrowed GPU rendering publication, with optional synchronous local wake upload. Does not retain inpu...
EVENGINE_API_DOMAINS Result< void > publish() const
Copy the completed resident atlas and optional wake to inactive textures, then publish atomically....
const OceanWake * wake
Borrow wake until publish returns; nullptr explicitly renders the open sea without a local wake.
Render-thread-owned GPU projection of immutable spectral coefficients, with no independent clock....
Immutable owning render-only union of convex dry volumes. No body handles, callbacks,...
Borrowed mask upload; no frame or vessel pointer is retained after publication.
EVENGINE_API_DOMAINS Result< void > publish() const
Upload into the inactive texture and publish only on success; empty clears the mask.
Prepare CPU reference vertices from the same water view used by rigid bodies. Borrows mesh and water ...
Definition OceanMesh.h:64
Prepare renderer quality; borrows Graphics only until build returns.
EVENGINE_API_DOMAINS Result< std::unique_ptr< OceanRenderer > > build() const
Allocate shader and fixed topology, publishing only a complete renderer.
OceanRendererBuilder(graphics::Graphics &graphics)
Select the live graphics provider on its owner thread.
Graphics projection of an ocean; never owns or advances simulation state. Render-thread only,...
EVENGINE_API_DOMAINS OceanHullMaskPublication hullMaskBuilder(const OceanHullMaskFrame &frame)
Borrow a mask frame for synchronous upload; keep frame and renderer alive until publish returns.
OceanRenderer(const OceanRenderer &)=delete
EVENGINE_API_DOMAINS OceanGpuRenderFrameBuilder gpuFrameBuilder(const OceanGpuSpectrum &spectrum, const OceanGpuFrameToken &token)
Prepare a borrowed GPU publication; owners must remain alive and unchanged through publish().
EVENGINE_API_DOMAINS OceanMeshFrameBuilder frameBuilder(const OceanWaterView &water) const
Prepare a cheap borrowed CPU projection builder; set center/origin before building.
OceanRenderer & operator=(const OceanRenderer &)=delete
EVENGINE_API_DOMAINS Result< void > draw()
Draw the published frame in the current 3D pass; camera/scene must use its render origin.
EVENGINE_API_DOMAINS ~OceanRenderer()
EVENGINE_API_DOMAINS Result< void > publish(const OceanMeshFrame &frame)
Publish a prepared owning vertex frame; input is borrowed only for this call.
Caller-owned wave field with finite-depth gravity dispersion and absorbing boundaries....
Definition OceanWake.h:53
Synchronous borrowed composition of the spectral sea and an optional local wake. Both owners must out...
GLSL compute kernels for the GPU surface-flow solver.
Definition FluidTarget.h:12
OceanRenderBackend
Explicit projection backend; GPU mode never silently substitutes CPU vertex uploads.
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition Animation.h:25
Owning CPU reference projection, ready for a mesh upload; simulation time and origin identify the fra...
Definition OceanMesh.h:49
Camera-centered concentric square rings with shared vertices and continuous distance grading.
Definition OceanMesh.h:15