Commit graph

177 commits

Author SHA1 Message Date
marauder2k7
a92b9d0e2d code review with az
changes per review, frustum wasnt dirty... i like it dirty
2024-12-05 00:17:44 +00:00
marauder2k7
f288ffccba cubemap baking fix
the key part of this issue was to invert the order we were baking the faces. Not much of a fix but it works better than before need to get a proper fix implement
the way the issue is copying X+ into every other face but isnt doing it in the reverse order means the rtv for face 0 must be being replicated into all other faces.
2024-12-04 21:57:32 +00:00
marauder2k7
b72b7882c2 unit test improved precision
change matrix unit tests to use POINT_EPSILON macro for testing precision
remove old matrix test class, was not used anyway
2024-08-01 05:04:13 +01:00
marauder2k7
699fa5ef77 Update mMatrix.h
invertTo should always just be const
return loop to * operator, explicit will not allow for scaling of rows and cols
2024-08-01 03:33:07 +01:00
marauder2k7
b5e729c179 Update mMatrix.h
add default destructor
2024-07-31 19:02:23 +01:00
marauder2k7
219792cc30 Update mMatrix.h
returning identity no longer necessary as fullinverse is its own algo
2024-07-31 18:54:22 +01:00
marauder2k7
165a2bea01 fix
fix invertTo function
unitTest to make sure matrix calling invertTo does not get changed.
reimplemented gauss jordan.
2024-07-31 18:52:18 +01:00
marauder2k7
ab4b4cbf96 cramer for inverse
added #if block around inverse methods to track down shadow bug

uses old inverse method as default for now.
2024-07-31 17:32:00 +01:00
marauder2k7
4078f3ad4e inverse fixes
further tests showed issues with inverse function, now to better match what was originally happening, the inverse only happens on the 3x3 portion of the matrix and translation is handled separately.

Frustum test now uses more real world examples of a projection matrix. Test for the full unproject stack of math to test its result as unproject was where the issue about inverse originated
2024-07-30 17:54:16 +01:00
marauder2k7
f96e044d89 unit tests and fixes
implemented the rest of the tests
euler single dimension angle tests now pass, missed 1.0f in z
2024-07-30 13:00:32 +01:00
marauder2k7
d03851958d more fixes
more unit tests revealed more discrepancies fixes applied.
2024-07-30 08:30:42 +01:00
marauder2k7
a5de2d9add tests
added more unit tests to match values between templated and matrix

tests showed discrepancies in affineInverse, fixed the function to return what is expected.
2024-07-30 07:20:57 +01:00
marauder2k7
8c19f6d8ca inverse function
fixed inverse function, was not returning correctly.
2024-07-29 21:50:33 +01:00
marauder2k7
54bb31c8bc Update mMatrix.h
bracket lines
change functions to match mmath_c to figure out where the issue is.
2024-07-29 17:24:23 +01:00
marauder2k7
75c5a0919b Update mMatrix.h
silence issues from macos clang
2024-07-29 16:39:08 +01:00
marauder2k7
2fa15191ae Update mMatrix.h
most working example
2024-07-28 20:40:26 +01:00
marauder2k7
504b549ac0 Update mMatrix.h 2024-07-28 19:38:02 +01:00
marauder2k7
c61d36b799 closest
backup closest working example, no errors or warnings from compile, matrices arent correct though yet.
2024-07-28 19:36:07 +01:00
marauder2k7
888332a85c rest of the implementation
apparently templated classes need all functions to be inline, otherwise unresolved symbols
macro for switching between matrixf and templated
few functions that were missed
2024-07-28 14:35:34 +01:00
marauder2k7
8f8cc32636 normalize and affineInverse
added functions for normalize and affineInverse
2024-07-28 11:54:44 +01:00
marauder2k7
2cee5f7e10 mul and operators
add mul functions and operators
code conformity changes
2024-07-28 09:02:49 +01:00
marauder2k7
02b5e85f61 implement struct example 2024-07-28 07:04:23 +01:00
marauder2k7
c0bcb8bd00 Update mMatrix.cpp
fix comment, torque is already column major, even though doc says its row major
2024-07-28 06:38:11 +01:00
marauder2k7
0f02c878ef Update mMatrix.h
setColumn
setRow
isIdentity

