-
-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
89 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
41 changes: 41 additions & 0 deletions
41
documentation/proposals/Proposal - 3.0 Additional math types - Collision.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Summary | ||
Proposal API for additional math types to bring it up to feature parity with other popular math libraries i.e. `SlimDX`, `SharpDX`, or `Stride3D`. Leveraging modern .NET features such as `INumber<T>` and vectorization. | ||
|
||
This proposal is regarding "collision shapes" for containment and intersection tests. | ||
|
||
# Contributors | ||
- Daniel Keenan (dfkeenan) | ||
|
||
# Current Status | ||
- [x] Proposed | ||
- [ ] Discussed with API Review Board (ARB) | ||
- [ ] Approved | ||
- [ ] Implemented | ||
|
||
# Design Decisions | ||
- This proposal should compliment/augment the proposed 3.0 implementation of `Silk.Net.Maths`, matching `System.Numerics` where possible, with concessions for design oversights in that api. | ||
- This proposal assumes no knowledge of the 2.x Math library. | ||
- Text herein marked **INFORMATIVE** does not form a normative part of this proposal, and is for background only. | ||
- Within this proposal, the key words **must**, **required**, **shall**, **should**, **recommended**, **may**, **could**, and **optional** are to be interpreted as described in [RFC 2119 - Key words for use in RFCs to Indicate Requirement Levels](https://www.ietf.org/rfc/rfc2119.txt). The additional key word **optionally** is an alternate form of **optional**, for use where grammatically appropriate. These key words are highlighted in the proposal for clarity. | ||
|
||
# **INFORMATIVE** Integer and Floating Point Types | ||
While investigating the use of generic math it was decided to provide both an integer and floating point variant for each vector type and every type built from them. See [Generic Math](Proposal%20-%20Generic%20Math.md) proposal for more details. | ||
|
||
# I types versus F Types | ||
Where it is appropriate for a type in this proposal to have both integer and floating point variants they will have a name that ends in I or F, defining whether it is an integer type or floating point type. Integer types **must** use a generic type argument `T` with the constraint of `IBinaryInteger<T>`. On the other hand, floating point types **must** use a generic type argument `T` with the constraint of `IFloatingPointIeee754<T>`. | ||
|
||
# Proposed API | ||
|
||
DirectX and other APIs include "collision shapes" that can be used for such things as culling. `Silk.Net.Maths` already includes some types i.e. `BoxF`, `PlaneF`. These are additional. | ||
|
||
### Frustum | ||
|
||
### OrientedBox | ||
|
||
### CollisionHelper | ||
|
||
### PlaneIntersectionType | ||
|
||
### ContainmentType | ||
|
||
|
37 changes: 37 additions & 0 deletions
37
documentation/proposals/Proposal - 3.0 Additional math types - Color.md
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Summary | ||
Proposal API for additional math types to bring it up to feature parity with other popular math libraries i.e. `SlimDX`, `SharpDX`, or `Stride3D`. Leveraging modern .NET features such as `INumber<T>` and vectorization. | ||
|
||
This proposal is regarding color type structs. | ||
|
||
# Contributors | ||
- Daniel Keenan (dfkeenan) | ||
|
||
# Current Status | ||
- [x] Proposed | ||
- [ ] Discussed with API Review Board (ARB) | ||
- [ ] Approved | ||
- [ ] Implemented | ||
|
||
# Design Decisions | ||
- This proposal should compliment/augment the proposed 3.0 implementation of `Silk.Net.Maths`, matching `System.Numerics` where possible, with concessions for design oversights in that api. | ||
- This proposal assumes no knowledge of the 2.x Math library. | ||
- Text herein marked **INFORMATIVE** does not form a normative part of this proposal, and is for background only. | ||
- Within this proposal, the key words **must**, **required**, **shall**, **should**, **recommended**, **may**, **could**, and **optional** are to be interpreted as described in [RFC 2119 - Key words for use in RFCs to Indicate Requirement Levels](https://www.ietf.org/rfc/rfc2119.txt). The additional key word **optionally** is an alternate form of **optional**, for use where grammatically appropriate. These key words are highlighted in the proposal for clarity. | ||
|
||
# **INFORMATIVE** Integer and Floating Point Types | ||
While investigating the use of generic math it was decided to provide both an integer and floating point variant for each vector type and every type built from them. See [Generic Math](Proposal%20-%20Generic%20Math.md) proposal for more details. | ||
|
||
# I types versus F Types | ||
Where it is appropriate for a type in this proposal to have both integer and floating point variants they will have a name that ends in I or F, defining whether it is an integer type or floating point type. Integer types **must** use a generic type argument `T` with the constraint of `IBinaryInteger<T>`. On the other hand, floating point types **must** use a generic type argument `T` with the constraint of `IFloatingPointIeee754<T>`. | ||
|
||
# Proposed API | ||
|
||
### Color | ||
|
||
### ColorBGRA | ||
|
||
### ColorHSV | ||
|
||
### Color3 | ||
|
||
### Color4 |