|
ToyMaker Game Engine 0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
|
Base class for constraints. More...
#include <types.hpp>
Public Types | |
| using | ParticipantID = std::size_t |
| using | ParticipantTable |
Public Member Functions | |
| float | getCompliance () const |
| Gets the current compliance value for this constraint. | |
| virtual void | applyConstraintPosition (const ParticipantTable &states, float substepSeconds) |
| Applies positional constraint to current set of bounds and physics states. | |
| virtual void | applyConstraintVelocity (const ParticipantTable &states, float substepSeconds) |
| Applies velocity-based constraint to current set of bounds and physics states. | |
| 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. | |
Protected Member Functions | |
| BaseConstraint (float compliance) | |
| Initializes this constraint. | |
Private Attributes | |
| float | mCompliance { 0.f } |
| Value greater than equal to zero, inverse of the physical stiffness of this constraint. | |
Base class for constraints.
Ensures that each constraint provides a method for preprocessing constraint data, and one for applying the constraint.
Also contains a table of entities that are participating in the constraint.
| using ToyMaker::BaseConstraint::ParticipantTable |
|
inlinevirtual |
Applies positional constraint to current set of bounds and physics states.
Will update values stored in ObjectBounds and PhysicsLocal to maintain the constraint and update its own compliance parameters
Reimplemented in ToyMaker::CollisionConstraint.
|
inlinevirtual |
Applies velocity-based constraint to current set of bounds and physics states.
Will update values stored in ObjectBounds and PhysicsLocal to maintain the constraint and update its own compliance parameters
Reimplemented in ToyMaker::CollisionConstraint.
|
inlinevirtual |
Resets all lagrange multipliers, preparing them for a new sequence of constraint solve substeps.
Reimplemented in ToyMaker::Constraint< LagrangeCount >.
|
private |
Value greater than equal to zero, inverse of the physical stiffness of this constraint.
Part of extended position based dynamics implementation.
A compliance of 0 implies infinite stiffness.