Commit Graph

109 Commits

Author SHA1 Message Date
cutealien
9f9d22ca33 Fix some problems with CMatrix4::getRotationDegrees
- Only the getRotationDegrees without parameter is allowed to try fixing scale.
  My fault when I added a new function which takes scale parameter, that one is
  not allowed to be changed.
  On the up-side - we know have for the first time an option which works in cases only
  scale and rotation had been used and the user still has the correct scale.
  Before any solution for that was broken
- getRotationDegrees fixes 2 places which caused wrong results due to floating point inaccuracies
  New test for that got added
- Document the current restrains and problems of getRotationDegrees and getScale some more.
- Improve docs for other matrix4 functions.
- Add some comments about further improvements (I'll try if I find time)

Note: Irrlicht still assumes in at least 2 places (getting bone animations and Collada loader) that matrix
decomposing works. Which it doesn't yet for matrices which switch handedness (or have further transformations like skewing axes)
The bone animation is mostly fine for now with recent workaround (but that might cause other problems as it may be used too often), haven't checked Collada yet in detail.

TL/DR: This improves things with getRotationDegrees, but does not yet fix all troubles.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6439 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-24 17:09:11 +01:00
cutealien
3cf75cdce4 Fix IGUIElements not getting a tab order because of invisible or disabled parents.
First problem was that IGUIElement::getNextElement wasn't passing includeInvisible and includeDisabled flags recursively, so anything deeper than one level could fail if an element was disabled/invisible in between while it was created.
Second problem was that setTabOrder(-1) did ignore disabled elements. So when any parent was disabled when elements were created they never got a tab order.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6428 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-24 17:09:11 +01:00
cutealien
a7f9afd289 Avoid ambigious conversions when compiling with c++20
Yay, more ugly casts needed.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6427 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-24 17:09:11 +01:00
cutealien
263f243523 S3DVertex initialize color always. It's derived classes now both accept const S3DVertex& constructor.
color intitialization has some cost, but we initialized all other values already (vectors are always set to 0).
Don't think it's a good idea to have one value around which is random.
S3DVertex2TCoords(S3DVertex& o) to S3DVertex2TCoords(const S3DVertex& o) simply because it makes more sense
S3DVertexTangents(const S3DVertex& o) added because I'll need it later (and no idea why only S3DVertex2TCoords got one of those before).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6359 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-24 17:09:11 +01:00
cutealien
c5ee8c8397 CVertexBuffer no longer re-allocates stuff when type doesn't change
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6339 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-24 17:09:11 +01:00
cutealien
b0c03b6f3b Add documentation that sourceRect of draw2dImage is based on the OriginalSize
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6324 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-24 17:09:11 +01:00
cutealien
679d3a8ba7 Avoid some more warnings when working with CMatrix4<f64>
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6304 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-24 17:09:11 +01:00
cutealien
d1f441787a Avoid warnings when working with CMatrix4<f64>
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6303 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-24 17:09:11 +01:00
cutealien
739a9eaf7c IVideoDriver::setMaterialRendererName now using u32 for index like other similar functions
Other functions like getMaterialRendererName got switched to u32 in the past. I can see no reason why this one was left out, so changing it to be same as the rest.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6300 dfc29bdd-3216-0410-991c-e03cc46cb475
2023-03-24 17:09:11 +01:00
numzero
52a0b9d8e5 Drop dependency on FileSystem from SceneManager 2023-03-19 19:47:43 +01:00
numzero
0160cdc51d Drop unused dependency of SceneManager on GUIEnvironment 2023-03-19 19:47:43 +01:00
numzero
25a7074c9a Remove all mentions of iOS 2023-03-14 17:54:08 +01:00
sfan5
21c61e9973 Bump revision early 2023-03-11 15:12:05 +01:00
Vitaliy
5a5a7d04b7
Drop IrrCompileConfig (#163) 2023-03-11 15:04:09 +01:00
sfan5
1d43ea17ca Bump revision 2023-03-05 21:45:09 +01:00
Desour
09e6eeb65b Remove irr::core::hash
Its use of std::unary_function was deprecated.
And it wasn't used anywhere.
2023-02-22 11:43:42 +01:00
Desour
839bdc1a65 Fix -Wignored-qualifiers warnings in irrUString.h 2023-02-22 11:43:42 +01:00
DS
51dffc416a
Add WindowMaximized creation parameter and isWindowMaximized() (#142) 2023-02-06 15:05:44 +01:00
sfan5
a9230e5f49 Delete profiler 2023-01-02 21:05:07 +01:00
sfan5
b5a6dc0a15 Delete leak hunter 2023-01-02 20:37:18 +01:00
sfan5
05a00a8d91 Completely remove irrAllocator 2022-12-23 19:56:21 +01:00
sfan5
07fd32da50 Replace core::string implementation with std::basic_string 2022-12-23 19:17:08 +01:00
sfan5
6f98515f34 Fix two irrString bugs
* append() missing null-termination
* eraseTrailingFloatZeros() was accidentally broken, comment it out for now
2022-11-11 16:24:27 +01:00
Andrei E
a549d0bfed Add setRelativeMode for SDL driver (#123) 2022-10-24 21:19:11 +02:00
sfan5
a0af653c3d Bump revision early 2022-10-24 21:17:53 +02:00
JosiahWI
59fc4401f1 Replace _IRR_OVERRIDE_ macro with override keyword
The commit also establishes a precedent of leaving off the `virtual`
keyword in overrides. Although not strictly necessary, I believe this is
good for readability because it makes it clear it is an override and not
a pure virtual function, and it helps keep line lengths shorter. We
should move towards eliminating the macro altogether, but the definition
has been left in with a note on deprecation so that in-progress work
will not suffer merge conflicts.
2022-10-15 01:09:09 +02:00
sfan5
9b541f2948 Fix buffer size for wchar-multibyte conversion 2022-10-14 15:47:49 +02:00
sfan5
3225007e8d Bump revision 2022-09-16 19:39:46 +02:00
sfan5
ff645cc876 Bump revision 2022-07-21 20:20:13 +02:00
sfan5
51f0acb7c1 Replace std::min in irrArray.h
should fix #122
2022-07-20 22:09:07 +02:00
sfan5
91edd214aa Enable XInput2 by default (and improve CMake detection)
closes #73
2022-07-18 21:42:43 +02:00
sfan5
538c9e5cde Drop gamma ramp code
We definitely won't be wanting to set the gamma for the entire display in the future.
2022-07-18 21:22:38 +02:00
sfan5
abebac8bd4 Return nullptr pointer for empty core::array
fixes minetest/minetest#12532
2022-07-17 12:44:58 +02:00
sfan5
a7b306f702 Drop Console and Framebuffer device
fbdev is long legacy and the console was just an ASCII art gimmick
2022-07-09 23:53:04 +02:00
sfan5
aa095d9525
Remove more dead code (#108) 2022-06-01 15:03:52 +02:00
paradust7
128cf1696c
Remove core::list and replace uses with std::list (#105) 2022-05-22 00:00:32 +02:00
paradust7
3e81f38098
Make irrArray backed by std::vector (#101) 2022-05-21 23:56:36 +02:00
paradust7
00a7741cd4 Remove irrMap and use std::map instead 2022-05-18 13:12:47 +02:00
Richard Try
6928c7eb6f
Add hash for vector2d and vector3d (#93) 2022-05-10 19:26:24 +02:00
sfan5
372b3642bf Bump revision 2022-05-07 11:24:47 +02:00
paradust7
ba0396e93d
Replace HWBufferMap with a list and back pointers (#99) 2022-04-29 12:04:22 +02:00
sfan5
c9b66c8c58 Sort out two -Wdeprecated-copy warnings
- SMaterial copy constructor is removed entirely
  (same change in upstream trunk r6362)
- CMatrix4 gets an explicit, but default copy constructor readded
2022-04-28 21:20:42 +02:00
sfan5
e469c54f76 Fix COSOperator::getSystemMemory
The values it returns are in Kilobytes and it was broken on macOS.
2022-03-09 22:52:11 +01:00
sfan5
df908ef4ea Get rid of various old compiler and platform checks 2022-02-26 12:11:27 +01:00
cutealien
4fb1c55ec5 IBillboardSceneNode got functions to access meshbuffers.
So uv-coordinates can now be modified directly (previously only possible via texture matrix).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6299 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-09 19:09:04 +01:00
cutealien
7fb36849c7 vector3d scalar operator/ and operator/= no longer multiply by the inverse but use the expected division.
That was a bad case of premature optimization.
Multiplication is indeed faster, but when working with floats this can introduce some rather unexpected inaccuracies.
Like x/x suddenly no longer being 1.0 (something guaranteed by division).
If someone really needs this back, then please add some new function which makes it clear we don't just have a typical division here.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6298 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-09 19:07:05 +01:00
cutealien
8c0ee7d9ab Avoid some warnings from static code analysis.
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6296 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-09 19:06:19 +01:00
cutealien
684293f527 Prefer static_cast to reinterpret_cast where possible.
Just safer. Could probably do in a lot more places... another time.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6293 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-09 19:05:49 +01:00
cutealien
1b8be72ccb de-deprecate clearZBuffer
Lets just keep this one around. Easy to use, downward compatible and generally works as expected.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6259 dfc29bdd-3216-0410-991c-e03cc46cb475
2022-02-09 19:02:36 +01:00
sfan5
e5f69157db Bump revision 2022-02-03 21:50:14 +01:00