Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The Chain Shape sample’s friction control now updates only one segment instead of the complete chain.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Reworks chain shapes around explicit segments and ghost points while incorporating related API, testing, portability, and documentation fixes.
Changes:
- Redesigns chain geometry/material APIs and updates snapshots and recordings.
- Adds chain and mover regression tests.
- Splits math types from functions and consolidates platform/SIMD utilities.
File summaries
| File | Description |
|---|---|
test/test_table.c |
Updates includes and formatting. |
test/test_snapshot.c |
Migrates snapshot chain setup. |
test/test_recording.c |
Tests new chain material operations. |
test/test_mover.c |
Adds plane-solver tests. |
test/test_macros.h |
Exposes the test assertion handler. |
test/test_chain.c |
Adds chain geometry/material tests. |
test/main.c |
Registers new tests and assertion handling. |
test/CMakeLists.txt |
Adds new test sources. |
src/world_snapshot.c |
Serializes revised chain state. |
src/wheel_joint.c |
Removes an unused include. |
src/types.c |
Initializes ghost-point sentinels. |
src/timer.c |
Narrows Windows header features. |
src/table.h |
Removes platform-specific helpers. |
src/table.c |
Uses consolidated platform utilities. |
src/solver.c |
Updates internal dependencies. |
src/simd.h |
Extracts AABB SIMD helpers. |
src/shape.h |
Simplifies chain storage. |
src/shape.c |
Implements segment-based chains and materials. |
src/sensor.c |
Uses consolidated platform utilities. |
src/scheduler.c |
Updates platform dependencies. |
src/recording.h |
Updates recording format and includes. |
src/recording.c |
Records ghost points and point counts. |
src/recording_replay.c |
Replays revised chain operations. |
src/recording_ops.inl |
Adds broadcast material recording. |
src/prismatic_joint.c |
Removes an unused include. |
src/platform.h |
Consolidates atomics and bit operations. |
src/physics_world.c |
Adapts world logic to revised chains. |
src/parallel_for.c |
Uses consolidated platform utilities. |
src/dynamic_tree.h |
Moves SIMD implementation out. |
src/dynamic_tree.c |
Includes extracted SIMD helpers. |
src/ctz.h |
Removes superseded bit utilities. |
src/core.c |
Uses consolidated platform utilities. |
src/container.h |
Uses MSVC-specific string declarations. |
src/CMakeLists.txt |
Registers new headers and MSVC options. |
src/broad_phase.h |
Removes unnecessary dependencies. |
src/broad_phase.c |
Localizes prefetch and SIMD helpers. |
src/aabb.h |
Adds required math functions. |
shared/benchmarks.c |
Migrates chain point-count usage. |
samples/sample_world.cpp |
Migrates chain definitions. |
samples/sample_shapes.cpp |
Migrates chain geometry. |
samples/sample_joints.cpp |
Migrates chain definitions. |
samples/sample_events.cpp |
Separates open-chain ghost points. |
samples/sample_continuous.cpp |
Migrates chain definitions. |
samples/sample_collision.cpp |
Migrates chains and fixes no-hit casting. |
samples/sample_character.cpp |
Migrates chain definitions. |
samples/CMakeLists.txt |
Propagates C++20 requirements. |
include/box2d/types.h |
Revises chain and profiling APIs. |
include/box2d/math_types.h |
Adds lightweight math types. |
include/box2d/math_functions.h |
Uses the extracted math types. |
include/box2d/id.h |
Improves generated documentation. |
include/box2d/collision.h |
Depends only on math types. |
include/box2d/box2d.h |
Revises chain material APIs. |
include/box2d/base.h |
Documents version components. |
docs/simulation.md |
Updates chain examples and guidance. |
docs/recording.md |
Corrects the snapshots heading. |
build.zig |
Registers new tests. |
.github/ISSUE_TEMPLATE/issue.md |
Adds the issue template. |
.github/ISSUE_TEMPLATE/config.yml |
Configures issue intake. |
.github/issue_template.md |
Removes the legacy template. |
Review details
- Files reviewed: 59/59 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return count; | ||
| } | ||
|
|
||
| void b2Chain_SetSurfaceMaterial( b2ChainId chainId, const b2SurfaceMaterial* material, int segmentIndex ) |
This was referenced Sep 13, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.