Water-force adapter over a World3D-owned rigid body, storing generation-qualified links only. All operations are physics-owner-thread-only and invoke no callbacks. Destroying this adapter never destroys the body. Body/world destruction makes the next submission return StaleHandle. Recreate the adapter after restore/hot reload; process-local links are never serialized. 更多...
#include <OceanBoat.h>
类 | |
| struct | Impl |
Public 成员函数 | |
| EVENGINE_API_DOMAINS | ~OceanBoat () |
| OceanBoat (const OceanBoat &)=delete | |
| OceanBoat & | operator= (const OceanBoat &)=delete |
| 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. | |
静态 Public 成员函数 | |
| 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. | |
详细描述
Water-force adapter over a World3D-owned rigid body, storing generation-qualified links only. All operations are physics-owner-thread-only and invoke no callbacks. Destroying this adapter never destroys the body. Body/world destruction makes the next submission return StaleHandle. Recreate the adapter after restore/hot reload; process-local links are never serialized.
在文件 OceanBoat.h 第 59 行定义.
构造及析构函数说明
◆ ~OceanBoat()
|
default |
◆ OceanBoat()
成员函数说明
◆ apply()
| Result< OceanBoatReceipt > eve::fluids::OceanBoat::apply | ( | const OceanWaterView & | frame, |
| double | dt, | ||
| double | throttle, | ||
| double | rudder | ||
| ) |
Submit buoyancy, body-local directional drag, submerged thrust and rudder forces before physics.
- 参数
-
frame Immutable water at this fixed-step time; borrowed only for this call. dt Fixed seconds in (0,1/30]; used to bound dissipative impulses. throttle Engine command in [-1,1]. rudder Steering command in [-1,1].
- 返回
- Owning contacts/force receipt or structured failure. Validation and all queries finish before any force is submitted. Each timestamp can be submitted only once to this adapter. @thread Physics owner only; no callbacks. Rejected calls preserve adapter and body state.
在文件 OceanBoat.cpp 第 54 行定义.
引用了 area, axis, body, cell, eve::fluids::OceanBoatReceipt::contacts, dt, eve::fluids::evaluateOceanCellForce(), f, eve::Result< T >::failure(), eve::physics::World3D::findWorld(), finite, force, fraction, frame, h, eve::InvalidArgument, local, p, position, eve::fluids::OceanBuoyancyCell::radius, relative, resolved, rotation, eve::StaleHandle, eve::fluids::OceanBoatReceipt::submergedVolume, eve::Result< T >::success(), eve::fluids::OceanBoatReceipt::time, eve::fluids::OceanBoatReceipt::totalForce, v, eve::fluids::ocean_script::vector(), velocity , 以及 water.
◆ create()
|
static |
Validate/copy a bounded hull and attach to a live dynamic body.
- 参数
-
body Borrowed only during attachment; the World3D remains its sole owner. settings At most 64 cells, with finite positive radii and displacement volumes.
- 返回
- Owned adapter or structured input/stale failure; does not mutate the body.
在文件 OceanBoat.cpp 第 31 行定义.
引用了 body, c, finite, eve::physics::PhysicsLink::fromBody(), impl, eve::InvalidArgument, link, s , 以及 eve::fluids::ocean_script::vector().
◆ operator=()
该类的文档由以下文件生成:
- src/modules/fluids/OceanBoat.h
- src/modules/fluids/OceanBoat.cpp