Skip to content

Fix BendConstraint::solve signature mismatch with base class#236

Merged
FriedricNietzsche merged 2 commits into
191-pbr-ibl-ambient-lightingfrom
copilot/sub-pr-230-yet-again
Mar 16, 2026
Merged

Fix BendConstraint::solve signature mismatch with base class#236
FriedricNietzsche merged 2 commits into
191-pbr-ibl-ambient-lightingfrom
copilot/sub-pr-230-yet-again

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 16, 2026

BendConstraint::solve declared a different parameter list than the pure virtual Constraint::solve(std::vector<physics::Vertex>&, float), making the override invalid and the class non-instantiable.

Changes

  • BendConstraint.hpp

    • Drop extra std::vector<glm::vec3>& lagrangeMultipliers param and const to match base class signature
    • Add missing #pragma once
    • Initialize restAngle = 0.0f
  • BendConstraint.cpp

    • Update definition to match corrected signature
    • Replace lagrangeMultipliers[0].x with the inherited protected lambda member (already reset by Constraint::resetLambda())
    • Fix include path: "app/physics/constraints/BendConstraint.hpp"<physics/constraints/BendConstraint.hpp>
    • Remove stale precondition comment referencing lagrange multipliers

Before / After:

// Before — mismatched, won't compile with override
virtual void solve(std::vector<physics::Vertex>&, std::vector<glm::vec3>&, float) const override;

// After — correctly overrides base class
void solve(std::vector<physics::Vertex>& vertices, float deltatime) override;

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

…olve

Co-authored-by: FriedricNietzsche <142739679+FriedricNietzsche@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on IBL ambient lighting integration in PBR shader Fix BendConstraint::solve signature mismatch with base class Mar 16, 2026
Copilot AI requested a review from FriedricNietzsche March 16, 2026 22:18
@FriedricNietzsche FriedricNietzsche marked this pull request as ready for review March 16, 2026 22:22
@FriedricNietzsche FriedricNietzsche merged commit b64e142 into 191-pbr-ibl-ambient-lighting Mar 16, 2026
@FriedricNietzsche FriedricNietzsche deleted the copilot/sub-pr-230-yet-again branch March 16, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants