A small, engine-independent two-bone IK solver (hip, knee, ankle), the base for foot placement in #7d.
Scope
New files in components/ (for example components/sceneutil/twoboneik.{hpp,cpp}), using osg math only.
Inputs: the three joint positions, a target position, a pole (knee direction) vector and a weight. Outputs: the rotations to apply to the upper and lower bone.
Handles unreachable targets (straightens towards the target), targets closer than the minimum bend, a zero-length pole and weight blending from 0 to 1.
Acceptance
Unit tests in apps/components_tests covering reachable and unreachable targets, bone lengths preserved, knee stays on the pole side, weight 0 is a no-op, and degenerate inputs give no NaNs.
No engine behavior changes in this step.
Part of #7.
A small, engine-independent two-bone IK solver (hip, knee, ankle), the base for foot placement in #7d.
**Scope**
- New files in `components/` (for example `components/sceneutil/twoboneik.{hpp,cpp}`), using osg math only.
- Inputs: the three joint positions, a target position, a pole (knee direction) vector and a weight. Outputs: the rotations to apply to the upper and lower bone.
- Handles unreachable targets (straightens towards the target), targets closer than the minimum bend, a zero-length pole and weight blending from 0 to 1.
**Acceptance**
- Unit tests in `apps/components_tests` covering reachable and unreachable targets, bone lengths preserved, knee stays on the pole side, weight 0 is a no-op, and degenerate inputs give no NaNs.
- No engine behavior changes in this step.
claude
added this to the 2. Feel milestone 2026-11-16 08:30:15 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of #7.
A small, engine-independent two-bone IK solver (hip, knee, ankle), the base for foot placement in #7d.
Scope
components/(for examplecomponents/sceneutil/twoboneik.{hpp,cpp}), using osg math only.Acceptance
apps/components_testscovering reachable and unreachable targets, bone lengths preserved, knee stays on the pole side, weight 0 is a no-op, and degenerate inputs give no NaNs.