Inverse of pathInWorld for an editable polygon: given a polygon edited in
world space and the node's current pose, produce the unrotated stored
path plus an updated pose. Inverse-rotates about the pose's AABB center (so
the stored path stays unrotated and the pose's rotation is preserved),
then realigns the result to its own AABB origin and updates the pose's AABB
fields. The invariant pathInWorld(result.path, result.pose) === worldPath
holds (up to the AABB-center pivot), so anchor edits round-trip.
Generic in the pose type so consumer-defined pose fields (including
rotation) survive the round-trip. Used by both the edit-commit seam and the
live anchor-drag preview so they share one world→local inversion.
Inverse of
pathInWorldfor an editable polygon: given a polygon edited in world space and the node's current pose, produce the unrotated stored path plus an updated pose. Inverse-rotates about the pose's AABB center (so the stored path stays unrotated and the pose'srotationis preserved), then realigns the result to its own AABB origin and updates the pose's AABB fields. The invariantpathInWorld(result.path, result.pose) === worldPathholds (up to the AABB-center pivot), so anchor edits round-trip.Generic in the pose type so consumer-defined pose fields (including
rotation) survive the round-trip. Used by both the edit-commit seam and the live anchor-drag preview so they share one world→local inversion.