#include <ContactCache.hpp>
|
| ContactManifold & | merge (const ContactManifold &incoming) |
| | Look up the cached manifold for (a, b), copy accumulated impulses from any matching feature ids, then store incoming as the new cache entry.
|
| void | endFrame () noexcept |
| | Drop any cached manifolds that weren't merged this frame.
|
| auto | begin () |
| | Iterate every live cached manifold (e.g. for the solver).
|
| auto | end () |
| auto | begin () const |
| auto | end () const |
| size_t | size () const noexcept |
| void | clear () noexcept |
|
| static uint64_t | pairKey (entt::entity a, entt::entity b) noexcept |
| | Canonical 64-bit key for an ordered pair (a, b) — undirected, so swapping a and b yields the same key.
|
◆ begin() [1/2]
| auto physics::ContactCache::begin |
( |
| ) |
|
|
inlinenodiscard |
Iterate every live cached manifold (e.g. for the solver).
◆ begin() [2/2]
| auto physics::ContactCache::begin |
( |
| ) |
const |
|
inlinenodiscard |
◆ clear()
| void physics::ContactCache::clear |
( |
| ) |
|
|
noexcept |
◆ end() [1/2]
| auto physics::ContactCache::end |
( |
| ) |
|
|
inlinenodiscard |
◆ end() [2/2]
| auto physics::ContactCache::end |
( |
| ) |
const |
|
inlinenodiscard |
◆ endFrame()
| void physics::ContactCache::endFrame |
( |
| ) |
|
|
noexcept |
Drop any cached manifolds that weren't merged this frame.
MUST be called once per tick after every collision pair has been merged.
◆ merge()
Look up the cached manifold for (a, b), copy accumulated impulses from any matching feature ids, then store incoming as the new cache entry.
Returns the in-cache reference (already warm-started) for the solver to consume.
◆ pairKey()
| uint64_t physics::ContactCache::pairKey |
( |
entt::entity | a, |
|
|
entt::entity | b ) |
|
staticnodiscardnoexcept |
Canonical 64-bit key for an ordered pair (a, b) — undirected, so swapping a and b yields the same key.
◆ size()
| size_t physics::ContactCache::size |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
◆ cache_
| std::unordered_map<uint64_t, Entry> physics::ContactCache::cache_ |
|
private |
◆ currentFrame_
| uint32_t physics::ContactCache::currentFrame_ = 0 |
|
private |
The documentation for this class was generated from the following files: