类 | |
| struct | Access |
| Private bridge used exclusively by Box3D composition and native query code. 更多... | |
| class | WorldBackend |
函数 | |
| std::unique_ptr< IBodyBackend3D > | adoptBody (b3BodyId id) |
| Internal native ABI adoption boundary; transfers sole body ownership, simulation thread only. | |
| std::unique_ptr< IJointBackend3D > | adoptJoint (b3JointId id, JointKind3D kind) |
| Adopts a live Box3D constraint; internal native composition boundary, simulation thread only. | |
| eve::Result< std::unique_ptr< IShapeBackend3D > > | makeShape (b3BodyId body, const ShapeGeometry3D &geometry, float density, float friction, float restitution) |
| Internal native shape factory; transfers native/cooked ownership on success. @cost Cooks the supplied geometry once at creation, on the simulation thread. | |
| b3HullData * | createCheckedHull (const std::vector< float > &vertices, int maxVertices, const char *operation) |
| Validates and cooks native geometry; throws on invalid input. @ownership Transfers native allocation to caller; release with b3DestroyHull. Simulation thread only. @cost Geometry-sized allocation and preprocessing per topology edit; retain cooked geometry across frames. | |
| b3MeshData * | createCheckedMesh (const std::vector< float > &vertices, const std::vector< int32_t > &indices, bool weldVertices, float weldTolerance, bool identifyEdges, bool useMedianSplit, b3Transform transform, const std::vector< uint8_t > *materialIndices, const char *operation) |
| Validates and cooks native geometry; throws on invalid input. @ownership Transfers native allocation to caller; release with b3DestroyMesh. Simulation thread only. @cost Geometry-sized allocation and preprocessing per topology edit; retain cooked geometry across frames. | |
| b3HeightFieldData * | createCheckedHeightField (int countX, int countZ, float cellSizeX, float cellSizeZ, const std::vector< float > &heights, float globalMin, float globalMax, bool clockwiseWinding, const char *operation) |
| Validates and cooks native geometry; throws on invalid input. @ownership Transfers native allocation to caller; release with b3DestroyHeightField. Simulation thread only. @cost Geometry-sized allocation and preprocessing per topology edit; retain cooked geometry across frames. | |
| eve::Result< std::unique_ptr< IWorldBackend3D > > | makeWorld (World3D &owner, float gx, float gy, float gz, bool sleep) |
| Native-world composition boundary; returns exclusive ownership or a structured failure. @cost One solver-world allocation per world creation; simulation thread, no callbacks. | |
函数说明
◆ adoptBody()
| std::unique_ptr< IBodyBackend3D > eve::physics::box3d::adoptBody | ( | b3BodyId | id | ) |
Internal native ABI adoption boundary; transfers sole body ownership, simulation thread only.
在文件 Box3DBody.cpp 第 648 行定义.
◆ adoptJoint()
| std::unique_ptr< IJointBackend3D > eve::physics::box3d::adoptJoint | ( | b3JointId | id, |
| JointKind3D | kind | ||
| ) |
Adopts a live Box3D constraint; internal native composition boundary, simulation thread only.
在文件 Box3DJoint.cpp 第 631 行定义.
引用了 kind.
被这些函数引用 eve::physics::box3d::WorldBackend::newDistanceJoint(), eve::physics::box3d::WorldBackend::newFilterJoint(), eve::physics::box3d::WorldBackend::newMotorJoint(), eve::physics::box3d::WorldBackend::newParallelJoint(), eve::physics::box3d::WorldBackend::newPrismaticJoint(), eve::physics::box3d::WorldBackend::newRevoluteJoint(), eve::physics::box3d::WorldBackend::newSphericalJoint(), eve::physics::box3d::WorldBackend::newWeldJoint() , 以及 eve::physics::box3d::WorldBackend::newWheelJoint().
◆ createCheckedHeightField()
| b3HeightFieldData * eve::physics::box3d::createCheckedHeightField | ( | int | countX, |
| int | countZ, | ||
| float | cellSizeX, | ||
| float | cellSizeZ, | ||
| const std::vector< float > & | heights, | ||
| float | globalMin, | ||
| float | globalMax, | ||
| bool | clockwiseWinding, | ||
| const char * | operation | ||
| ) |
Validates and cooks native geometry; throws on invalid input. @ownership Transfers native allocation to caller; release with b3DestroyHeightField. Simulation thread only. @cost Geometry-sized allocation and preprocessing per topology edit; retain cooked geometry across frames.
在文件 Box3DShapeCook.cpp 第 66 行定义.
◆ createCheckedHull()
| b3HullData * eve::physics::box3d::createCheckedHull | ( | const std::vector< float > & | vertices, |
| int | maxVertices, | ||
| const char * | operation | ||
| ) |
Validates and cooks native geometry; throws on invalid input. @ownership Transfers native allocation to caller; release with b3DestroyHull. Simulation thread only. @cost Geometry-sized allocation and preprocessing per topology edit; retain cooked geometry across frames.
在文件 Box3DShapeCook.cpp 第 5 行定义.
◆ createCheckedMesh()
| b3MeshData * eve::physics::box3d::createCheckedMesh | ( | const std::vector< float > & | vertices, |
| const std::vector< int32_t > & | indices, | ||
| bool | weldVertices, | ||
| float | weldTolerance, | ||
| bool | identifyEdges, | ||
| bool | useMedianSplit, | ||
| b3Transform | transform, | ||
| const std::vector< uint8_t > * | materialIndices, | ||
| const char * | operation | ||
| ) |
Validates and cooks native geometry; throws on invalid input. @ownership Transfers native allocation to caller; release with b3DestroyMesh. Simulation thread only. @cost Geometry-sized allocation and preprocessing per topology edit; retain cooked geometry across frames.
在文件 Box3DShapeCook.cpp 第 22 行定义.
引用了 index, indices, mesh, operation, point, points , 以及 vertices.
◆ makeShape()
| eve::Result< std::unique_ptr< IShapeBackend3D > > eve::physics::box3d::makeShape | ( | b3BodyId | body, |
| const ShapeGeometry3D & | geometry, | ||
| float | density, | ||
| float | friction, | ||
| float | restitution | ||
| ) |
Internal native shape factory; transfers native/cooked ownership on success. @cost Cooks the supplied geometry once at creation, on the simulation thread.
在文件 Box3DShape.cpp 第 317 行定义.
引用了 body, density, eve::Diagnostic::error(), friction, geometry, eve::InvalidArgument, restitution, result , 以及 shape.
◆ makeWorld()
| EVENGINE_API_WORLD eve::Result< std::unique_ptr< IWorldBackend3D > > eve::physics::box3d::makeWorld | ( | World3D & | owner, |
| float | gx, | ||
| float | gy, | ||
| float | gz, | ||
| bool | sleep | ||
| ) |
Native-world composition boundary; returns exclusive ownership or a structured failure. @cost One solver-world allocation per world creation; simulation thread, no callbacks.
在文件 Box3DWorld.cpp 第 125 行定义.
引用了 error, eve::Diagnostic::error(), eve::Failed , 以及 owner.