Definition of a self-contained constraint "island". More...
#include <playrho/Island.hpp>
Public Types | |
using | Bodies = std::vector< BodyID, pmr::polymorphic_allocator< BodyID > > |
Container type for body identifiers. | |
using | Contacts = std::vector< ContactID, pmr::polymorphic_allocator< ContactID > > |
Container type for contact identifiers. | |
using | Joints = std::vector< JointID, pmr::polymorphic_allocator< JointID > > |
Container type for joint identifiers. | |
Public Member Functions | |
Island ()=default | |
Default constructor. | |
Island (pmr::memory_resource &br, pmr::memory_resource &cr, pmr::memory_resource &jr) | |
Initializing constructor. | |
Public Attributes | |
Bodies | bodies |
Container of body identifiers. | |
Contacts | contacts |
Container of contact identifiers. | |
Joints | joints |
Container of joint identifiers. | |
Related Functions | |
(Note that these are not member functions.) | |
void | Clear (Island &island) noexcept |
Clears the island containers. | |
std::size_t | Count (const Island &island, BodyID entry) |
Counts the number of occurrences of the given entry in the given island. | |
std::size_t | Count (const Island &island, ContactID entry) |
Counts the number of occurrences of the given entry in the given island. | |
std::size_t | Count (const Island &island, JointID entry) |
Counts the number of occurrences of the given entry in the given island. | |
bool | IsFullOfBodies (const Island &island) |
Determines whether the given island is full of bodies. | |
bool | IsFullOfContacts (const Island &island) |
Determines whether the given island is full of contacts. | |
void | Reserve (Island &island, BodyCounter bodies, ContactCounter contacts, JointCounter joints) |
Reserves space ahead of time. | |
void | Sort (Island &island) noexcept |
Sorts the island containers. | |
Definition of a self-contained constraint "island".
A container of body contact and joint identifiers for handling world dynamics.