147 Commits

Author SHA1 Message Date
Vladimir Menshakov 84cdfd7ed1 MATH: constify DCT calc functions 2025-11-30 19:20:28 +00:00
Helco 7199f2571a MATH: Fix deg2rad test compilation for MSVC 2025-11-02 15:27:28 +01:00
Donovan Watteau 69dd0889cc JANITORIAL: Update some HTTP links in comments to HTTPS
The modern web is mostly HTTPS now, and some browsers may start giving
warnings when one uses a plain HTTP connection.

Only update the protocol when the HTTPS connection exists and fully
works.  Code from external projects/tools is kept as is.
2025-10-29 14:22:37 +01:00
Donovan Watteau 2ae50a5059 JANITORIAL: Update some old URLs, and use web.archive.org for deleted content 2025-10-29 14:22:37 +01:00
Donovan Watteau 4dea9d9782 MATH: Add workaround for MSVC 2015 compiler bug (C2248)
At least MSVC 2015 (14.0.25420.01 Update 3) will hit a C2248 compiler
error.  Quoting @lephilousophe, "It looks like a bug. It tries to
generate a move constructor but it believes it can't access the base
constructor, although the constructor it creates is in a child class,
while the MatrixBase constructor is protected."

Since MSVC 2015 is still able to compile most of the engines and
components (not all of them, though), having a local hack for it
seems reasonable...
2025-10-05 19:52:08 +02:00
Thomas N McEwan 1afbbf9439 MATH: Make sequence of vector2d & vector3d member declarations more consistent for better readability & comparison. 2025-08-25 22:55:34 +01:00
Cameron Cawley 89c57d29ef COMMON: Move more maths functions into the Math namespace 2024-07-27 14:00:48 +03:00
neuromancer d782923a3d MATH: added const qualifier to AABB collision function 2024-05-06 22:57:08 +02:00
neuromancer 2c67f90d4b MATH: added distance function from point to AABB 2024-05-06 22:57:08 +02:00
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