载入中...
搜索中...
未找到
eve::vehicle::VehiclePhysics类 参考

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()

VehiclePhysicsStatus eve::vehicle::VehiclePhysics::attach2D ( VehicleEntity *  v,
eve::physics::World *  world 
)
static

◆ attach3D()

◆ detach()

VehiclePhysicsStatus eve::vehicle::VehiclePhysics::detach ( VehicleEntity *  v)
static

Destroy attached bodies if any.

在文件 VehiclePhysics.cpp 第 273 行定义.

引用了 eve::vehicle::Applied, eve::vehicle::Unavailable , 以及 v.

被这些函数引用 attach2D(), attach3D() , 以及 eve::vehicle::Vehicle::detachPhysics().

◆ height()

float eve::vehicle::VehiclePhysics::height ( VehicleEntity *  v)
static

3D body height, or 0 when no 3D body is attached.

在文件 VehiclePhysics.cpp 第 287 行定义.

引用了 binding, body , 以及 v.

被这些函数引用 eve::vehicle::Vehicle::getHeight().

◆ isAttached()

bool eve::vehicle::VehiclePhysics::isAttached ( VehicleEntity *  v)
static

Whether the entity has a live, resolvable physics body.

在文件 VehiclePhysics.cpp 第 283 行定义.

引用了 v.

被这些函数引用 eve::vehicle::Vehicle::getPhysicsSpace() , 以及 eve::vehicle::Vehicle::hasPhysics().

◆ registerBuiltinMobility()

void eve::vehicle::VehiclePhysics::registerBuiltinMobility ( )
static

Register suspension mobility when physics is in the build.

在文件 VehiclePhysics.cpp 第 333 行定义.

引用了 eve::vehicle::VehicleSystem::registerMobility().

◆ syncTrackFromBody()

void eve::vehicle::VehiclePhysics::syncTrackFromBody ( VehicleEntity &  v)
static

Copy attached body pose into motion for tracked vehicles.

在文件 VehiclePhysics.cpp 第 306 行定义.

引用了 b, binding , 以及 v.

◆ tryTrackApply()

VehiclePhysicsStatus eve::vehicle::VehiclePhysics::tryTrackApply ( VehicleEntity &  v,
float  headingRad,
float  speed 
)
static

Apply tracked heading/speed to an attached body.

在文件 VehiclePhysics.cpp 第 318 行定义.

引用了 eve::vehicle::Applied, b, binding, eve::vehicle::Unavailable , 以及 v.

◆ tryWheelMove()

VehiclePhysicsStatus eve::vehicle::VehiclePhysics::tryWheelMove ( VehicleEntity &  v,
float  dt 
)
static

Step wheel/ship mobility from an attached body.

在文件 VehiclePhysics.cpp 第 293 行定义.

引用了 eve::vehicle::Applied, b, binding, eve::vehicle::Unavailable , 以及 v.


该类的文档由以下文件生成: