Ryan Pavlik
cd79bef0cf
cmake: Fix build flags on MSVC
2023-05-16 22:04:53 +00:00
Ryan Pavlik
4ffb271c6a
cmake: Build all math-heavy code with optimization.
2023-05-14 08:28:37 +00:00
Moshi Turner
54bd4b844f
a/math: Fix m_filter_f32_run -> m_filter_euro_f32_run
...
This is currently used in the delay filter in the Mercury SteamVR driver
2023-03-03 15:13:23 -06:00
Jakob Bornecrantz
84ccf3a78e
a/math: Tidy m_filter_one_euro.[h|c]
2023-03-01 19:34:50 +00:00
Ryan Pavlik
534d2e9f66
a/math: Improve comments for one euro filter
2023-03-01 19:33:48 +00:00
Ryan Pavlik
8f02541c27
a/math: Add a zeroing in the generic init for one euro
2023-03-01 19:31:59 +00:00
Ryan Pavlik
2d056e6606
a/math: Add comment for searching in the lever arm math.
2023-03-01 17:08:39 +00:00
Ryan Pavlik
f6ab734b2e
a/math: Add floating point conversion methods to Rational
2023-03-01 10:53:18 -06:00
Jakob Bornecrantz
78f069a10d
a/math: Make argument const
2023-02-28 21:27:19 +00:00
Daniel Willmott
e383609cbc
aux/math: Add math_quat_from_euler_angles()
2023-02-05 20:19:52 +00:00
Jakob Bornecrantz
0938a1a02b
xrt: Fix missing function declaration without a prototype warnings
...
Found by clang-15.
src/xrt/auxiliary/math/m_permutation.c:133:15: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
m_do_the_thing()
^
void
2023-02-02 13:03:08 +00:00
Moses
10cdde859a
a/math, comp/main, comp/render: Change math_matrix_2x2_* to m_mat2x2_*
2023-01-27 12:37:22 -06:00
Moses Turner
7d8d1ad8e7
a/math: Add m_matrix_2x2_invert
2023-01-27 12:37:22 -06:00
Moses Turner
da16e64982
a/math: Move m_matrix_2x2 functions into their own header
2023-01-27 12:37:22 -06:00
Jakob Bornecrantz
da5323642d
m/space: Correct comments
2023-01-24 16:11:56 +00:00
Jakob Bornecrantz
c7fdaacd02
m/space: Make sure to use valid poses in linear and angular calculations
2023-01-24 16:11:56 +00:00
Jakob Bornecrantz
f7118d7a93
m/space: Refactor pose part first
2023-01-24 16:11:56 +00:00
Jakob Bornecrantz
02aad19c78
m/space: Make pose validity upgrading clearer
2023-01-24 16:11:56 +00:00
Jakob Bornecrantz
2c1d413bf0
m/space: Add missing extern "C"
2023-01-24 16:11:56 +00:00
Jakob Bornecrantz
1c046dc523
m/space: Move functions to correct section
2023-01-24 16:11:56 +00:00
Malek
5c013bcecd
a/math: Add stdbool include to m_lowpass_integer.h
2022-12-12 00:45:05 -08:00
Mateo de Mayo
dad7957fb2
a/math: Add clock_offset.h
...
For now it only has our simple exponential smoothing clock offset estimator.
But more advanced ones can go here too.
2022-12-02 16:10:09 +00:00
Moses Turner
85c0c78ac6
a/math: Fix m_vec3_angle function
...
Dot product is equivalent to a.length*b.length*cos(theta), not a.length_squared*b.length_squared*cos(theta)
2022-11-29 03:11:53 -06:00
Moses Turner
f5d4d49607
a/math: Add math_quat_to_swing_twist
2022-11-23 13:02:35 -06:00
Moses Turner
b3c277196e
a/math: Add faster (and correct!) math_quat_from_swing_twist
2022-11-23 13:02:35 -06:00
Moses Turner
e06dc0dda1
a/math: Correct documentation for math_quat_ln and math_quat_exp
2022-11-23 13:02:35 -06:00
Moses Turner
d2e2c3a988
cmake: Run cmake-format.sh
2022-09-19 21:57:37 +01:00
Christoph Haag
3c9ef82060
a/math: Add math_matrix_4x4_transform_vec3
2022-08-25 12:41:07 +01:00
Moses Turner
386117c5ee
NFC: a/math: Make math_quat_from_swing prettier
2022-08-13 19:31:58 +00:00
Jan Schmidt
ce13de9484
aux/math: Add math_matrix_3x3_from_quat()
...
Add a function to get a 3x3 rotation matrix
from a quaternion.
2022-08-10 18:30:08 +01:00
Aidan Thornton
4840def448
a/math: add math_matrix_2x2_transform_vec2
2022-08-10 12:39:44 +00:00
Ryan Pavlik
831c2aefaf
a/math: Fix doc warning
2022-08-08 16:44:24 +00:00
danwillm
9dc8632b0f
aux/util: Add u_hand_simulation
...
Co-authored-by: Moses Turner <moses@collabora.com>
2022-08-01 17:33:40 +00:00
Ryan Pavlik
88389ae0ca
a/math: Resolve warnings.
2022-07-14 14:17:35 +00:00
Moses Turner
543a436c99
m/relation_history: Add motion estimation
2022-06-18 21:50:14 +01:00
Mateo de Mayo
326402da2a
a/math: Use angle as magnitude of change in m_filter_euro_quat
...
Previously this was using math_quat_len which was always 1 for
these unit quaternions. This commit assumes math_quat_ln works properly which is
not exactly true at the moment and the returned angle will be twice as large.
2022-06-18 14:19:01 -03:00
Mateo de Mayo
d773ab4cf2
a/math: Add pose interpolate function and others
...
- math_matrix_4x4_isometry_from_pose
- math_pose_from_isometry
- math_pose_interpolate
- m_vec3_equal
2022-06-18 14:19:01 -03:00
Mateo de Mayo
e7c3376612
a/math: Add disabled test to show problem with current quat_exp implementation
2022-06-02 15:47:57 +00:00
Campbell Suter
0f8da1900b
a/math: Fix math_pose_invert breaking on rotated poses, and add a test
...
Previously, math_pose_invert would apply a multiplication in the wrong
order. This lead to the position of the 'original' pose being rotated.
This patch fixes that, and adds a unit test to check this case.
2022-06-01 16:44:03 +01:00
Mateo de Mayo
29aefe2ba8
misc: Use pretty printers and remove stale matrix print functions
...
Use u_pp_matrix_* instead.
2022-05-26 18:35:39 +00:00
Mateo de Mayo
05b8e320a5
a/math: Add multiple isometry-related matrix functions
...
An isometry is a rigid body transform. In this context I'm using the term to
refer to 4x4 homogeneous matrices in SE(3). I.e., matrices comprised of a
3x3 rotation, a 3x1 translation, and a [0,0,0,1] last row.
This matrix represent both rigid body transforms.
2022-05-26 18:35:39 +00:00
Mateo de Mayo
8b2fa955b9
a/math: Fix matrix identities and use isometry
...
Isometry3f is a 4x4 matrix transform that performs only rotation and translation
(an SE(3) matrix). Its inverse can be computed trivially by Eigen compared to a
regular 4x4 transform.
2022-05-26 18:35:39 +00:00
Mateo de Mayo
2212cf95cf
a/math: Add missing extern C
2022-05-26 18:35:39 +00:00
Jakob Bornecrantz
a4983fa5b1
auxiliary: Break apart CMakeLists.txt file
2022-05-23 09:12:54 -05:00
Mateo de Mayo
63b477d250
a/math: Add MIN, MAX and CLAMP macros
2022-05-19 14:03:17 +00:00
Arkadiusz Drohomirecki
d444412221
a/math: Add a clear() method to RelationHistory/m_relation_history
2022-05-18 14:45:12 +00:00
Ryan Pavlik
2a54dcdb19
a/math: Improve word choice/clarity
2022-05-17 17:39:52 -05:00
Jakob Bornecrantz
4ba23faa6b
auxiliary: Deal with clang-format-14 fallout (NFC)
2022-05-04 15:58:01 +01:00
Ryan Pavlik
d8970f25f9
a/math: Fix conversion warnings
2022-05-03 22:44:28 +01:00
Jakob Bornecrantz
1afc18108e
m/3dof: Fix conversion warning
2022-05-02 17:16:04 +01:00