novolis-governance / imports-todo/internal-novolis-audit/rigidtransform-and-obsolete-transform.md
Math — adopt `RigidTransform`, remove obsolete `Transform`
Policies that keep the org coherent
dotnetgovernancenovolis
What
Finish the pose-helper migration from the math BCL plan:
- `RigidTransform` — shipped (
Position,Rotation,UniformScale,ToMatrix4x4,TransformPoint/TransformDirection). - `Transform` (mutable class) — marked
[Obsolete("Use RigidTransform")]but no callers outside its own file (2026-05-25). - MonoGame template `Transform` — separate concept (
Novolis.Templates.MonoGameITransform); not the same type; do not conflate.
Work:
- Delete or internalize
Novolis.Math.Geometry.Transformafter one release if no package consumers reference it. - Use
RigidTransformin mesh/scene code paths that still use mutable transform fields (grepTransformin math + rendering compile). - Document
RigidTransformin Geometry README quick start (one example).
Why
- Mutable transform classes fight determinism and copy semantics expected in Physics/Simulation/Replay.
RigidTransformis the BCL-aligned replacement; keeping obsoleteTransformconfuses agents reading obsolete attributes.- Templates should demonstrate current API for new games.
How
- Audit
rg "Novolis\.Math\.Geometry\.Transform"across workspace (exclude MonoGame template namespace).- Check packed NuGet samples and
artifacts/READMEs.
- Migrate callers (if any appear after package publish)
- Replace
new Transform(...)withnew RigidTransform(...); preferreadonlyfields.
- Remove type
- Delete
Transform.csin Geometry; bump minor package version; note breaking change in release notes.
- Templates
- If template scaffolds reference Math
Transform, switch toRigidTransformor clarify template-localTransformis not Math.
Acceptance
- No public
Transformclass inNovolis.Math.Geometry. - README shows
RigidTransformexample. - Stack builds with analyzers green.