Declarations of the AabbTreeWorld class. More...
#include <cstdint>#include <map>#include <optional>#include <tuple>#include <type_traits>#include <utility>#include <vector>#include <playrho/BodyID.hpp>#include <playrho/BodyShapeFunction.hpp>#include <playrho/Contact.hpp>#include <playrho/Contactable.hpp>#include <playrho/ContactFunction.hpp>#include <playrho/ContactID.hpp>#include <playrho/ContactKey.hpp>#include <playrho/JointFunction.hpp>#include <playrho/JointID.hpp>#include <playrho/Interval.hpp>#include <playrho/Island.hpp>#include <playrho/IslandStats.hpp>#include <playrho/KeyedContactID.hpp>#include <playrho/ObjectPool.hpp>#include <playrho/Positive.hpp>#include <playrho/Real.hpp>#include <playrho/Settings.hpp>#include <playrho/ShapeFunction.hpp>#include <playrho/ShapeID.hpp>#include <playrho/Span.hpp>#include <playrho/StepStats.hpp>#include <playrho/Units.hpp>#include <playrho/Vector2.hpp>#include <playrho/ZeroToUnderOne.hpp>#include <playrho/pmr/MemoryResource.hpp>#include <playrho/pmr/PoolMemoryResource.hpp>#include <playrho/pmr/StatsResource.hpp>#include <playrho/d2/Body.hpp>#include <playrho/d2/BodyConstraint.hpp>#include <playrho/d2/ContactImpulsesFunction.hpp>#include <playrho/d2/ContactManifoldFunction.hpp>#include <playrho/d2/DynamicTree.hpp>#include <playrho/d2/Joint.hpp>#include <playrho/d2/Shape.hpp>#include <playrho/d2/Transformation.hpp>#include <playrho/d2/WorldConf.hpp>Classes | |
| class | playrho::d2::AabbTreeWorld |
| An AABB dynamic-tree based world implementation. More... | |
Namespaces | |
| playrho | |
| playrho::d2 | |
Typedefs | |
| using | playrho::d2::BodyContactIDs = std::vector< std::tuple< ContactKey, ContactID > > |
| Container type for Body associated contact information. | |
| using | playrho::d2::BodyIDs = std::vector< BodyID > |
| Body IDs container type. | |
| using | playrho::d2::BodyJointIDs = std::vector< std::pair< BodyID, JointID > > |
| Body joint IDs container type. | |
| using | playrho::d2::BodyShapeIDs = std::vector< std::pair< BodyID, ShapeID > > |
| Body shape IDs container type. | |
| using | playrho::d2::JointIDs = std::vector< JointID > |
| Joint IDs container type. More... | |
| using | playrho::d2::KeyedContactIDs = std::vector< KeyedContactID > |
| Keyed contact IDs container type. | |
| using | playrho::d2::ProxyIDs = std::vector< DynamicTree::Size > |
| Proxy container type alias. | |
Functions | |
| void | playrho::d2::Attach (AabbTreeWorld &world, BodyID id, ShapeID shapeID) |
| Associates a validly identified shape with the validly identified body. More... | |
| BodyID | playrho::d2::CreateBody (AabbTreeWorld &world, const BodyConf &def) |
| Creates a body within the world that's a copy of the given one. | |
| bool | playrho::d2::Detach (AabbTreeWorld &world, BodyID id, ShapeID shapeID) |
| Disassociates a validly identified shape from the validly identified body. More... | |
| const std::vector< ShapeID > & | playrho::d2::GetShapes (const AabbTreeWorld &world, BodyID id) |
| Disassociates all of the associated shape from the validly identified body. More... | |
| ContactID | playrho::d2::GetSoonestContact (const Span< const KeyedContactID > &ids, const Span< const Contact > &contacts) noexcept |
| Gets the identifier of the contact with the lowest time of impact. More... | |
AabbTreeWorld Listener Non-Member Functions | |
| void | playrho::d2::SetBeginContactListener (AabbTreeWorld &world, ContactFunction listener) noexcept |
| Register a begin contact event listener. | |
| void | playrho::d2::SetDetachListener (AabbTreeWorld &world, BodyShapeFunction listener) noexcept |
| Registers a detach listener for shapes detaching from bodies. | |
| void | playrho::d2::SetEndContactListener (AabbTreeWorld &world, ContactFunction listener) noexcept |
| Register an end contact event listener. | |
| void | playrho::d2::SetJointDestructionListener (AabbTreeWorld &world, JointFunction listener) noexcept |
| Register a destruction listener for joints. More... | |
| void | playrho::d2::SetPostSolveContactListener (AabbTreeWorld &world, ContactImpulsesFunction listener) noexcept |
| Register a post-solve contact event listener. | |
| void | playrho::d2::SetPreSolveContactListener (AabbTreeWorld &world, ContactManifoldFunction listener) noexcept |
| Register a pre-solve contact event listener. | |
| void | playrho::d2::SetShapeDestructionListener (AabbTreeWorld &world, ShapeFunction listener) noexcept |
| Registers a destruction listener for shapes. More... | |
AabbTreeWorld Miscellaneous Non-Member Functions | |
| void | playrho::d2::Clear (AabbTreeWorld &world) noexcept |
| Clears this world. More... | |
| const BodyShapeIDs & | playrho::d2::GetFixturesForProxies (const AabbTreeWorld &world) noexcept |
| Gets the fixtures-for-proxies for this world. More... | |
| Frequency | playrho::d2::GetInvDeltaTime (const AabbTreeWorld &world) noexcept |
| Gets the inverse delta time. More... | |
| const ProxyIDs & | playrho::d2::GetProxies (const AabbTreeWorld &world) noexcept |
| Gets the dynamic tree leaves queued for finding new contacts. | |
| std::optional< pmr::StatsResource::Stats > | playrho::d2::GetResourceStats (const AabbTreeWorld &world) noexcept |
| Gets the resource statistics of the specified world. | |
| bool | playrho::d2::GetSubStepping (const AabbTreeWorld &world) noexcept |
| Gets whether or not sub-stepping is enabled. More... | |
| const DynamicTree & | playrho::d2::GetTree (const AabbTreeWorld &world) noexcept |
| Gets access to the broad-phase dynamic tree information. | |
| Interval< Positive< Length > > | playrho::d2::GetVertexRadiusInterval (const AabbTreeWorld &world) noexcept |
| Gets the vertex radius interval allowable for the given world. More... | |
| bool | playrho::d2::IsLocked (const AabbTreeWorld &world) noexcept |
| Is the world locked (in the middle of a time step). | |
| bool | playrho::d2::IsStepComplete (const AabbTreeWorld &world) noexcept |
| Whether or not "step" is complete. More... | |
| bool | playrho::d2::operator!= (const AabbTreeWorld &lhs, const AabbTreeWorld &rhs) |
| Inequality operator for world comparisons. | |
| bool | playrho::d2::operator== (const AabbTreeWorld &lhs, const AabbTreeWorld &rhs) |
| Equality operator for world comparisons. | |
| void | playrho::d2::SetSubStepping (AabbTreeWorld &world, bool flag) noexcept |
| Enables/disables single stepped continuous physics. More... | |
| void | playrho::d2::ShiftOrigin (AabbTreeWorld &world, const Length2 &newOrigin) |
| Shifts the world origin. More... | |
| StepStats | playrho::d2::Step (AabbTreeWorld &world, const StepConf &conf) |
| Steps the world simulation according to the given configuration. More... | |
AabbTreeWorld Body Member Functions | |
Member functions relating to bodies. | |
| BodyID | playrho::d2::CreateBody (AabbTreeWorld &world, Body body=Body{}) |
| Creates a rigid body that's a copy of the given one. More... | |
| void | playrho::d2::Destroy (AabbTreeWorld &world, BodyID id) |
| Destroys the identified body. More... | |
| const BodyIDs & | playrho::d2::GetBodies (const AabbTreeWorld &world) noexcept |
| Gets a container of valid world body identifiers for this constant world. More... | |
| const BodyIDs & | playrho::d2::GetBodiesForProxies (const AabbTreeWorld &world) noexcept |
| Gets the bodies-for-proxies container for this world. More... | |
| const Body & | playrho::d2::GetBody (const AabbTreeWorld &world, BodyID id) |
| Gets the identified body. More... | |
| BodyCounter | playrho::d2::GetBodyRange (const AabbTreeWorld &world) noexcept |
| Gets the extent of the currently valid body range. More... | |
| const BodyContactIDs & | playrho::d2::GetContacts (const AabbTreeWorld &world, BodyID id) |
| Gets the contacts associated with the identified body. More... | |
| const BodyJointIDs & | playrho::d2::GetJoints (const AabbTreeWorld &world, BodyID id) |
| const ProxyIDs & | playrho::d2::GetProxies (const AabbTreeWorld &world, BodyID id) |
| Gets the proxies for the identified body. More... | |
| auto | playrho::d2::IsDestroyed (const AabbTreeWorld &world, BodyID id) -> bool |
| Gets whether the given identifier is to a body that's been destroyed. More... | |
| void | playrho::d2::SetBody (AabbTreeWorld &world, BodyID id, Body value) |
| Sets the identified body. More... | |
AabbTreeWorld Joint Member Functions | |
Member functions relating to joints. | |
| JointID | playrho::d2::CreateJoint (AabbTreeWorld &world, Joint def) |
| Creates a joint to constrain one or more bodies. More... | |
| void | playrho::d2::Destroy (AabbTreeWorld &world, JointID id) |
| Destroys a joint. More... | |
| const Joint & | playrho::d2::GetJoint (const AabbTreeWorld &world, JointID id) |
| Gets the identified joint. More... | |
| JointCounter | playrho::d2::GetJointRange (const AabbTreeWorld &world) noexcept |
| Gets the extent of the currently valid joint range. More... | |
| const JointIDs & | playrho::d2::GetJoints (const AabbTreeWorld &world) noexcept |
| Gets the container of joint IDs of the given world. More... | |
| auto | playrho::d2::IsDestroyed (const AabbTreeWorld &world, JointID id) -> bool |
| Gets whether the given identifier is to a joint that's been destroyed. More... | |
| void | playrho::d2::SetJoint (AabbTreeWorld &world, JointID id, Joint def) |
| Sets the identified joint. More... | |
AabbTreeWorld Shape Member Functions | |
Member functions relating to shapes. | |
| ShapeID | playrho::d2::CreateShape (AabbTreeWorld &world, Shape def) |
| Creates an identifiable copy of the given shape within this world. More... | |
| void | playrho::d2::Destroy (AabbTreeWorld &world, ShapeID id) |
| Destroys the identified shape removing any body associations with it first. More... | |
| const Shape & | playrho::d2::GetShape (const AabbTreeWorld &world, ShapeID id) |
| Gets the identified shape. More... | |
| ShapeCounter | playrho::d2::GetShapeRange (const AabbTreeWorld &world) noexcept |
| Gets the extent of the currently valid shape range. More... | |
| auto | playrho::d2::IsDestroyed (const AabbTreeWorld &world, ShapeID id) -> bool |
| Gets whether the given identifier is to a shape that's been destroyed. More... | |
| void | playrho::d2::SetShape (AabbTreeWorld &world, ShapeID id, Shape def) |
| Sets the value of the identified shape. More... | |
AabbTreeWorld Contact Member Functions | |
Member functions relating to contacts. | |
| const Contact & | playrho::d2::GetContact (const AabbTreeWorld &world, ContactID id) |
| Gets the identified contact. More... | |
| ContactCounter | playrho::d2::GetContactRange (const AabbTreeWorld &world) noexcept |
| Gets the extent of the currently valid contact range. More... | |
| KeyedContactIDs | playrho::d2::GetContacts (const AabbTreeWorld &world) |
| Gets a container of valid world contact identifiers. More... | |
| const Manifold & | playrho::d2::GetManifold (const AabbTreeWorld &world, ContactID id) |
| Gets the identified manifold. More... | |
| auto | playrho::d2::IsDestroyed (const AabbTreeWorld &world, ContactID id) -> bool |
| Gets whether the given identifier is to a contact that's been destroyed. More... | |
| void | playrho::d2::SetContact (AabbTreeWorld &world, ContactID id, Contact value) |
| Sets the identified contact's state. More... | |
| void | playrho::d2::SetManifold (AabbTreeWorld &world, ContactID id, const Manifold &value) |
| Sets the identified manifold. More... | |
Declarations of the AabbTreeWorld class.