Repository navigation
[3.0] Generic Matrix Math #2528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
otac0n
wants to merge
147
commits into
dotnet:develop/3.0
Choose a base branch
from
otac0n:feature/math-3.0
base: develop/3.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
147 commits
Select commit
Hold shift + click to select a range
3c95d6d
start of 3.0 Silk.Net.Maths rewrite
Tweety-Lab 04846e7
Start work on Vector2I.
Tweety-Lab 7afd57f
Finish implementing Vector2I Interfaces.
Tweety-Lab 249be1f
Add Vector2I Unit properties.
Tweety-Lab 709c142
Add Vector3I Maths methods.
Tweety-Lab 94a912d
Add more missing Vector2I requirements.
Tweety-Lab 051785d
Add `Vector3I`.
Tweety-Lab 88b8405
Change VectorI XML comments.
Tweety-Lab d1eade9
Add `Vector4I`.
Tweety-Lab 9b68e35
Improve VectorI equality checks.
Tweety-Lab 6a3cf88
Start work on new `Quaternion`.
Tweety-Lab cc7ebb6
Clarify current state of new Math type's indexers.
Tweety-Lab 6af8612
Add lower-dimensional VectorI constructors.
Tweety-Lab 737b5a8
Add `Vector2F`.
Tweety-Lab 191de4e
Include generated code.
otac0n 1cecebe
Merge pull request #1 from otac0n/feature/math-3.0
Tweety-Lab 291ec1e
Generated constructors, operators, and indexers.
otac0n cfee012
Whitespace and comments.
otac0n 91c7982
Added transpose, negate, and identity.
otac0n 650f30b
Added some necessary vector bits for testing.
otac0n 8ebcfb9
Merge pull request #2 from otac0n/feature/math-3.0
Tweety-Lab 9bd27fe
Add Lerp and a couple of bugfixes.
otac0n a617eb8
Remove `IBinaryFloatingPointIeee754` reference.
Tweety-Lab d57f94d
Make `VectorNI` Vectors use a `ref` indexer.
Tweety-Lab d5a8b54
Use partial implementations from code gen.
otac0n 3c538bd
Make `Vector2F` Vector use a `ref` indexer.
Tweety-Lab 4f74ab3
Fix vector `ref` indexer exception messages.
Tweety-Lab c9e57f2
Merge branch 'feature/math-3.0' of https://github.com/Tweety-Lab/Silk…
otac0n a4b8a6c
Move constructors & existing interfaces.
otac0n 5a82141
IReadOnlyList<T> code gen.
otac0n 16e68e2
Fix errors with Quaternion accessibility.
otac0n 7efc1eb
Merge pull request #3 from otac0n/feature/math-3.0
Tweety-Lab 0cb1569
Move common operators and interfaces into templates.
otac0n c9ce628
Use Legacy namespace qualifications for lecacy Quaternion.
otac0n aac298a
Generate constructors to extend smaller vectors.
otac0n 25f6994
Removed AllBitsSet from Vector2F.
otac0n 41aa58d
Generate vector specific methods in templates.
otac0n 0f2d43c
Merge pull request #4 from otac0n/feature/math-3.0
Tweety-Lab 09e674c
Snapshot.
otac0n 070c6f5
Replace generated I/F types with D types.
otac0n aefd7ea
Merge matrix types.
otac0n acaf6b4
Update existing types to use INumberBase.
otac0n ffb7f58
Fix errors.
otac0n d07c355
Code-gen more matrix implememtations.
otac0n 80fbbfc
Types that need Min/Max (e.g. Box) use INumber instead of INumberBase…
otac0n 2a79fd8
Added explicit casts for vectors.
otac0n 5e0e7d9
Use extension properties for LengthSquared and Length. Use these for…
otac0n 5973151
Generate more vector functions and reorganize.
otac0n 69be9de
Fix type constraints.
otac0n 75b1c5d
Overloads for casts, As, CreateChecked, CreateSaturating, and CreateT…
otac0n ac8e94e
Handle IsIdentity and GetDeterminant errors.
otac0n f71206c
Use T.Zero instead of default to avoid NRE.
otac0n 0345ba5
Code-gen multiply operators.
otac0n 9497be8
Recovered Old Quaternion implementation.
otac0n 9aa76de
Fix Obsolete warnings.
otac0n 2d6c95b
XML Doc Comments.
otac0n 1c2b6f8
Reset APIs.
otac0n bfe143c
Merge pull request #5 from otac0n/feature/math-3.0
Tweety-Lab de7b9f1
Remove Scalar class and references.
otac0n be95c6b
Update API & Constraints to use generic math in place of the Scalar t…
otac0n 7099d0d
Moved comments and class attributes to the generated files.
otac0n a9ad742
Comment tweaks.
otac0n 55cfcf8
Added vector overloads from the updated proposal.
otac0n 7770ded
Move non-generic Matrix and Vector classes into separate files.
otac0n 09e6b93
Use columns for transpose implementation.
otac0n 3f38988
Put properties and indexers before constructors.
otac0n 0b61138
Generate System.Numerics conversions.
otac0n 43a8130
Small fixup to pending Decompose method.
otac0n 5d73712
Use aggressive inlining for static properties. Use T.One and T.Zero f…
otac0n 6ae88de
Rename vector operation files.
otac0n 516c52e
Removed `this` modifiers from generated extension methods. Added Mult…
otac0n 38b1672
Merge branch 'develop/3.0' into feature/math-3.0
otac0n 59587cd
Don't use infix Dot() function.
otac0n 6c9eace
Synced PublicAPI.Unshipped.txt
otac0n c54f0bf
Moved and modernized old Quaternion implementation.
otac0n 1ea91c9
Update Quaternion API usage in tests.
otac0n c2c5cd0
Added Vector.Transform(Matrix) overloads.
otac0n 43868c3
Added Floor/Round/CeilingToInt methods.
otac0n 8e06b11
Added ToVector512 etc. conversions.
otac0n b36e272
Add (preliminary, possibly subtly wrong) implementations of `Matrix4X…
otac0n a9c2add
Test syntax cleanup.
otac0n 6599187
Fix accidental column-vector multiplication for Vector.Transform.
otac0n bf41b90
More fixes from tests.
otac0n f3c058b
Even more fixes from the tests.
otac0n 69c3403
Even even more more.
otac0n 10a1266
Fix Matrix Decompose.
otac0n 883061c
Generate static extension properties.
otac0n beac54d
Remove extra INumberBase extensions.
otac0n 4b0d54f
Added bitwise vector operators.
otac0n dbf1a86
whitespace
otac0n 1b466f1
Parameter rename.
otac0n e6f4ba9
Code style change to propagate same-operator call chain on equality o…
otac0n 7230574
Unused usings.
otac0n faa5a22
Generated line ending consistency.
otac0n 483d41b
Inheritance syntax consistency.
otac0n 69b7c1c
Vector-to-vector explicit casts.
otac0n be372bd
Consistency in style/API for Quaternion.
otac0n 2f28558
Fixup Matrix5x4 multiply.
otac0n de43e88
fixup missed vector lerp API
otac0n 5db55ad
Consistent equality implemenation style.
otac0n a6d33cd
Consistent use of constants.
otac0n 443df2c
Auto-assign readonly modifier.
otac0n b265dde
Formatting.
otac0n 253048f
Use common ctor.
otac0n 4f81855
Consistent NaN equality behavior with underlying types.
otac0n 8782ca4
Use casts for performance.
otac0n 7ea4b10
Remove bad test.
otac0n 681f214
Assume MathF.
otac0n fe5e1cb
Remove Quaternion.Old.cs
otac0n 0b95fc8
ToVectorXXX methods should be extensions.
otac0n 71731b4
Formatting.
otac0n 09617fc
Added System.Numerics casts.
otac0n f9b294a
Rename Invert -> Inverse.
otac0n 4228f25
Rectangle/Cube -> Rect2/Rect3
otac0n 7142a6b
Removed matrix constructors that take other matrices as inputs and di…
otac0n 3547040
Add IExtents interfaces.
otac0n 112f6ce
Add missing As operators.
otac0n 41fb5be
Remove HalfSize.
otac0n 4a09494
Factor out duplicate Contains implementations and add Intersects.
otac0n 8606907
Bring Circle and Sphere up to spec.
otac0n c3ac0c0
Align behind SDF-based edge functions.
otac0n 5fcac20
Merge remote-tracking branch 'upstream/develop/3.0' into feature/math…
uwx 56ec1c8
Merge remote-tracking branch 'uwx/feature/math-3.0' into feature/math…
otac0n e08d3aa
Rename create methods to RH.
otac0n 5fa6c58
Added left-handed matrix factories.
otac0n b1dd62b
Added Matrix4X3 ops.
otac0n e2f7dff
Merge remote-tracking branch 'origin/develop/3.0' into feature/math-3.0
otac0n d326d31
Added Ray/Line/Segment SDF.
otac0n 3ebd6bf
Added Matrix Decompose methods.
otac0n 51999ca
Added CreateLookTo* methods.
otac0n 481fb53
Added CreateViewport.
otac0n e902edc
Added CreateFromPointNormal and reduce the requirements of Normalize.
otac0n 339fb48
Added scale/translate/distance Plane static methods.
otac0n 8021f43
Added scale/translation Ray static functions.
otac0n 128071f
Added normalize Ray static functions.
otac0n cf6375e
Added Intersects methods for Sphere & Circle.
otac0n 0d8933e
Build fixes.
otac0n e5ae355
Added non-square and small matrix Invert and GetDeterminant implement…
otac0n f5b5dce
Remove NaN check on failed branch.
otac0n 8627d6a
Move Quaternion operations to a static class.
otac0n 88f8402
Added current state of code generator from: https://github.com/otac0n…
otac0n 3212049
Rename for better semantics.
otac0n 0db5cb6
add TryFormat with less stack allocation if possible
uwx 129207c
add generator
uwx 42fb35a
enregister maths types as system.numerics if T is a float
uwx 9410cc5
do not throw directly, use throw helper
uwx 856095a
Merge pull request #3 from uwx/feature/math-3.0
otac0n File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
do not throw directly, use throw helper
- Loading branch information
commit 9410cc5db3884c770a1620b86b06a7862fff2aeb
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a lot happening in this method, some of which is probably cacheable. I don't care enough to make this a hard line for this PR given this is a tool we'll probably be running once in a blue moon once committed, but it's food for thought! Use your own judgement haha