载入中...
搜索中...
未找到
Box3DWorld.h
浏览该文件的文档.
15 return R::failure(eve::Diagnostic::error(eve::DiagnosticCode::InvalidArgument, error.what(), path));
21 eve::Result<std::unique_ptr<IJointBackend3D>> newWeldJoint(Body3D& bodyA, Body3D& bodyB, float anchorX,
26 eve::Result<std::unique_ptr<IJointBackend3D>> newParallelJoint(Body3D& bodyA, Body3D& bodyB, float axisX,
29 eve::Result<std::unique_ptr<IJointBackend3D>> newFilterJoint(Body3D& bodyA, Body3D& bodyB) override;
30 eve::Result<std::unique_ptr<IJointBackend3D>> newDistanceJoint(Body3D& bodyA, Body3D& bodyB, float anchorAX,
34 eve::Result<std::unique_ptr<IJointBackend3D>> newRevoluteJoint(Body3D& bodyA, Body3D& bodyB, float anchorX,
38 eve::Result<std::unique_ptr<IJointBackend3D>> newPrismaticJoint(Body3D& bodyA, Body3D& bodyB, float anchorX,
42 eve::Result<std::unique_ptr<IJointBackend3D>> newSphericalJoint(Body3D& bodyA, Body3D& bodyB, float anchorX,
46 eve::Result<std::unique_ptr<IJointBackend3D>> newWheelJoint(Body3D& bodyA, Body3D& bodyB, float anchorX,
58 eve::Result<std::unique_ptr<IBodyBackend3D>> createBody(std::string_view type, float x, float y, float z) override;
63 eve::Result<void> setContactTuning(float hertz, float dampingRatio, float pushOutSpeed) override;
70 eve::Result<int> explode(float x, float y, float z, float radius, float falloff, float impulsePerArea,
101 eve::Result<CameraSphereHit3D> sphereCast(float x1, float y1, float z1, float x2, float y2, float z2, float radius,
107 eve::Result<int> rayCastAll(float x1, float y1, float z1, float x2, float y2, float z2, int maxHits) override;
108 eve::Result<int> queryAABB(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) override;
109 eve::Result<BroadPhaseAabb3D> queryAabbBroadPhaseOwned(float minX, float minY, float minZ, float maxX, float maxY,
112 eve::Result<int> queryCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius) override;
113 eve::Result<CapsuleOverlap3D> queryCapsuleOwned(float ax, float ay, float az, float bx, float by, float bz,
115 eve::Result<int> queryBox(float x, float y, float z, float width, float height, float depth, float qx, float qy,
117 eve::Result<int> castSphereAll(float x, float y, float z, float radius, float dx, float dy, float dz,
119 eve::Result<int> castCapsuleAll(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx,
121 eve::Result<int> castBoxAll(float x, float y, float z, float width, float height, float depth, float qx, float qy,
125 eve::Result<bool> moveCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx,
127 eve::Result<CapsuleMove3D> moveCapsuleOwned(float ax, float ay, float az, float bx, float by, float bz,
130 eve::Result<ClothContact3D> pointProbeFiltered(float x, float y, float z, float radius, uint64_t categoryBits,
132 eve::Result<BodyContacts3D> queryBodyContactsOwned(PhysicsBodyHandle body, int maxPoints) const override;
154 int do_explode(float x, float y, float z, float radius, float falloff, float impulsePerArea, int maskBits);
187 static bool do_preSolveCallback(b3ShapeId shapeIdA, b3ShapeId shapeIdB, b3Pos point, b3Vec3 normal, void* context);
188 bool do_sphereCast(float x1, float y1, float z1, float x2, float y2, float z2, float radius, uint64_t maskBits,
190 int do_rayCastFiltered(float x1, float y1, float z1, float x2, float y2, float z2, uint64_t maskBits);
191 eve::Result<RayHit3D> do_rayCastOwned(float x1, float y1, float z1, float x2, float y2, float z2,
194 int do_rayCastAllInternal(float x1, float y1, float z1, float x2, float y2, float z2, int maxHits,
197 eve::Result<BroadPhaseAabb3D> do_queryAabbBroadPhaseOwned(float minX, float minY, float minZ, float maxX,
202 eve::Result<CapsuleOverlap3D> do_queryCapsuleOwned(float ax, float ay, float az, float bx, float by, float bz,
204 int do_queryBox(float x, float y, float z, float width, float height, float depth, float qx, float qy, float qz,
207 int do_castSphereAll(float x, float y, float z, float radius, float dx, float dy, float dz, int maxHits);
208 int do_castCapsuleAll(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy,
210 int do_castBoxAll(float x, float y, float z, float width, float height, float depth, float qx, float qy, float qz,
214 bool do_moveCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy,
216 eve::Result<CapsuleMove3D> do_moveCapsuleOwned(float ax, float ay, float az, float bx, float by, float bz,
219 ClothProbeStatus do_pointProbeFiltered(float x, float y, float z, float radius, ClothContact3D* out,
222 eve::Result<BodyContacts3D> do_queryBodyContactsOwned(PhysicsBodyHandle body, int maxPoints) const;
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
Complete rigid-world execution boundary, bound once to an owning World3D facade. @ownership Owns exac...
Definition WorldBackend3D.h:24
eve::Result< int > getBodyCount() const override
getBodyCount; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:361
eve::Result< void > setGravity(float gx, float gy, float gz) override
setGravity; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:484
eve::Result< BroadPhaseAabb3D > queryAabbBroadPhaseOwned(float minX, float minY, float minZ, float maxX, float maxY, float maxZ, QueryFilter3D filter) override
queryAabbBroadPhaseOwned; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:337
eve::Result< float > getBoundsMaxZ() const override
getBoundsMaxZ; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:355
eve::Result< void > setMaximumLinearSpeed(float speed) override
setMaximumLinearSpeed; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:225
eve::Result< int > queryAABB(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) override
queryAABB; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:281
eve::Result< std::unique_ptr< IJointBackend3D > > newWeldJoint(Body3D &bodyA, Body3D &bodyB, float anchorX, float anchorY, float anchorZ, bool collideConnected) override
Creates an owning Weld constraint; bodies are synchronous non-owning inputs. @cost One native constra...
Definition Box3DWorldJoints.cpp:32
eve::Result< CapsuleOverlap3D > queryCapsuleOwned(float ax, float ay, float az, float bx, float by, float bz, float radius, QueryFilter3D filter) override
queryCapsuleOwned; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:445
eve::Result< RayHit3D > rayCastOwned(float x1, float y1, float z1, float x2, float y2, float z2, QueryFilter3D filter) override
rayCastOwned; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:139
eve::Result< CameraSphereHit3D > sphereCast(float x1, float y1, float z1, float x2, float y2, float z2, float radius, uint64_t maskBits, int ignoredBodyId) const override
sphereCast; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:58
eve::Result< std::unique_ptr< IJointBackend3D > > newSphericalJoint(Body3D &bodyA, Body3D &bodyB, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected) override
Creates an owning Spherical constraint; bodies are synchronous non-owning inputs. @cost One native co...
Definition Box3DWorldJoints.cpp:239
eve::Result< int > querySphere(float x, float y, float z, float radius) override
querySphere; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:384
eve::Result< int > queryBox(float x, float y, float z, float width, float height, float depth, float qx, float qy, float qz, float qw) override
queryBox; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:461
eve::Result< std::unique_ptr< IJointBackend3D > > newPrismaticJoint(Body3D &bodyA, Body3D &bodyB, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected) override
Creates an owning Prismatic constraint; bodies are synchronous non-owning inputs. @cost One native co...
Definition Box3DWorldJoints.cpp:201
eve::Result< CapsuleMove3D > moveCapsuleOwned(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy, float dz, QueryFilter3D filter, CapsuleMovePolicy3D policy) override
moveCapsuleOwned; uses the class ownership, thread and failure contract.
Definition Box3DWorldMover.cpp:209
eve::Result< void > setContinuousCollisionEnabled(bool enabled) override
setContinuousCollisionEnabled; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:139
eve::Result< int > getStaticTreeHeight() const override
getStaticTreeHeight; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:411
eve::Result< float > getGravityY() const override
getGravityY; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:505
eve::Result< float > getProfilePairsMs() const override
getProfilePairsMs; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:446
eve::Result< float > getGravityX() const override
getGravityX; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:496
eve::Result< void > setWarmStartingEnabled(bool enabled) override
setWarmStartingEnabled; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:245
eve::Result< int > getAwakeContactCount() const override
getAwakeContactCount; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:393
eve::Result< float > getBoundsMinY() const override
getBoundsMinY; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:323
eve::Result< std::unique_ptr< IJointBackend3D > > newDistanceJoint(Body3D &bodyA, Body3D &bodyB, float anchorAX, float anchorAY, float anchorAZ, float anchorBX, float anchorBY, float anchorBZ, float length, bool collideConnected) override
Creates an owning Distance constraint; bodies are synchronous non-owning inputs. @cost One native con...
Definition Box3DWorldJoints.cpp:128
eve::Result< float > getHitEventThreshold() const override
getHitEventThreshold; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:533
eve::Result< BodyContacts3D > queryBodyContactsOwned(PhysicsBodyHandle body, int maxPoints) const override
queryBodyContactsOwned; uses the class ownership, thread and failure contract.
Definition Box3DWorldContacts.cpp:94
eve::Result< float > getProfileSolveMs() const override
getProfileSolveMs; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:460
eve::Result< float > getBoundsMaxX() const override
getBoundsMaxX; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:339
eve::Result< std::unique_ptr< IJointBackend3D > > newFilterJoint(Body3D &bodyA, Body3D &bodyB) override
Creates an owning Filter constraint; bodies are synchronous non-owning inputs. @cost One native const...
Definition Box3DWorldJoints.cpp:110
eve::Result< float > getGravityZ() const override
getGravityZ; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:514
eve::Result< float > getMaximumLinearSpeed() const override
getMaximumLinearSpeed; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:236
eve::Result< float > getProfileBulletsMs() const override
getProfileBulletsMs; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:467
eve::Result< int > getContactCount() const override
getContactCount; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:373
eve::Result< float > getProfileStepMs() const override
getProfileStepMs; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:439
eve::Result< void > setMoverUp(float x, float y, float z) override
setMoverUp; uses the class ownership, thread and failure contract.
Definition Box3DWorldMover.cpp:23
eve::Result< int > rayCastAll(float x1, float y1, float z1, float x2, float y2, float z2, int maxHits) override
rayCastAll; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:148
eve::Result< int > rayCastFiltered(float x1, float y1, float z1, float x2, float y2, float z2, uint64_t maskBits) override
rayCastFiltered; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:74
eve::Result< int > closestPoint(float x, float y, float z, float maxDistance) override
closestPoint; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:681
eve::Result< int > getRecycledContactCount() const override
getRecycledContactCount; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:402
eve::Result< void > setContactRecycleDistance(float distance) override
setContactRecycleDistance; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:203
eve::Result< float > getBoundsMinZ() const override
getBoundsMinZ; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:331
eve::Result< std::unique_ptr< IJointBackend3D > > newParallelJoint(Body3D &bodyA, Body3D &bodyB, float axisX, float axisY, float axisZ, bool collideConnected) override
Creates an owning Parallel constraint; bodies are synchronous non-owning inputs. @cost One native con...
Definition Box3DWorldJoints.cpp:82
eve::Result< std::unique_ptr< IBodyBackend3D > > createBody(std::string_view type, float x, float y, float z) override
Creates an owning body backend without publishing an engine wrapper. @cost One native body allocation...
Definition Box3DWorld.cpp:107
eve::Result< void > setContactTuning(float hertz, float dampingRatio, float pushOutSpeed) override
setContactTuning; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:190
~WorldBackend() override
Definition Box3DWorld.cpp:81
void destroy() noexcept override
Idempotent native teardown after all facades have been invalidated.
Definition Box3DWorld.cpp:83
eve::Result< void > setHitEventThreshold(float speed) override
setHitEventThreshold; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:524
eve::Result< bool > isContinuousCollisionEnabled() const override
isContinuousCollisionEnabled; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:150
eve::Result< int > queryCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius) override
queryCapsule; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:399
eve::Result< int > getDynamicTreeHeight() const override
getDynamicTreeHeight; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:418
eve::Result< int > castBoxAll(float x, float y, float z, float width, float height, float depth, float qx, float qy, float qz, float qw, float dx, float dy, float dz, int maxHits) override
castBoxAll; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:595
eve::Result< void > collectEvents() override
Collects solver events into the owner's queues without publishing callbacks.
Definition Box3DWorldContacts.cpp:98
eve::Result< float > getBoundsMinX() const override
getBoundsMinX; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:315
eve::Result< int > getShapeCount() const override
getShapeCount; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:367
eve::Result< float > getRestitutionThreshold() const override
getRestitutionThreshold; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:172
eve::Result< int > getJointCount() const override
getJointCount; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:379
eve::Result< int > explode(float x, float y, float z, float radius, float falloff, float impulsePerArea, int maskBits) override
explode; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:304
eve::Result< bool > moveCapsule(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy, float dz) override
moveCapsule; uses the class ownership, thread and failure contract.
Definition Box3DWorldMover.cpp:161
eve::Result< ClothContact3D > pointProbeFiltered(float x, float y, float z, float radius, uint64_t categoryBits, uint64_t maskBits) const override
pointProbeFiltered; uses the class ownership, thread and failure contract.
Definition Box3DWorldMover.cpp:252
eve::Result< int > getIslandCount() const override
getIslandCount; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:385
eve::Result< float > getProfileCollideMs() const override
getProfileCollideMs; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:453
eve::Result< float > getContactRecycleDistance() const override
getContactRecycleDistance; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:214
eve::Result< int > castSphereAll(float x, float y, float z, float radius, float dx, float dy, float dz, int maxHits) override
castSphereAll; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:559
eve::Result< int > getAwakeBodyCount() const override
getAwakeBodyCount; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:432
eve::Result< float > getProfileSensorsMs() const override
getProfileSensorsMs; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:474
eve::Result< int > castCapsuleAll(float ax, float ay, float az, float bx, float by, float bz, float radius, float dx, float dy, float dz, int maxHits) override
castCapsuleAll; uses the class ownership, thread and failure contract.
Definition Box3DWorldQueries.cpp:576
eve::Result< std::unique_ptr< IJointBackend3D > > newRevoluteJoint(Body3D &bodyA, Body3D &bodyB, float anchorX, float anchorY, float anchorZ, float axisX, float axisY, float axisZ, bool collideConnected) override
Creates an owning Revolute constraint; bodies are synchronous non-owning inputs. @cost One native con...
Definition Box3DWorldJoints.cpp:163
eve::Result< bool > isWarmStartingEnabled() const override
isWarmStartingEnabled; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:254
eve::Result< void > setRestitutionThreshold(float speed) override
setRestitutionThreshold; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:161
eve::Result< std::unique_ptr< IJointBackend3D > > newWheelJoint(Body3D &bodyA, Body3D &bodyB, float anchorX, float anchorY, float anchorZ, float suspensionAxisX, float suspensionAxisY, float suspensionAxisZ, float wheelAxisX, float wheelAxisY, float wheelAxisZ, bool collideConnected) override
Creates an owning Wheel constraint; bodies are synchronous non-owning inputs. @cost One native constr...
Definition Box3DWorldJoints.cpp:277
eve::Result< std::unique_ptr< IJointBackend3D > > newMotorJoint(Body3D &bodyA, Body3D &bodyB, bool collideConnected) override
Creates an owning Motor constraint; bodies are synchronous non-owning inputs. @cost One native constr...
Definition Box3DWorldJoints.cpp:62
eve::Result< void > swapTopology(IWorldBackend3D &prepared) override
Swaps prepared native topology while retaining stable step-driver contexts.
Definition Box3DWorld.cpp:94
eve::Result< SimulationBackendSelection > selectSimulation() override
Builds the separate CPU/accelerator step driver; driver borrows this world's stable state.
Definition Box3DWorld.cpp:87
uint64_t shapeKey(const Shape3D &shape) const override
Opaque native lookup key scoped to this world, used only by internal event history.
Definition Box3DWorld.cpp:106
eve::Result< int > getMemoryByteCount() const override
getMemoryByteCount; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:425
eve::Result< float > getBoundsMaxY() const override
getBoundsMaxY; uses the class ownership, thread and failure contract.
Definition Box3DWorld.cpp:347
Definition Body3D.h:17
eve::RuntimeHandle< PhysicsBodyHandleTag > PhysicsBodyHandle
Generation-qualified runtime identity for a physics body.
Definition PhysicsHandles.h:28
@ InvalidArgument
Definition Container.h:602
Private bridge used exclusively by Box3D composition and native query code.
Definition Box3DBody.h:15