VehiclePhysics public API. 更多...
#include <VehiclePhysics.h>
静态 Public 成员函数 | |
| static VehiclePhysicsStatus | attach2D (VehicleEntity *v, eve::physics::World *world) |
| Attach a 2D dynamic body when physics is in the build. | |
| static VehiclePhysicsStatus | attach3D (VehicleEntity *v, eve::physics::World3D *world, float heightY) |
| Attach a 3D dynamic body when physics is in the build. | |
| static VehiclePhysicsStatus | detach (VehicleEntity *v) |
| Destroy attached bodies if any. | |
| static bool | isAttached (VehicleEntity *v) |
| Whether the entity has a live, resolvable physics body. | |
| static float | height (VehicleEntity *v) |
| 3D body height, or 0 when no 3D body is attached. | |
| static VehiclePhysicsStatus | tryWheelMove (VehicleEntity &v, float dt) |
| Step wheel/ship mobility from an attached body. | |
| static void | syncTrackFromBody (VehicleEntity &v) |
| Copy attached body pose into motion for tracked vehicles. | |
| static VehiclePhysicsStatus | tryTrackApply (VehicleEntity &v, float headingRad, float speed) |
| Apply tracked heading/speed to an attached body. | |
| static void | registerBuiltinMobility () |
| Register suspension mobility when physics is in the build. | |
详细描述
VehiclePhysics public API.
在文件 VehiclePhysics.h 第 27 行定义.
成员函数说明
◆ attach2D()
|
static |
Attach a 2D dynamic body when physics is in the build.
在文件 VehiclePhysics.cpp 第 222 行定义.
引用了 eve::vehicle::Applied, b, detach(), eve::physics::PhysicsLink::fromBody(), eve::physics::Body::newCircleFixture(), eve::vehicle::VehicleDefinition::radius, eve::vehicle::Unavailable, v , 以及 world.
◆ attach3D()
|
static |
Attach a 3D dynamic body when physics is in the build.
在文件 VehiclePhysics.cpp 第 245 行定义.
引用了 eve::vehicle::Applied, b, detach(), eve::physics::PhysicsLink::fromBody(), eve::vehicle::VehicleDefinition::radius, eve::physics::Shape3D::setFilterBits(), shape, eve::vehicle::VehicleDefinition::suspension, eve::vehicle::Unavailable, v, eve::vehicle::SuspensionConfig::wheels , 以及 world.
◆ detach()
|
static |
Destroy attached bodies if any.
在文件 VehiclePhysics.cpp 第 273 行定义.
引用了 eve::vehicle::Applied, eve::vehicle::Unavailable , 以及 v.
被这些函数引用 attach2D(), attach3D() , 以及 eve::vehicle::Vehicle::detachPhysics().
◆ height()
|
static |
3D body height, or 0 when no 3D body is attached.
在文件 VehiclePhysics.cpp 第 287 行定义.
被这些函数引用 eve::vehicle::Vehicle::getHeight().
◆ isAttached()
|
static |
Whether the entity has a live, resolvable physics body.
在文件 VehiclePhysics.cpp 第 283 行定义.
引用了 v.
被这些函数引用 eve::vehicle::Vehicle::getPhysicsSpace() , 以及 eve::vehicle::Vehicle::hasPhysics().
◆ registerBuiltinMobility()
|
static |
Register suspension mobility when physics is in the build.
在文件 VehiclePhysics.cpp 第 333 行定义.
◆ syncTrackFromBody()
|
static |
Copy attached body pose into motion for tracked vehicles.
在文件 VehiclePhysics.cpp 第 306 行定义.
◆ tryTrackApply()
|
static |
Apply tracked heading/speed to an attached body.
在文件 VehiclePhysics.cpp 第 318 行定义.
引用了 eve::vehicle::Applied, b, binding, eve::vehicle::Unavailable , 以及 v.
◆ tryWheelMove()
|
static |
Step wheel/ship mobility from an attached body.
在文件 VehiclePhysics.cpp 第 293 行定义.
引用了 eve::vehicle::Applied, b, binding, eve::vehicle::Unavailable , 以及 v.
该类的文档由以下文件生成:
- src/modules/vehicle/VehiclePhysics.h
- src/modules/vehicle/VehiclePhysics.cpp
- src/modules/vehicle/VehiclePhysicsAbsent.cpp