World-concept internal pure virtual base interface class. More...
#include <playrho/d2/detail/WorldConcept.hpp>
Public Member Functions | |
| virtual | ~WorldConcept ()=default |
| Destructor. | |
| virtual void | Clear_ () noexcept=0 |
| Clears the world. More... | |
| virtual std::unique_ptr< WorldConcept > | Clone_ () const =0 |
| Clones the instance - making a deep copy. | |
| virtual BodyID | CreateBody_ (const Body &body)=0 |
| Creates a rigid body that's a copy of the given one. More... | |
| virtual JointID | CreateJoint_ (const Joint &def)=0 |
| Creates a joint to constrain one or more bodies. More... | |
| virtual ShapeID | CreateShape_ (const Shape &def)=0 |
| Creates an identifiable copy of the given shape within this world. More... | |
| virtual void | Destroy_ (BodyID id)=0 |
| Destroys the identified body. More... | |
| virtual void | Destroy_ (JointID id)=0 |
| Destroys the identified joint. More... | |
| virtual void | Destroy_ (ShapeID id)=0 |
| Destroys the identified shape. More... | |
| virtual std::vector< BodyID > | GetBodies_ () const =0 |
| Gets the world body range for this constant world. More... | |
| virtual std::vector< BodyID > | GetBodiesForProxies_ () const =0 |
| Gets the bodies-for-proxies range for this world. More... | |
| virtual Body | GetBody_ (BodyID id) const =0 |
| Gets the state of the identified body. More... | |
| virtual BodyCounter | GetBodyRange_ () const noexcept=0 |
| Gets the extent of the currently valid body range. More... | |
| virtual Contact | GetContact_ (ContactID id) const =0 |
| Gets the identified contact. More... | |
| virtual ContactCounter | GetContactRange_ () const noexcept=0 |
| Gets the extent of the currently valid contact range. More... | |
| virtual std::vector< KeyedContactID > | GetContacts_ () const =0 |
| Gets the world contact range. More... | |
| virtual std::vector< std::tuple< ContactKey, ContactID > > | GetContacts_ (BodyID id) const =0 |
| Gets the container of contacts attached to the identified body. More... | |
| virtual const void * | GetData_ () const noexcept=0 |
| Gets the data for the underlying configuration. | |
| virtual void * | GetData_ () noexcept=0 |
| Gets the data for the underlying configuration. | |
| virtual Frequency | GetInvDeltaTime_ () const noexcept=0 |
| Gets the inverse delta time. More... | |
| virtual Joint | GetJoint_ (JointID id) const =0 |
| Gets the value of the identified joint. More... | |
| virtual JointCounter | GetJointRange_ () const noexcept=0 |
| Gets the extent of the currently valid joint range. More... | |
| virtual std::vector< JointID > | GetJoints_ () const =0 |
| Gets the world joint range. More... | |
| virtual std::vector< std::pair< BodyID, JointID > > | GetJoints_ (BodyID id) const =0 |
| Gets the range of joints attached to the identified body. More... | |
| virtual Manifold | GetManifold_ (ContactID id) const =0 |
| Gets the collision manifold for the identified contact. More... | |
| virtual std::optional< pmr::StatsResource::Stats > | GetResourceStats_ () const noexcept=0 |
| Gets the polymorphic memory resource statistics. More... | |
| virtual Shape | GetShape_ (ShapeID id) const =0 |
| virtual ShapeCounter | GetShapeRange_ () const noexcept=0 |
| Gets the extent of the currently valid shape range. More... | |
| virtual std::vector< ShapeID > | GetShapes_ (BodyID id) const =0 |
| Gets the identities of the shapes associated with the identified body. More... | |
| virtual bool | GetSubStepping_ () const noexcept=0 |
| Gets whether or not sub-stepping is enabled. More... | |
| virtual const DynamicTree & | GetTree_ () const noexcept=0 |
| Gets access to the broad-phase dynamic tree information. More... | |
| virtual TypeID | GetType_ () const noexcept=0 |
| Gets the use type information. More... | |
| virtual Interval< Positive< Length > > | GetVertexRadiusInterval_ () const noexcept=0 |
| Gets the vertex radius range that shapes in this world can be within. | |
| virtual bool | IsEqual_ (const WorldConcept &other) const noexcept=0 |
| Equality checking function. | |
| virtual bool | IsLocked_ () const noexcept=0 |
| Is the world locked (in the middle of a time step). | |
| virtual bool | IsStepComplete_ () const noexcept=0 |
| Whether or not "step" is complete. More... | |
| virtual void | SetBeginContactListener_ (ContactFunction listener) noexcept=0 |
| Sets a begin contact event listener. | |
| virtual void | SetBody_ (BodyID id, const Body &value)=0 |
| Sets the state of the identified body. More... | |
| virtual void | SetContact_ (ContactID id, const Contact &value)=0 |
| Sets the identified contact's state. More... | |
| virtual void | SetDetachListener_ (BodyShapeFunction listener) noexcept=0 |
| Sets the detach listener for shapes detaching from bodies. | |
| virtual void | SetEndContactListener_ (ContactFunction listener) noexcept=0 |
| Sets an end contact event listener. | |
| virtual void | SetJoint_ (JointID id, const Joint &def)=0 |
| Sets the identified joint to the given value. More... | |
| virtual void | SetJointDestructionListener_ (JointFunction listener) noexcept=0 |
| Sets a destruction listener for joints. More... | |
| virtual void | SetManifold_ (ContactID id, const Manifold &value)=0 |
| Sets the collision manifold for the identified contact. More... | |
| virtual void | SetPostSolveContactListener_ (ContactImpulsesFunction listener) noexcept=0 |
| Sets a post-solve contact event listener. | |
| virtual void | SetPreSolveContactListener_ (ContactManifoldFunction listener) noexcept=0 |
| Sets a pre-solve contact event listener. | |
| virtual void | SetShape_ (ShapeID id, const Shape &def)=0 |
| Sets the identified shape to the new value. More... | |
| virtual void | SetShapeDestructionListener_ (ShapeFunction listener) noexcept=0 |
| Sets the destruction listener for shapes. More... | |
| virtual void | SetSubStepping_ (bool flag) noexcept=0 |
| Enables/disables single stepped continuous physics. More... | |
| virtual void | ShiftOrigin_ (const Length2 &newOrigin)=0 |
| Shifts the world origin. More... | |
| virtual StepStats | Step_ (const StepConf &conf)=0 |
| Steps the world simulation according to the given configuration. More... | |
World-concept internal pure virtual base interface class.
|
pure virtualnoexcept |
Clears the world.
Implemented in playrho::d2::detail::WorldModel< T >.
Creates a rigid body that's a copy of the given one.
GetBodies_() function. | body | A customized body or its default value. |
Destroy_(BodyID) function. | WrongState | if this function is called while the world is locked. |
| LengthError | if this operation would create more than MaxBodies. |
| std::out_of_range | if the given body references any invalid shape identifiers. |
Implemented in playrho::d2::detail::WorldModel< T >.
Creates a joint to constrain one or more bodies.
GetJoints_() function. Destroy_(JointID) function. | WrongState | if this function is called while the world is locked. |
| LengthError | if this operation would create more than MaxJoints. |
Implemented in playrho::d2::detail::WorldModel< T >.
Creates an identifiable copy of the given shape within this world.
| InvalidArgument | if called for a shape with a vertex radius that's either: less than the minimum vertex radius, or greater than the maximum vertex radius. |
| WrongState | if this function is called while the world is locked. |
| LengthError | if this operation would create more than MaxShapes. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Destroys the identified body.
Destroys the identified body that had previously been created by a call to this world's CreateBody_(const Body&) function.
GetBodies_() function. | id | Identifier of body to destroy that had been created by this world. |
| WrongState | if this function is called while the world is locked. |
| std::out_of_range | If given an invalid body identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Destroys the identified joint.
Destroys the identified joint that had previously been created by a call to this world's CreateJoint_(const Joint&) function.
GetJoints_() function. | id | Identifier of joint to destroy that had been created by this world. |
| WrongState | if this function is called while the world is locked. |
| std::out_of_range | If given an invalid joint identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Destroys the identified shape.
| std::out_of_range | If given an invalid shape identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Gets the world body range for this constant world.
Gets a range enumerating the bodies currently existing within this world. These are the bodies that had been created from previous calls to the CreateBody_(const Body&) function that haven't yet been destroyed.
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Gets the bodies-for-proxies range for this world.
Provides insight on what bodies have been queued for proxy processing during the next call to the world step function.
Implemented in playrho::d2::detail::WorldModel< T >.
Gets the state of the identified body.
| std::out_of_range | If given an invalid body identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Gets the extent of the currently valid body range.
BodyID that is in range for body related functions. Implemented in playrho::d2::detail::WorldModel< T >.
Gets the identified contact.
| std::out_of_range | If given an invalid contact identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Gets the extent of the currently valid contact range.
ContactID that is in range for contact related functions. Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Gets the world contact range.
ContactFunction to avoid missing contacts. Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Gets the container of contacts attached to the identified body.
ContactFunction. | std::out_of_range | If given an invalid body identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Gets the inverse delta time.
Gets the inverse delta time that was set on construction or assignment, and updated on every call to the Step_ function having a non-zero delta-time.
Implemented in playrho::d2::detail::WorldModel< T >.
Gets the value of the identified joint.
| std::out_of_range | If given an invalid joint identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Gets the extent of the currently valid joint range.
JointID that is in range for joint related functions. Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Gets the world joint range.
Gets a range enumerating the joints currently existing within this world. These are the joints that had been created from previous calls to the CreateJoint_ function that haven't yet been destroyed.
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Gets the range of joints attached to the identified body.
| std::out_of_range | If given an invalid body identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
Gets the collision manifold for the identified contact.
| std::out_of_range | If given an invalid contact identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Gets the polymorphic memory resource statistics.
Implemented in playrho::d2::detail::WorldModel< T >.
| std::out_of_range | If given an invalid shape identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Gets the extent of the currently valid shape range.
ShapeID that is in range for shape related functions. Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Gets the identities of the shapes associated with the identified body.
| std::out_of_range | If given an invalid body identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Gets whether or not sub-stepping is enabled.
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Gets access to the broad-phase dynamic tree information.
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Gets the use type information.
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Whether or not "step" is complete.
A "step" is completed when there are no more TOI events for the current time step.
true unless sub-stepping is enabled and the step function returned without finishing all of its sub-steps. Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Sets the state of the identified body.
| std::out_of_range | if given an invalid id of if the given body references any invalid shape identifiers. |
| InvalidArgument | if the specified ID was destroyed. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Sets the identified contact's state.
| id | Identifier of the contact whose state is to be set. |
| value | Value the contact is to be set to. |
| std::out_of_range | If given an invalid identifier. |
| InvalidArgument | if the identifier is to a freed contact or if the new state is not allowable. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Sets the identified joint to the given value.
| WrongState | if this function is called while the world is locked. |
| std::out_of_range | If given an invalid joint identifier. |
| InvalidArgument | if the specified ID was destroyed. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Sets a destruction listener for joints.
Clear_() for every joint. It's also called on Destroy_(BodyID) for every joint associated with the identified body. Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Sets the collision manifold for the identified contact.
| std::out_of_range | If given an invalid contact identifier. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Sets the identified shape to the new value.
| std::out_of_range | If given an invalid shape identifier. |
| InvalidArgument | if the specified ID was destroyed. |
Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Sets the destruction listener for shapes.
Clear_() for every shape. Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtualnoexcept |
Enables/disables single stepped continuous physics.
GetSubStepping_() function will return the value this function was called with. Implemented in playrho::d2::detail::WorldModel< T >.
|
pure virtual |
Shifts the world origin.
position -= newOrigin. | newOrigin | the new origin with respect to the old origin |
| WrongState | if this function is called while the world is locked. |
Implemented in playrho::d2::detail::WorldModel< T >.
Steps the world simulation according to the given configuration.
Performs position and velocity updating, sleeping of non-moving bodies, updating of the contacts, and notifying the contact listener of begin-contact, end-contact, pre-solve, and post-solve events.
p0) going velocity 0 (v0) fast with a sum acceleration of a, after time t and barring any collisions, will have a new velocity (v1) of v0 + (a * t) and a new position (p1) of p0 + v1 * t. | conf | Configuration for the simulation step. |
| WrongState | if this function is called while the world is locked. |
Implemented in playrho::d2::detail::WorldModel< T >.