载入中...
搜索中...
未找到
VolumeFluidCoupling.h
浏览该文件的文档.
1#pragma once
2
3#include <memory>
4#include <span>
5#include "common/Export.h"
6#include "common/Result.h"
7
8namespace eve::physics {
9class Body3D;
10class World3D;
11} // namespace eve::physics
12namespace eve::fluids {
13class VolumeFluid;
14struct VolumeFluidCollider;
15struct VolumeFluidSdfCollider;
16struct VolumeFluidThermalRule;
17
30public:
38 [[nodiscard]] Result<void> attach(physics::Body3D& body, const VolumeFluidCollider& localShape);
48 [[nodiscard]] Result<void> attachSdf(physics::Body3D& body, const VolumeFluidSdfCollider& localSdf);
50 void detach(unsigned label);
58 [[nodiscard]] Result<void> setImpulseLimits(float maximumLinearDelta, float maximumAngularDelta);
60 [[nodiscard]] unsigned lastClampedBodyCount() const;
76 [[nodiscard]] Result<unsigned> step(physics::World3D& world, VolumeFluid& fluid, float dt, unsigned substeps = 4,
77 std::span<const VolumeFluidThermalRule> rules = {});
78
79private:
80 struct Impl;
81 std::unique_ptr<Impl> impl_;
82};
83} // namespace eve::fluids
#define EVENGINE_API_DOMAINS
Definition Export.h:110
std::string label
double dt
std::string body
Move-only, checked operation results for the common layer.
float step
Definition TreeMesh.cpp:451
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Process-local generation-checked bridge between fluid samples and rigid bodies. @ownership Owns local...
VolumeFluidCoupling(const VolumeFluidCoupling &)=delete
VolumeFluidCoupling & operator=(const VolumeFluidCoupling &)=delete
~VolumeFluidCoupling()
Volume fluid coupling.
CPU position-based free-volume fluid with a bounded spatial grid. @ownership Owns all particle state;...
Backend-neutral 3D rigid body in meter-space coordinates (+Y up by convention). Owned by a World3D; c...
Definition Body3D.h:31
Box3D rigid-body world. Script coordinates are meters (Box3D native), unlike 2D World which uses pixe...
Definition World3D.h:47
GLSL compute kernels for the GPU surface-flow solver.
Definition FluidTarget.h:12
Optional physics backend for vehicle mobility and body attach.
Definition Climbing.h:36
Owned obstacle sample; the caller updates moving obstacles before stepping.
Owned sampled mesh/SDF collider with a uniform world transform.