Commit graph

128 commits

Author SHA1 Message Date
Robert Rouhani f10af59c14 Matrix2x3 and Matrix2x4 implementatinos 2013-01-19 23:58:30 -08:00
Robert Rouhani 5438f941dc More work on matrices.
Fixed some static fields in the math classes that weren't also readonly.
2013-01-19 15:06:51 -08:00
Robert Rouhani 84a03e965c Matrix2 implementation
Started on Matrix2x3 implementation
Minor changes to Matrix3 and Matrix4
2013-01-19 00:29:22 -08:00
Robert Rouhani 8b8ded3232 Added very basic implementations of all possible matrix sizes up to 4x4
Moved the indexers out of the Properties region and into their own Indexers region
2013-01-18 19:21:24 -08:00
Robert Rouhani e5adf4d862 Added Matrix4x3 and Matrix3x4 implementations from our game. 2013-01-18 15:32:09 -08:00
Robert Rouhani afefc93fc6 Fixed bug in Matrix4.LookAt. 2013-01-18 15:13:36 -08:00
Robert Rouhani 3a9dfc62ad Fixed extra endregion directive that prevented compilation.
Fixed some warnings about csproj files.
2013-01-16 22:11:18 -08:00
Robert Rouhani 1712057977 Removed swizzles that had duplicate components. 2013-01-16 19:21:54 -08:00
Robert Rouhani c0fcbb6961 Fixed spacing of #endregion directives from merging 2013-01-16 18:53:59 -08:00
Robert Rouhani bf1401e115 Fixed the issues caused by merging in our changes as patches from the old repo. 2013-01-16 18:08:03 -08:00
Robert Rouhani 59c652aaf8 Added all swizzle permutations up to the vector's dimension. 2013-01-16 18:01:07 -08:00
Robert Rouhani 56e75748b5 Added ref/out overload for Matrix4.Invert 2013-01-16 17:49:26 -08:00
Robert Rouhani 20c219bda1 Implemented perpendicular dot product in Vector2. 2013-01-16 17:46:05 -08:00
Robert Rouhani 7a0634814e Matrix4 optimizations 2013-01-16 17:45:10 -08:00
Andy Korth 6500e176df A bit of cleanup on the Vector ToStrings 2013-01-08 12:04:21 -06:00
Andy Korth 4230c6b4f0 Added Robmaister's Matrix3 implementations 2013-01-03 10:41:56 -06:00
Andy Korth 1939bc789d Added index getters and settors for Vector and Matrix classes 2013-01-03 10:39:15 -06:00
Andy Korth 0c7c1e8bd9 Add Create from quaternion method from avc81, OpenTK Issue 2439 2013-01-03 10:19:06 -06:00
Andy Korth 84e97adf45 Address OpenTK Issue 1880 2013-01-03 10:14:59 -06:00
the_fiddler d0cd45e6d0 Optimized Matrix4(d).Mult for a 7x speedup. Code courtesy of http://www.edais.co.uk/blog/?p=27 2011-09-04 20:52:42 +00:00
the_fiddler ed5c64208b * Quaternion.cs:
* Quaterniond.cs: Check for W > 1.0 _or_ W < -1.0 before normalizing
  in ToAxisAngle. Resolves issue [#2465]: "Quaternion rotation bug".
2011-07-10 14:48:29 +00:00
the_fiddler c4475ec05b Added missing double-precision radian-to-degree conversion routines. 2011-02-08 20:10:42 +00:00
the_fiddler 8677320714 * Vector4.cs: Fixed doc comment to refer to the single-precision
version of the structure, rather than the double-precision one.
2010-11-24 21:15:38 +00:00
the_fiddler 0153acb799 Updated documentation on Vector4(Vector3) constructor to state that the w component is initialized to 0. 2010-11-24 20:50:47 +00:00
the_fiddler 8be8190ee8 Fixed issue [#1895]: "Vector3d.Equals(object obj) defined in terms of Vector3, not Vector3d". 2010-11-21 10:54:11 +00:00
the_fiddler 8e88dbb352 Relaxed parameter checks for CreatePerspectiveFieldOfView. Fixes issue [#1693]: "CreatePerspectiveFieldOfView throws in valid cases". 2010-11-21 00:15:18 +00:00
the_fiddler f925ec1507 Modified TransformPerspective to work correctly with orthographic projection matrices. Fixes issue [#1827]: "OpenTK.Vector3.TransformPerspective code is wrong". 2010-11-21 00:09:50 +00:00
the_fiddler adc4d1ae59 Added 1-parameter constructors. 2010-11-15 22:34:52 +00:00
the_fiddler 7f6fa886da Fixed issue [#2072]: "Box2 constructor bug". 2010-10-11 07:54:46 +00:00
the_fiddler 1f4b5be7d0 Synced trunk with 1.0 branch. 2010-10-02 18:52:34 +00:00
the_fiddler da7e4c7252 Backported bugfixes from 1.0 branch. 2010-02-03 19:04:42 +00:00
the_fiddler f12cbf1cd5 Synced trunk with 1.0 branch. 2009-11-16 18:45:41 +00:00
the_fiddler c6ae9ae3fe Applied fix for use of C# 3.0 features from 1.0 branch. 2009-11-11 23:16:42 +00:00
the_fiddler 8af490627f Fixed a large number of recurring spelling mistakes in documentation (patch by iRBiS). Fixes issue [#1341]: "Vector4 constructor describes w component as z component + other spelling corrections". 2009-11-09 08:15:38 +00:00
the_fiddler aedb514b84 Fixed documentation which describes w components as z components (patch by iRBiS). 2009-11-09 08:12:34 +00:00
the_fiddler e35f9d5374 Disabled OpenTK.Point, Size and Rectangle structures that were meant to replace their System.Drawing implementations until the correct course of action can be determined. This change is too disruptive to existing applications, especially if they are also using Windows.Forms (see discussion here: http://www.opentk.com/node/1348). 2009-11-08 23:02:53 +00:00
the_fiddler 62fee03192 * Rectangle.cs: Fixed ToString formatting code. 2009-11-06 10:04:32 +00:00
the_fiddler c09c21dc64 Cleaned up a large number of documentation issues. 2009-11-04 20:48:02 +00:00
the_fiddler 6770e171ed Enabled System.Drawing.Point/Size/Rectangle replacements. 2009-11-04 19:10:32 +00:00
the_fiddler eb92aa8223 Implemented Tranform(Vector, Quaternion) overloads. Fixes issue [#1028]: "[Math] Add vector transformation by quaternion". 2009-11-03 12:20:21 +00:00
the_fiddler b5eb7fdb93 Deprecated Mult in favor of Multiply.
Modified operator * to use Multiply internally (reduces code duplication).
2009-11-03 12:11:51 +00:00
the_fiddler eeda1bf866 Fixed Vector3.Transform signature to return a Vector3, not a Vector4. It was previously impossible to transform a Vector3 structure without intermediate conversions to Vector4. 2009-11-03 11:45:20 +00:00
the_fiddler 4d3e84701c Modified Transform(ref Vector4, ref Matrix4, out Vector4) overload to work correctly when the ref and out parameters point to the same Vector4.
Modified Transform(Vector4, Matrix4): Vector4 to call the reference overload internally. Faster and reduces code duplication.
2009-11-03 11:41:36 +00:00
the_fiddler 1073c8ccac * Matrix4d.cs: M44 should be 1.0 to conform with GL.Ortho(). Fixes issue [#1307]: "GL.Ortho behaves other than combination of OpenTK.Matrix4d.CreateOrthographic and GL.MultMatrix". 2009-11-02 13:25:41 +00:00
the_fiddler 600f657b70 Improved interoperation with System.Drawing with new addition, subtraction and implicit conversion operators, as well as additional method overloads.
Only expose fields through public properties to allow for parameter validation.
2009-11-02 07:20:59 +00:00
the_fiddler ff572e83b7 Added experimental OpenTK.Point/Size/Rectangle alternatives to System.Drawing, to make OpenTK usable without referencing System.Drawing (disabled by default, #define EXPERIMENTAL to test). Modified a number of using directives and namespace qualifiers to accommodate this change. 2009-11-01 12:44:38 +00:00
the_fiddler 83514567f4 Corrected documentation on the M42 property. Fixes issue [#1227]: "Matrix4.M42 documentation". 2009-10-14 18:30:12 +00:00
the_fiddler 34f36d579f Added missing CreatePerspectiveFieldOfView and CreatePerspectiveOffCenter methods (fixes issue [#1226]: "Matrix4d.CreatePerspectiveFieldOfView").
Replaced several instances of float values by double equivalents.
2009-10-13 21:33:59 +00:00
the_fiddler 8992f90571 Replaced calls to obsolete methods.
Fixed parameters in double versions of BaryCentric() (should be double instead of float).
2009-10-06 09:51:13 +00:00
the_fiddler f926595b64 Obsoleted Scale() instance method (reason: redundant. Mult()/Multiply() instance/static methods can be used to achieve the same effect). 2009-10-06 09:45:09 +00:00