|
ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
|
Constraint requiring exactly two parameters representing colliding rigid bodies. More...
#include <types.hpp>
Public Member Functions | |
| CollisionConstraint () | |
| Initializes constraint with collision data from two potentially intersecting objects. | |
| void | updateCollisionData (const Collision &collision, const PhysicsState &physicsA, const ObjectBounds &boundsA, const ObjectBounds &boundsAPrev, const PhysicsState &physicsB, const ObjectBounds &boundsB, const ObjectBounds &boundsBPrev) |
| Caches collision related information shared across position and velocity corrections. | |
| void | updateCollisionDataPartial (const PhysicsState &physicsA, const ObjectBounds &boundsA, const PhysicsState &physicsB, const ObjectBounds &boundsB) |
| Performs a partial collision data update based on result from previous physics substep. | |
| void | applyConstraintPosition (const ParticipantTable &states, float substepSeconds) override |
| Separates intersecting/colliding objects and applies static friction. | |
| void | applyConstraintVelocity (const ParticipantTable &states, float substepSeconds) override |
| Applies dynamic friction. | |
| Public Member Functions inherited from ToyMaker::Constraint< 2 > | |
| void | resetLagrange (std::integer_sequence< uint8_t, indices... > sequence) |
| void | applyLagrangeDelta (float delta, uint8_t index) |
| Adds a delta to a lagrange value located at index. | |
| const std::array< float, LagrangeCount > & | getLagrange () const |
| Gets the current Lagrange multiplier values for this constraint. | |
| const std::array< float, LagrangeCount > & | getLagrangeDelta () const |
| Gets the latest lagrange delta applied to a constraint. | |
| Public Member Functions inherited from ToyMaker::BaseConstraint | |
| float | getCompliance () const |
| Gets the current compliance value for this constraint. | |
| virtual void | resetLagrange () |
| Resets all lagrange multipliers, preparing them for a new sequence of constraint solve substeps. | |
| void | setCompliance (float newCompliance) |
| Sets the compliance value for this constraint. | |
Additional Inherited Members | |
| Public Types inherited from ToyMaker::BaseConstraint | |
| using | ParticipantID = std::size_t |
| using | ParticipantTable |
| Protected Member Functions inherited from ToyMaker::Constraint< 2 > | |
| Constraint (float compliance) | |
| Initializes this constraint with some initial compliance value. | |
| Protected Member Functions inherited from ToyMaker::BaseConstraint | |
| BaseConstraint (float compliance) | |
| Initializes this constraint. | |
Constraint requiring exactly two parameters representing colliding rigid bodies.
Repositions objects such that they no longer intersect along the axis of collision.
|
overridevirtual |
Separates intersecting/colliding objects and applies static friction.
Reimplemented from ToyMaker::BaseConstraint.
|
overridevirtual |
Applies dynamic friction.
Reimplemented from ToyMaker::BaseConstraint.