only a few functions left
2024-07-27 23:06:59 +01:00
marauder2k7
dd25f1c58a backup
initial implemenation of templated classes :
Matrix class first.
2024-07-27 15:29:54 +01:00
AzaezelX
ce36e2cac6 typofix 2024-04-10 16:27:30 -05:00
AzaezelX
65fe0be037 use consistent clipping 2024-04-10 15:17:24 -05:00
AzaezelX
f7ed077d82 round utility functions
add mRoundF to return nearest floating value to stepsize
2024-04-10 14:17:19 -05:00
marauder2k7
815832152d changes on macosx
mac picked up a couple of left over issues.
2024-03-18 19:58:47 +00:00
marauder2k7
2b295fb7f0 rest of virtuals removed
virtuals removed and replaced with override where necessary on the rest of the code base, clang-tidy to the rescue.
2024-03-18 18:40:22 +00:00
marauder2k7
efbe5e90f5 virtuals removed
virtuals removed and replaced with override where necessary, clang-tidy to the rescue.
2024-03-18 18:13:00 +00:00
Areloch
da06fc1d96 * Fixes description for a few Scene methods
* Adds method to Scene to delete dynamic objects in the scene
* Add getNodeTransform to ShapeBase
* Add sanity check to AFX ea_update function to avoid divide by zero
* Adds ability to set color mul on GuiBitmapBorderCtrl like bitmapCtrl
* MatrixF utilty functions/operators
* Add ability to ignore an object in the containerBoxEmpty method call
* Adds some better initialization/sanity handling for resetWorldBox and resetRenderWorldBox for SceneObject
2024-02-03 23:42:26 -06:00
marauder2k7
2ef93acac6 define TORQUE_TESTS_ENABLED 2023-07-24 13:47:22 +01:00
marauder2k7
5527207805 AngAxis toEuler
Add Euler set and to functions to AngAxis.
Removes the need to use a matrix
2023-06-13 15:11:28 +01:00
marauder2k7
cbe2bd4c7b Conversions
Commit from Azaezel to fix the naming of inspector fields.
TypeMatrixField still messes around on first responder, we know these functions convert angAxis to eul properly and from eul to angAxis but when the data comes to TypeMatrix it changes.... weird issue is weird.
2023-06-11 21:59:03 +01:00
Brian Roberts
cc3c2c53ae
Merge pull request #1023 from Azaezel/alpha41/mInvLerp
inverse lerp function
2023-05-22 12:08:17 -05:00
AzaezelX
c5afb407db inverse lerp function 2023-05-21 12:10:33 -05:00
AzaezelX
a03586a5fe account for null dumpmatix captions 2023-05-18 10:19:30 -05:00
Brian Roberts
a6f03897ed
Merge pull request #1016 from Azaezel/alpha41/mangledMath
clean up math varsize complaints
2023-05-08 21:28:49 -05:00
AzaezelX
e386a360ca more arithmetic overflow warns
(cherry picked from commit 3974775b9c6bc49fba7295dcdd35e8f2cc06a0c9)
2023-05-01 10:43:11 -05:00
AzaezelX
0ce2da3a23 clean up math varsize complaints 2023-04-27 16:10:04 -05:00
AzaezelX
aa02e48c8d add safeties for enum math across define boundaries 2023-04-26 22:27:35 -05:00
AtomicWalrus
75625dc679 Reverse depth & 32F buffer format
-Adds reversed depth projection model, dramatically increasing depth buffer effective resolution.
-Adds 32F depth 8U stencil format GFXFormatD32FS8X24 (following DX naming conventions). Note this is a 64-bit format, and likely not suitable for mobile platforms. Revert to GFXFormatD24S8 in renderManager.tscript for mobile & "ancient" platforms.
-Corrects alignment of texture type details array.
2023-04-14 20:13:28 -06:00
AzaezelX
ace18d0246 layout consistency pass pt 2 -place shapebase inheriting initpersistfields up top so the child layout appends to the parent 2023-01-24 19:30:09 -06:00
Robert MacGregor
c687c0d23a * BugFix: Remove unused 3DNow! extensions and broken SSE extensions. 2022-05-24 20:39:34 -04:00
AzaezelX
b795776b23 requested feature: large number display
origional author: Peter Simard
2022-04-17 13:03:44 -05:00
AzaezelX
540e82b95c template mixins need this-> specified 2022-02-14 19:50:37 -06:00
JeffR
a0f8b29da7 Improves logical checks for the default value so it's more sane and stable
Allows creation of polyhedrons via constructor with a origin and vector format, allowing to have default polyhedron values on triggers and physical zones
2022-02-14 01:07:39 -06:00
Robert MacGregor
1b6b803a20 * BugFix: Clear a lot of warnings and correct a few actual programming errors along the way. 2021-10-04 20:04:21 -04:00
Areloch
c5d5a91356 Add handling to RotationF's addRotation function to ensure formatted return 2021-09-28 18:17:49 -05:00