-
Notifications
You must be signed in to change notification settings - Fork 554
Closed
Labels
breaking-changeIf an issue or a pull request represents a breaking changeIf an issue or a pull request represents a breaking changedotnet-pri0.NET 6: required for stable release.NET 6: required for stable releaseenhancementThe issue or pull request is an enhancementThe issue or pull request is an enhancement
Milestone
Description
Types in the OpenTK namespace
We want to remove types from the OpenTK namespace, and these types fall in three categories:
- Types we can replace with an existing .NET type
- Types that don't have an equivalent .NET type, so we have to come up with an alternative type.
- Types we don't need, so we can remove them.
One important question is which namespace to use for 2. Options:
- Keep using
OpenTK. This is not an option, because that's exactly what we're trying to move away from. ObjCRuntime: not really very math-like, and this namespace shouldn't become a catch-all for everything that doesn't fit elsewhere either.CoreNumerics: A mix of Apple's Core* frameworks with System.Numerics.CoreMath: same as 3.CoreGraphics: existing Apple namespace. Con: might end up with a name clash in the future depending on what Apple does.- Something else?
Ref: #2571
Ref: https://bugzilla.xamarin.com/show_bug.cgi?id=58599
Different type
The following types have an equivalent in .NET, so the proposal is to use that type instead:
| OpenTK type | .NET type |
|---|---|
| OpenTK.Matrix4 | System.Numerics.Matrix4x4 |
| OpenTK.Quaternion | System.Numerics.Quaternion |
| OpenTK.Vector2 | System.Numerics.Vector2 |
| OpenTK.Vector2d | System.Numerics.Vector<double> |
| OpenTK.Vector2i | System.Numerics.Vector<int> |
| OpenTK.Vector3 | System.Numerics.Vector3 |
| OpenTK.Vector3d | System.Numerics.Vector<double> |
| OpenTK.Vector3i | System.Numerics.Vector<int> |
| OpenTK.Vector4 | System.Numerics.Vector4 |
| OpenTK.Vector4d | System.Numerics.Vector<double> |
| OpenTK.Vector4i | System.Numerics.Vector<int> |
Different namespace
The following OpenTK types have no equivalent in .NET, so the proposal is to copy the OpenTK implementation, but use a different namespace.
- OpenTK.Matrix2
- OpenTK.Matrix3
- OpenTK.Matrix4d
- OpenTK.Quaterniond
The following are types that we created ourselves, but put in the OpenTK namespace.
- OpenTK.NMatrix4d
- OpenTK.NMatrix2
- OpenTK.NMatrix3
- OpenTK.NMatrix4x3
- OpenTK.NMatrix4
- OpenTK.NVector3d
- OpenTK.NVector3
Types to remove
The following types don't seem to be used by any other API, so they can be removed
- OpenTK.Box2
- OpenTK.Functions
- OpenTK.Half
- OpenTK.Vector2h
- OpenTK.Vector3h
- OpenTK.Vector4h
- OpenTK.BezierCurve
- OpenTK.BezierCurveCubic
- OpenTK.BezierCurveQuadric
Don't know yet
- ❓OpenTK.MathHelper
Ref: #13087
Metadata
Metadata
Assignees
Labels
breaking-changeIf an issue or a pull request represents a breaking changeIf an issue or a pull request represents a breaking changedotnet-pri0.NET 6: required for stable release.NET 6: required for stable releaseenhancementThe issue or pull request is an enhancementThe issue or pull request is an enhancement