载入中...
搜索中...
未找到
OceanBoat.h
浏览该文件的文档.
1#pragma once
2
3#include "common/Export.h"
4
6
7#include <memory>
8
9namespace eve::physics {
10class Body3D;
11}
12namespace eve::fluids {
15 glm::dvec3 center{0.0};
16 double radius = 0.5;
17 double volume = 0.5;
18};
21 std::vector<OceanHullCell> cells;
22 double waterDensity = 1025.0;
23 double gravity = 9.81;
24 glm::dvec3 drag{1.2, 1.5, 0.15};
25 glm::dvec3 propeller{0.0, -0.3, -1.5};
26 double thrust = 3000.0;
27 double rudderCoefficient = 200.0;
28};
31 glm::dvec3 position{0.0};
32 glm::dvec3 relativeVelocity{0.0};
33 double submergedVolume = 0.0;
34};
37 double time = 0.0;
38 glm::dvec3 totalForce{0.0};
39 double submergedVolume = 0.0;
40 std::vector<OceanBoatContact> contacts;
41};
52 double dt);
59class OceanBoat {
60public:
70 OceanBoat(const OceanBoat&) = delete;
71 OceanBoat& operator=(const OceanBoat&) = delete;
83 double throttle, double rudder);
84
85private:
86 struct Impl;
87 explicit OceanBoat(std::unique_ptr<Impl> impl);
88 std::unique_ptr<Impl> impl_;
89};
90} // namespace eve::fluids
void * impl
#define EVENGINE_API_DOMAINS
Definition Export.h:110
OceanWakeSettings settings
ssq::Object wake
ssq::Object frame
double dt
std::string body
Move-only operation result carrying either a value or Status.
Definition Result.h:176
Water-force adapter over a World3D-owned rigid body, storing generation-qualified links only....
Definition OceanBoat.h:59
EVENGINE_API_DOMAINS Result< OceanBoatReceipt > apply(const OceanWaterView &frame, double dt, double throttle, double rudder)
Submit buoyancy, body-local directional drag, submerged thrust and rudder forces before physics.
Definition OceanBoat.cpp:54
OceanBoat(const OceanBoat &)=delete
OceanBoat & operator=(const OceanBoat &)=delete
static EVENGINE_API_DOMAINS Result< std::unique_ptr< OceanBoat > > create(physics::Body3D &body, const OceanHullSettings &settings)
Validate/copy a bounded hull and attach to a live dynamic body.
Definition OceanBoat.cpp:31
EVENGINE_API_DOMAINS ~OceanBoat()
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...
Backend-neutral 3D rigid body in meter-space coordinates (+Y up by convention). Owned by a World3D; c...
Definition Body3D.h:31
GLSL compute kernels for the GPU surface-flow solver.
Definition FluidTarget.h:12
EVENGINE_API_DOMAINS Result< void > injectOceanBoatWake(OceanWake &wake, const OceanBoatReceipt &receipt, double dt)
Convert wet hull motion to bounded bow/stern dipoles and vertical impacts in a local wave field.
Optional physics backend for vehicle mobility and body attach.
Definition Climbing.h:36
Owning wet hull sample for wake/foam consumers; no rigid-body pointer escapes.
Definition OceanBoat.h:30
Owning fixed-step force receipt; consumers may retain it for wake injection.
Definition OceanBoat.h:36
std::vector< OceanBoatContact > contacts
Definition OceanBoat.h:40
Body-local displacement cell; volumes sum to the hull's assigned displacement capacity.
Definition OceanBoat.h:14
Hull water response; local +Z forward, +X starboard, +Y up.
Definition OceanBoat.h:20
std::vector< OceanHullCell > cells
Definition OceanBoat.h:21