载入中...
搜索中...
未找到
ShallowWaterField.h
浏览该文件的文档.
107 [[nodiscard("check shallow-water create")]] static Result<std::unique_ptr<ShallowWaterField>> create(
155 [[nodiscard("check shallow-water disturb")]] Result<void> disturbAt(float worldX, float worldZ, float radius,
159 [[nodiscard("check shallow-water impulse")]] Result<void> addImpulse(float worldX, float worldZ, float radius,
186 [[nodiscard]] std::span<const ShallowWaterCollider> colliders() const noexcept { return colliders_; }
209 std::vector<uint32_t>& indices, float visualHeightGain = 1.f, std::vector<float>* colorsRGBA = nullptr) const;
226 [[nodiscard("check shallow-water field image")]] Result<void> copyFieldToImage(image::ImageData& image,
249 [[nodiscard("check shallow-water normal image")]] Result<void> copyNormalToImage(image::ImageData& image,
Move-only, checked operation results for the common layer.
GPU-first shallow-water (2D Saint-Venant) free-surface solver.
Definition ShallowWaterField.h:100
std::span< const float > depths() const noexcept
Definition ShallowWaterField.h:178
std::span< const float > momentumX() const noexcept
Definition ShallowWaterField.h:182
std::span< const float > momentumZ() const noexcept
Definition ShallowWaterField.h:184
float cellSize() const noexcept
Definition ShallowWaterField.h:167
std::span< const float > beds() const noexcept
Definition ShallowWaterField.h:180
ShallowWaterField & operator=(const ShallowWaterField &)=delete
bool usedBackendFallback() const noexcept
Definition ShallowWaterField.h:175
glm::vec3 origin() const noexcept
Definition ShallowWaterField.h:171
bool usingGpu() const noexcept
Definition ShallowWaterField.h:173
int cellCount() const noexcept
Definition ShallowWaterField.h:169
int resolutionZ() const noexcept
Definition ShallowWaterField.h:165
ShallowWaterField(const ShallowWaterField &)=delete
int resolutionX() const noexcept
Definition ShallowWaterField.h:163
std::span< const ShallowWaterCollider > colliders() const noexcept
Definition ShallowWaterField.h:186
Backend-agnostic compute program. Bind storage buffers then dispatch via Gpgpu::dispatch....
Definition ComputeShader.h:15
GPGPU module — compute shaders + storage buffers via the active Graphics backend. Uses the graphics q...
Definition Gpgpu.h:23
Backend-agnostic GPU buffer for compute (storage) or CPU staging transfers. Squirrel-owned; derived c...
Definition GpuBuffer.h:20
@ ImageData
ShallowWaterColliderShape
Analytic obstacle geometry sampled into the shallow-water grid.
Definition ShallowWaterField.h:29
Definition AvatarInstance.h:26
World-space interactor used for character legs / props.
Definition ShallowWaterField.h:38
glm::vec3 halfExtent
Box half extents; capsule uses halfExtent.y as half height.
Definition ShallowWaterField.h:46
unsigned label
Application label; must be unique within one setColliders call.
Definition ShallowWaterField.h:40
float dragScale
Scales horizontal momentum transfer from collider velocity.
Definition ShallowWaterField.h:54
Authoritative settings for a shallow-water heightfield.
Definition ShallowWaterField.h:58
glm::vec3 origin
World-space origin of cell (0,0) corner (Y is bed baseline).
Definition ShallowWaterField.h:66
float viscosity
Artificial viscosity for Lax-Friedrichs stability, in [0, 1].
Definition ShallowWaterField.h:70