// Copyright IHY. #pragma once #include "CoreMinimal.h" namespace OptimizerReconciler { /** * Compute the corrected world transform for the canonical mesh so it lands exactly where the * sibling currently sits. With D = CanonToMember (row-vector matrix) and W = sibling world * transform: W'_matrix = D * W_matrix (the verified formula). * * FTransform cannot represent shear; if the actor's non-uniform scale combined with D's rotation * produces shear, the reconstructed FTransform deviates from the exact matrix at the bbox corners. * We measure that deviation and reject (return false) when it exceeds ShearTol — the caller then * skips and reports the placement rather than silently corrupting it. * * @return false if the result shears (unrepresentable) — OutWprime is then not safe to apply. */ bool ComputeCorrectedWorld( const FMatrix& CanonToMember, const FTransform& W, const FBox& CanonLocalBounds, double ShearTol, FTransform& OutWprime, double& OutMaxCornerDev); }