Subclass implementation for any constraint which takes data of type TParameter.
More...
|
|
void | setParameter (BaseConstraint::ParticipantID participant, const TParameter ¶meter) |
| | Adds a parameter for this constraint.
|
|
TParameter | getParameter (BaseConstraint::ParticipantID participant) const |
| | Gets parameter belonging to a particular constraint participant.
|
|
void | removeParameter (BaseConstraint::ParticipantID participant) |
| | Removes a parameter belonging to a particular constraint participant.
|
|
const std::unordered_map< BaseConstraint::ParticipantID, TParameter > & | getParameters () const |
| | Returns all parameters known to this constraint.
|
|
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.
|
| void | resetLagrange () override |
| | Sets all lagrange multipliers to 0 in preparation for the next physics update.
|
|
template<uint8_t ... indices> |
| void | resetLagrange (std::integer_sequence< uint8_t, indices... > sequence) |
|
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.
|
|
void | setCompliance (float newCompliance) |
| | Sets the compliance value for this constraint.
|
template<typename TParameter, uint8_t LagrangeCount>
class ToyMaker::ParametrizedConstraint< TParameter, LagrangeCount >
Subclass implementation for any constraint which takes data of type TParameter.
- Template Parameters
-
| TParameter | A parameter specific to this constraint. |
| LagrangeCount | The number of Lagrange multipliers used by this constraint |