Generation-qualified relationship between one world and one body. 更多...
#include <PhysicsLink.h>
Public 成员函数 | |
| bool | isValid () const noexcept |
| Whether both encoded handle values are non-invalid. | |
| eve::Result< Body * > | resolve (World &world) const |
| Resolves this link against a 2D world or returns StaleHandle. | |
| eve::Result< Body3D * > | resolve (World3D &world) const |
| Resolves this link against a 3D world or returns StaleHandle. | |
静态 Public 成员函数 | |
| static eve::Result< PhysicsLink > | attach (PhysicsWorldHandle world, PhysicsBodyHandle body) |
| Validates and constructs a link from explicit runtime handles. | |
| static eve::Result< PhysicsLink > | fromBody (const Body &body) |
| Creates a link from a live 2D body. | |
| static eve::Result< PhysicsLink > | fromBody (const Body3D &body) |
| Creates a link from a live 3D body. | |
Public 属性 | |
| PhysicsWorldHandle | world = PhysicsWorldHandle::invalid() |
| Process-local owning-world handle. | |
| PhysicsBodyHandle | body = PhysicsBodyHandle::invalid() |
| Process-local solver-body handle. | |
详细描述
Generation-qualified relationship between one world and one body.
isValid() only checks the encoded handle values. resolve() checks owner identity and occupancy, so it is the required stale-handle check after body destruction, world destruction, restore, or hot reload.
在文件 PhysicsLink.h 第 33 行定义.
成员函数说明
◆ attach()
|
static |
Validates and constructs a link from explicit runtime handles.
- 返回
- A link candidate; ownership is verified by resolve().
在文件 PhysicsLink.cpp 第 31 行定义.
引用了 body, eve::Result< T >::failure(), eve::RuntimeHandle< Tag >::isInvalid(), eve::Result< T >::success() , 以及 world.
被这些函数引用 fromBody() , 以及 fromBody().
◆ fromBody() [1/2]
|
static |
Creates a link from a live 2D body.
在文件 PhysicsLink.cpp 第 39 行定义.
引用了 attach(), body, eve::Result< T >::failure(), eve::RuntimeHandle< Tag >::isValid() , 以及 world.
被这些函数引用 eve::fluids::VolumeFluidCoupling::attach(), eve::vehicle::VehiclePhysics::attach2D(), eve::vehicle::VehiclePhysics::attach3D(), eve::pixelworld_physics::PixelFragmentBody::create() , 以及 eve::pixelworld_physics::PixelTerrainCollisionCache::sync().
◆ fromBody() [2/2]
|
static |
Creates a link from a live 3D body.
在文件 PhysicsLink.cpp 第 47 行定义.
引用了 attach(), body, eve::Result< T >::failure(), eve::RuntimeHandle< Tag >::isValid() , 以及 world.
◆ isValid()
|
inlinenoexcept |
◆ resolve() [1/2]
| eve::Result< Body * > eve::physics::PhysicsLink::resolve | ( | World & | world | ) | const |
Resolves this link against a 2D world or returns StaleHandle.
在文件 PhysicsLink.cpp 第 55 行定义.
引用了 body, eve::Result< T >::failure(), isValid(), eve::Result< T >::success() , 以及 world.
被这些函数引用 eve::vehicle::VehiclePhysicsBinding::resolve2D() , 以及 eve::vehicle::VehiclePhysicsBinding::resolve3D().
◆ resolve() [2/2]
| eve::Result< Body3D * > eve::physics::PhysicsLink::resolve | ( | World3D & | world | ) | const |
Resolves this link against a 3D world or returns StaleHandle.
在文件 PhysicsLink.cpp 第 66 行定义.
引用了 body, eve::Result< T >::failure(), isValid(), eve::Result< T >::success() , 以及 world.
类成员变量说明
◆ body
| PhysicsBodyHandle eve::physics::PhysicsLink::body = PhysicsBodyHandle::invalid() |
Process-local solver-body handle.
在文件 PhysicsLink.h 第 37 行定义.
被这些函数引用 attach(), fromBody(), fromBody(), resolve() , 以及 resolve().
◆ world
| PhysicsWorldHandle eve::physics::PhysicsLink::world = PhysicsWorldHandle::invalid() |
Process-local owning-world handle.
在文件 PhysicsLink.h 第 35 行定义.
被这些函数引用 attach(), fromBody(), fromBody(), resolve() , 以及 resolve().
该结构体的文档由以下文件生成:
- src/modules/physics/PhysicsLink.h
- src/modules/physics/PhysicsLink.cpp