载入中...
搜索中...
未找到
JoltSolvedContacts.cpp
浏览该文件的文档.
13void Listener::OnContactSolved(const JPH::Body& a, const JPH::SubShapeID& subA, const JPH::Body& b,
32 const uint32_t index = result.mCCD ? JPH::ContactConstraintManager::MaxContactPoints : result.mPointIndex;
78eve::Result<BodyContacts3D> WorldBackend::queryBodyContactsOwned(PhysicsBodyHandle body, int maxPoints) const {
79 if (!isValid()) return rejected<BodyContacts3D>("World expired", eve::DiagnosticCode::StaleHandle);
84 return rejected<BodyContacts3D>("maxPoints must be in [1,4096]", eve::DiagnosticCode::InvalidArgument);
85 if (!owner->findBody(body)) return rejected<BodyContacts3D>("Body expired", eve::DiagnosticCode::StaleHandle);
88 if (!owner->findBody(body)->isActive()) return eve::Result<BodyContacts3D>::success(std::move(result));
Shape3D * findShape(PhysicsShapeHandle handle) const
Resolves a live shape handle; returns null when stale or foreign.
Definition World3D.cpp:447
Body3D * findBody(PhysicsBodyHandle handle) const
Borrows a live body; null for stale/foreign handles. Never delete lookup results.
Definition World3D.cpp:431
eve::Result< BodyContacts3D > queryBodyContactsOwned(PhysicsBodyHandle body, int maxPoints) const override
queryBodyContactsOwned; uses the class ownership, thread and failure contract.
Definition JoltSolvedContacts.cpp:78
Definition JoltBody.cpp:7
ShapeState * child(const JPH::Body &body, const JPH::SubShapeID &id)
Resolves a native child record for a synchronous callback or query. @ownership Borrowed from the worl...
Definition JoltInternal.h:138
@ InvalidArgument
@ Failed
@ StaleHandle
Snapshot of current contacts; values survive later queries and world destruction.
Definition OwnedQuery3D.h:40
std::unordered_map< JPH::SubShapeIDPair, std::vector< SolvedPoint > > solved
Definition JoltInternal.h:113
std::unordered_map< uint64_t, SolvedHit > hits
Definition JoltInternal.h:114
void OnContactSolved(const JPH::Body &, const JPH::SubShapeID &, const JPH::Body &, const JPH::SubShapeID &, const JPH::ContactSolveResult &) override
Definition JoltSolvedContacts.cpp:13
std::unordered_map< uint64_t, float > normalTotals
Definition JoltInternal.h:115