Commit Graph

116 Commits

Author SHA1 Message Date
Michael Ball
0e9c4ca720 Update matrix.h
Removed extraneous character that, when the "math" directory is included, causes the doxygen build to fail.
2021-06-04 10:45:05 +03:00
Orgad Shaneh
a05e54f00c JANITORIAL: Remove trailing whitespaces 2021-05-04 11:46:30 +03:00
Eugene Sandulenko
5e7fe2dc57
JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Paweł Kołodziejski
161c42c118
MATH: Formatting cleanup 2021-04-05 23:08:48 +02:00
Paweł Kołodziejski
3d84e3eb75
MATH: Extend matrix operators. Added getXYZ() for vector4. 2021-03-29 00:04:46 +02:00
Orgad Shaneh
ef4cc34347 MATH: Fix Clang warnings on Matrix
../scummvm\math/matrix.h:146:2: warning: definition of implicit copy assignment operator for 'MatrixBase<4, 4>' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
        MatrixBase(const MatrixBase<rows, cols> &m);
        ^
../scummvm\math/squarematrix.h:37:7: note: in implicit copy assignment operator for 'Math::MatrixBase<4, 4>' first required here
class MatrixType<dim, dim> : public MatrixBase<dim, dim> {
      ^
../scummvm\math/matrix4.h:36:7: note: in implicit copy assignment operator for 'Math::MatrixType<4, 4>' first required here
class Matrix<4, 4> : public MatrixType<4, 4>, public Rotation3D<Matrix<4, 4> > {
      ^
../scummvm\engines/grim/costume/mesh_component.h:45:65: note: in implicit copy assignment operator for 'Math::Matrix<4, 4>' first required here
        void setMatrix(const Math::Matrix4 &matrix) override { _matrix = matrix; };
                                                                       ^
2021-03-15 14:10:31 +02:00
Christian Krause
27a7952679 MATH: make Angle class more robust
- clamp some intermediate values to the defined range
  which could be slightly violated due to floating point rounding
2020-12-08 19:30:04 +01:00
Christian Krause
082e792460 MATH: Refactor Line2d
- use standard linear equation Ax + Bx = C
- simplify most calculations
- remove default constructor
- remove unused function
2020-12-08 19:26:25 +01:00
Christian Krause
f2195d8dbf MATH: Make implementation of Segment2d more robust
- prevent division by zero
2020-12-08 19:09:08 +01:00
Torbjörn Andersson
ba37c52047 JANITORIAL: Remove some unnecessary semicolons 2020-11-17 07:22:49 +01:00
Paweł Kołodziejski
e2cd2e6ed7 COMMON: Rename Common::Debug to Common::StreamDebug 2020-10-16 21:47:16 +02:00
Paweł Kołodziejski
35b9cccbde ALL: Merge ResidualVM 2020-10-09 19:44:13 +02:00
Bastien Bouclet
b51b484b49 MATH: Silence a noisy warning when building with GCC 9 in C++11 mode 2019-11-27 06:41:05 +01:00
Bastien Bouclet
40720abde2 COMMON: Remove now unused ResidualVM specific float handling 2018-04-14 13:57:05 +02:00
Vincent Pelletier
84f83fe6ea ALL: Rename get_float to READ_LE_FLOAT
For consistency with other functions/macros from common/endian.h .
2017-05-12 13:57:16 +00:00
Bastien Bouclet
16938a6aff MATH: Fix a member shadowing warning in the Ray class 2016-09-15 08:19:15 +02:00
Pawel Kolodziejski
82bc17b63a ALL: Fixed compiler warnings 2016-07-23 19:08:22 +02:00
Bastien Bouclet
f6775fab96 MATH: Make slerpQuat const 2016-04-09 08:41:21 +02:00
Bastien Bouclet
5c73d0083d ALL: Merge branch 'tlj' 2016-01-01 07:33:20 +01:00
Bastien Bouclet
992dc2e964 MATH: Fix Line3d::intersectLine2d to perform a segment intersection test
It was previously doing a line vs line segment intersection test
2016-01-01 07:29:57 +01:00
Bastien Bouclet
0389b0ea43 MATH: Add a Ray class
Models a 3d half-line, used for ray tracing
2016-01-01 07:29:55 +01:00
Bastien Bouclet
1cc12b6981 MATH: Make Quaternion::inverse const 2016-01-01 07:29:55 +01:00
Bastien Bouclet
3f3459e4b9 MATH: Add a vector rotation method to the Quaternion class 2016-01-01 07:29:39 +01:00
Bastien Bouclet
f4a585b4a3 MATH: Make it clear what Line3d::intersectLine2d does 2015-08-10 21:34:47 +02:00
Bastien Bouclet
f3f4275ad1 MATH: Fix Line3d::intersectLine2d to perform a segment intersection test
It was previously doing a line vs line segment intersection test
2015-08-09 19:19:32 +02:00
Bastien Bouclet
6f47c5fbf3 MATH: Simplify gluMathUnProject 2015-03-22 15:57:15 +01:00
Pawel Kolodziejski
f7407f35f2 MATH: Add a vector rotation method to the Quaternion class 2015-02-21 12:35:55 +01:00
Pawel Kolodziejski
cdd837f379 MATH: convert LGPL code to GPL 2015-01-17 21:08:27 +01:00
Christian Krause
cc9734643b MATH: Add/fix matrix operators
- fix == operator
- add != operator
2014-12-31 17:07:19 +01:00
Joni Vähämäki
2c1ae44b5c GRIM: Fix matrix to quaternion conversion. Fixes #1132 2014-12-25 23:12:26 +02:00
Christian Krause
0fe9168944 MATH: Don't normalize a (0, 0, 0, 0) quat
- this fixes the issue of the vanished boats in EMI's lava puzzle
- without the patch, the division by 0.0f causes the quat's values
  to be NAN
- the floating point NAN value is ignored by OpenGL, so the vertices
  are not drawn at all
2014-10-19 01:21:34 +02:00
Joseph Jezak
274e11a68e MATH: Add const qualifier to getEuler. 2014-09-11 13:38:30 -04:00
Joseph Jezak
cfeff853be MATH: Add factorization for non-unique answers in Rotation3D. 2014-09-11 13:38:30 -04:00
Joseph Jezak
e34d0ddba3 MATH: Replace Quaternion XYZ with Euler. 2014-09-11 13:38:30 -04:00
Joseph Jezak
99fa91053c MATH: Rename XYZ Rotation Functions to Euler to better describe the function. 2014-09-11 13:38:28 -04:00
Bastien Bouclet
14bacc9496 MATH: Fix typo in gluMathUnProject
Fixes the right click mode in Myst 3
2014-08-24 08:37:35 +02:00
Pawel Kolodziejski
e539b27af8 MATH: improve type support for viewport argument 2014-08-15 12:25:48 +02:00
Pawel Kolodziejski
9ad08415ce MATH: no need do cast anymore in Matrix4::inverse 2014-07-12 07:08:29 +02:00
Joel Teichroeb
cb6a58e01e MATH: Make Matrix4::inverse not const as it changes data 2014-07-10 20:23:06 -07:00
Pawel Kolodziejski
46a91377d8 MATH: added few GLU helpers 2014-07-10 07:27:18 +02:00
Pawel Kolodziejski
5fed6150a0 JANITORIAL: formatting headers 2014-07-08 23:10:17 +02:00
Joni Vähämäki
23a99a9f2b EMI: Implement head limits. 2014-07-02 22:43:58 +03:00
Joseph Jezak
d2d23738a5 MATH: Replace Euler Angle Implementation in Quaternions with Rotation3D based method. 2014-07-01 16:18:12 -04:00
Joseph Jezak
c1b5adf348 MATH: Add new quaternion capability. 2014-07-01 16:18:08 -04:00
Joseph Jezak
f57768ea28 MATH: Add comments and rename getQuaternion. 2014-07-01 11:27:08 -04:00
Joseph Jezak
78772c999b MATH: Rename getVector3d and add comments for the Vector3d class. 2014-07-01 11:27:02 -04:00
Joel Teichroeb
abfd775d51 MATH: Cast M_PI to a float to fix an MSVC warning 2014-06-25 13:45:11 -07:00
Joseph Jezak
b4e730beaa MATH: Keep position when building rotation. 2014-06-24 11:36:35 -04:00
Joseph Jezak
231a98056f MATH: Fix gimbal lock for ZXY. 2014-06-24 11:36:12 -04:00
Joseph Jezak
76d36f676b MATH: Add a selectable Euler Order to Rotation3D. 2014-06-23 09:04:25 -04:00