Open
Conversation
Contributor
Summary: Add a lightweight coordinate system utility to momentum/math/ for converting vectors, quaternions, and rotation matrices between coordinate systems with different up axes, handedness, and length units. This consolidates coordinate transform logic that was previously scattered across the codebase (io/gltf/coordinate_utils.h, io/marker/conversions.h) into a single, well-tested utility. API: CoordinateSystem struct + free functions (changeVector, changeQuaternion, changeRotationMatrix) with toMomentum*/fromMomentum* convenience wrappers. Also updates BUCK to add coordinate_system as a dependency for io_marker and io_gltf targets, which will be used in subsequent diffs in this stack. Differential Revision: D95260371
Summary: Refactor io/marker/conversions.cpp to use the new math/coordinate_system.h utility for unit conversion (scaleFactor), eliminating the manual Unit switch. The axis remapping is preserved exactly as-is because the marker I/O internally uses a Z-up convention, which is inconsistent with momentum's canonical Y-up. Fixing this requires downstream validation and is deferred. No behavior change -- this is a pure refactor. Differential Revision: D95260370
Summary:
Refactor io/gltf/utils/coordinate_utils.h to use the new
math/coordinate_system.h utility for vector unit conversions.
Defines kGltfCoordinateSystem = {Y-up, Right, Meter} and uses
scaleFactor() instead of hardcoded toCm()/toM() constants.
Quaternion component reordering (glTF xyzw vs Eigen wxyz) is
preserved as-is -- this is a data format concern, not a coordinate
system operation.
No behavior change -- this is a pure refactor.
Differential Revision: D95260372
c0268e8 to
c7539eb
Compare
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.
Summary:
Refactor io/gltf/utils/coordinate_utils.h to use the new
math/coordinate_system.h utility for vector unit conversions.
Defines kGltfCoordinateSystem = {Y-up, Right, Meter} and uses
scaleFactor() instead of hardcoded toCm()/toM() constants.
Quaternion component reordering (glTF xyzw vs Eigen wxyz) is
preserved as-is -- this is a data format concern, not a coordinate
system operation.
No behavior change -- this is a pure refactor.
Differential Revision: D95260372