Definition of a self-contained constraint "island". More...

#include <Island.hpp>

Public Types

using Bodies = std::vector< Body * >
 Body container type. More...
 
using Contacts = std::vector< Contact * >
 Contact container type. More...
 
using Joints = std::vector< Joint * >
 Joint container type. More...
 

Public Member Functions

 Island (Bodies::size_type bodyCapacity, Contacts::size_type contactCapacity, Joints::size_type jointCapacity)
 Initializing constructor. More...
 
 Island (const Island &copy)=default
 Copy constructor. More...
 
 Island (Island &&other) noexcept=default
 Move constructor. More...
 
 ~Island ()=default
 Destructor. More...
 
Islandoperator= (const Island &other)=default
 Copy assignment operator. More...
 
Islandoperator= (Island &&other) noexcept=default
 Assignment operator. More...
 

Public Attributes

Bodies m_bodies
 Body container. More...
 
Contacts m_contacts
 Contact container. More...
 
Joints m_joints
 Joint container. More...
 

Related Functions

(Note that these are not member functions.)

bool IsFullOfBodies (const Island &island)
 Determines whether the given island is full of bodies. More...
 
bool IsFullOfContacts (const Island &island)
 Determines whether the given island is full of contacts. More...
 
std::size_t Count (const Island &island, const Body *entry)
 Counts the number of occurrences of the given entry in the given island. More...
 
std::size_t Count (const Island &island, const Contact *entry)
 Counts the number of occurrences of the given entry in the given island. More...
 
std::size_t Count (const Island &island, const Joint *entry)
 Counts the number of occurrences of the given entry in the given island. More...
 

Detailed Description

Definition of a self-contained constraint "island".

A container of bodies contacts and joints relevant to handling world dynamics.

Note
This is an internal class.
This data structure is 72-bytes large (on at least one 64-bit platform).

Definition at line 37 of file Island.hpp.

Member Typedef Documentation

◆ Bodies

using playrho::d2::Island::Bodies = std::vector<Body*>

Body container type.

Definition at line 40 of file Island.hpp.

◆ Contacts

using playrho::d2::Island::Contacts = std::vector<Contact*>

Contact container type.

Definition at line 43 of file Island.hpp.

◆ Joints

using playrho::d2::Island::Joints = std::vector<Joint*>

Joint container type.

Definition at line 46 of file Island.hpp.

Constructor & Destructor Documentation

◆ Island() [1/3]

playrho::d2::Island::Island ( Bodies::size_type  bodyCapacity,
Contacts::size_type  contactCapacity,
Joints::size_type  jointCapacity 
)

Initializing constructor.

Definition at line 129 of file Island.cpp.

◆ Island() [2/3]

playrho::d2::Island::Island ( const Island copy)
default

Copy constructor.

◆ Island() [3/3]

playrho::d2::Island::Island ( Island &&  other)
defaultnoexcept

Move constructor.

◆ ~Island()

playrho::d2::Island::~Island ( )
default

Destructor.

Member Function Documentation

◆ operator=() [1/2]

Island& playrho::d2::Island::operator= ( const Island other)
default

Copy assignment operator.

◆ operator=() [2/2]

Island& playrho::d2::Island::operator= ( Island &&  other)
defaultnoexcept

Assignment operator.

Friends And Related Function Documentation

◆ IsFullOfBodies()

bool IsFullOfBodies ( const Island island)
related

Determines whether the given island is full of bodies.

Definition at line 74 of file Island.hpp.

◆ IsFullOfContacts()

bool IsFullOfContacts ( const Island island)
related

Determines whether the given island is full of contacts.

Definition at line 81 of file Island.hpp.

◆ Count() [1/3]

std::size_t Count ( const Island island,
const Body entry 
)
related

Counts the number of occurrences of the given entry in the given island.

Definition at line 138 of file Island.cpp.

◆ Count() [2/3]

std::size_t Count ( const Island island,
const Contact entry 
)
related

Counts the number of occurrences of the given entry in the given island.

Definition at line 143 of file Island.cpp.

◆ Count() [3/3]

std::size_t Count ( const Island island,
const Joint entry 
)
related

Counts the number of occurrences of the given entry in the given island.

Definition at line 148 of file Island.cpp.

Member Data Documentation

◆ m_bodies

Bodies playrho::d2::Island::m_bodies

Body container.

Definition at line 67 of file Island.hpp.

◆ m_contacts

Contacts playrho::d2::Island::m_contacts

Contact container.

Definition at line 68 of file Island.hpp.

◆ m_joints

Joints playrho::d2::Island::m_joints

Joint container.

Definition at line 69 of file Island.hpp.


The documentation for this struct was generated from the following files: