Commit Graph

138 Commits

Author SHA1 Message Date
Cameron Cawley
288e1aaa3f COMMON: Remove use of fmin/fmax/fminf/fmaxf 2024-01-08 13:07:05 +01:00
Cameron Cawley
5b1b14ad80 COMMON: Mark more symbols as const 2023-12-26 20:23:59 +01:00
neuromancer
2e45130a70 MATH: added function to obtain size of AABBs 2023-05-17 10:11:20 +02:00
neuromancer
0589fe0912 MATH: added generic collision code for AABB class 2023-05-06 14:03:04 +02:00
Matthew Duggan
1c5e05ae69 MATH: Add Frustum::isTriangleInside utility function 2023-05-06 16:47:50 +09:00
Einar Johan Trøan Sømåen
fcb8eda978 MATH: Add some constexpr to the Matrix base-classes.
Currently we can't quite make Matrix3's default constructor constexpr,
as the setToIdentity-call requires C++14.
2023-04-29 13:10:23 +02:00
Einar Johan Trøan Sømåen
cfb9c4b251 MATH: Make the Rotation3D/Transform constructors constexpr
This lets us have constexpr structs/classes that contain them
2023-04-29 13:10:23 +02:00
Matthew Duggan
eba2fb9b5f MATH: Add ray triangle intersection and tests 2023-01-16 17:36:43 +01:00
elasota
cc11b531e3 JANITORIAL: Clean up all non-engine Visual Studio warnings. 2022-12-04 00:08:48 +01:00
Cameron Cawley
e04000d4b0 COMMON: Move FFT, DCT, MDCT, RDFT, SineTable, CosineTable and getSineWindow into Math 2022-11-20 14:32:05 +01:00
Matthew Duggan
692a2e166e MATH: Make Vector3d::length const correct 2022-10-15 14:31:00 +09:00
Le Philousophe
511852e431 MATH: Use reference instead of value
Else we can't return a reference to the object as it's a local copy
2022-09-18 16:15:56 +02:00
Paweł Kołodziejski
78d4217ddb
MATH: Janitorial 2022-06-20 00:19:40 +02:00
Donovan Watteau
5b1ec56f96 JANITORIAL: Fix some lost or outdated URLs in comments 2022-05-19 07:57:31 +03:00
Paweł Kołodziejski
20cb0ae228
ALL: Cleanup ResidualVM -> ScummVM 2021-12-26 21:19:38 +01:00
Le Philousophe
7259ad3535 MATH: Fix build failure by adding squre matrix specialization 2021-12-26 19:35:56 +01:00
Paweł Kołodziejski
6f08c6a186
MATH: Remove no longer needed function 2021-12-26 18:58:39 +01:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paweł Kołodziejski
dcce1f670d
MATH: Implement vector3d and matrix3 multiplication 2021-12-26 18:44:49 +01:00
Paweł Kołodziejski
888049db2d
MATH: Inverse translate function is no longer needed 2021-12-26 17:26:57 +01:00
Orgad Shaneh
5fa8082dcb MATH: Change Vector argument in [un]project to const reference 2021-11-02 10:06:28 +01:00
Paweł Kołodziejski
881b477e83
MATH: Added length and interpolate helpers for Vector3d 2021-10-18 07:48:33 +02:00
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