Editor/Core/Analysis/OrientationGuess.cs

A small record type in the weapon importer's geometry analysis, holding a guessed canonical rotation as a quaternion, a confidence value and a reason string. Its NeedsFix property reports whether the rotation is non-identity by checking the quaternion's W component.

#nullable enable annotations

using System.Numerics;
using WeaponImporter.EditorTools.Core.Geometry;
using WeaponImporter.EditorTools.Core.Weapon;

namespace WeaponImporter.EditorTools.Core.Analysis;

using Vector3 = System.Numerics.Vector3;

public sealed record OrientationGuess(Quaternion ToCanonical, float Confidence, string Reason)
{
    public bool NeedsFix => MathF.Abs(ToCanonical.W) < 0.9999f;
}