载入中...
搜索中...
未找到
VehiclePhysicsAbsent.cpp
浏览该文件的文档.
2
3namespace eve::vehicle {
4
7}
8
11}
12
14
15bool VehiclePhysics::isAttached(VehicleEntity*) { return false; }
16
17float VehiclePhysics::height(VehicleEntity*) { return 0.f; }
18
21}
22
23Result<VehiclePhysicsStatus> VehiclePhysics::submitWheelStep(VehicleEntity&, const SimulationStep&) {
25}
26Result<VehiclePhysicsStatus> VehiclePhysics::synchronizeWheelState(VehicleEntity&) {
28}
29
30void VehiclePhysics::syncTrackFromBody(VehicleEntity&) {}
31
32VehiclePhysicsStatus VehiclePhysics::tryTrackApply(VehicleEntity&, float, float) {
34}
35
37
38} // namespace eve::vehicle
static Result success(T value)
Construct a successful result owning value.
Definition Result.h:185
Box3D rigid-body world. Script coordinates are meters (Box3D native), unlike 2D World which uses pixe...
Definition World3D.h:47
Box2D world wrapper (2D physics) with pixel-space coordinates. Handles stepping, gravity,...
Definition World.h:44
static Result< VehiclePhysicsStatus > synchronizeWheelState(VehicleEntity &v)
Publish wheel candidates only after their physics step succeeds; no force submission.
static Result< VehiclePhysicsStatus > submitWheelStep(VehicleEntity &v, const SimulationStep &step)
Submit top-down 2D or ray-suspension 3D wheel forces for an exact positive fixed step; no solver adva...
static VehiclePhysicsStatus detach(VehicleEntity *v)
Destroy attached bodies if any.
static VehiclePhysicsStatus tryWheelMove(VehicleEntity &v, float dt)
Step wheel/ship mobility from an attached body.
static void registerBuiltinMobility()
Register suspension mobility when physics is in the build.
static void syncTrackFromBody(VehicleEntity &v)
Copy attached body pose into motion for tracked vehicles.
static VehiclePhysicsStatus attach2D(VehicleEntity *v, eve::physics::World *world)
Attach a 2D dynamic body when physics is in the build.
static VehiclePhysicsStatus tryTrackApply(VehicleEntity &v, float headingRad, float speed)
Apply tracked heading/speed to an attached body.
static bool isAttached(VehicleEntity *v)
Whether the entity has a live, resolvable physics body.
static VehiclePhysicsStatus attach3D(VehicleEntity *v, eve::physics::World3D *world, float heightY)
Attach a 3D dynamic body when physics is in the build.
static float height(VehicleEntity *v)
3D body height, or 0 when no 3D body is attached.
驾驶者接口与玩家控制状态。
VehiclePhysicsStatus
Outcome of an optional physics attach, detach, or mobility step.
@ Unavailable
No physics module or no attached body.