Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wpimath] Add geometry classes for Rectangle2d and Ellipse2d #6555

Merged
merged 35 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2c406e6
Java Rectangle2d classes
Braykoff Apr 10, 2024
065acce
Java Rectangle2d cleanup, unit tests, and headers
Braykoff Apr 11, 2024
ce0f9d9
Fixed unit test error
Braykoff Apr 11, 2024
157b6ae
Rectangle2d grammar fixes + initial Ellipse2d math
Braykoff Apr 11, 2024
c7a5190
Removed getDistance() from ellipse
Braykoff Apr 13, 2024
2f64e1e
Rectangle2d reformats
Braykoff Apr 13, 2024
42603c4
Reformats and serialization
Braykoff Apr 13, 2024
e932a9c
Unit tests and file header
Braykoff Apr 13, 2024
339cc04
Added missing file header
Braykoff Apr 13, 2024
6d87027
Fixed testing error
Braykoff Apr 14, 2024
767a11c
cpp header file created, java spotlessapply ran
Braykoff Apr 14, 2024
097d3e5
Removed c++ header file
Braykoff Apr 28, 2024
fd1b7f6
Fixed failing git tests (formatting).
Braykoff Apr 28, 2024
2bc4c31
Shortened names, added tolerances.
Braykoff Apr 29, 2024
9fef7cc
Merge branch 'main' into more-2d-geometry
calcmogul May 25, 2024
afd24b2
Address review comments
calcmogul May 25, 2024
51396d1
Merge branch 'main' into more-2d-geometry
calcmogul May 27, 2024
ad53348
Rename getDistance() and refactor its internals
calcmogul May 28, 2024
3fe376e
Merge branch 'main' into more-2d-geometry
calcmogul Jun 1, 2024
5cf49fb
Write C++ version
calcmogul Jun 1, 2024
57861b2
Add Java tests for ellipse distance and nearest-point
calcmogul Jun 2, 2024
6236983
Use wpi::array instead of std::array
calcmogul Jun 2, 2024
67a1784
Fix Rectangle2d::Intersects()
calcmogul Jun 2, 2024
2dfbfc6
Fix Rectangle2d::FindNearestPoint()
calcmogul Jun 2, 2024
645a69e
Fix Ellipse2d.findNearestPoint()
calcmogul Jun 2, 2024
10462d9
Build Ellipse2d JNI in CMake
calcmogul Jun 2, 2024
9e91619
Refactor tests
calcmogul Jun 2, 2024
6d18ef0
Fix gcem min/max
calcmogul Jun 2, 2024
255ff67
Export Ellipse2d and Rectangle2d
calcmogul Jun 2, 2024
8968891
Fix comment alignment
calcmogul Jun 2, 2024
623601e
Implement Rectangle2d and Ellipse2d serialization
calcmogul Jun 2, 2024
75a5c96
Merge branch 'main' into more-2d-geometry
calcmogul Jun 3, 2024
7218c35
Merge branch 'main' into more-2d-geometry
calcmogul Jun 3, 2024
ed8cae8
Use numeric literal instead of sizeof
calcmogul Jun 3, 2024
2371c1e
Remove ForEachStructSchema lines
calcmogul Jun 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1454,14 +1454,14 @@ index af23ea21d247327fa224370544e5f4410eac214b..4c95110d627568577440e5e662e72fde
+
#endif
diff --git a/include/gcem_incl/max.hpp b/include/gcem_incl/max.hpp
index ddc3e4e6caff1a781e662a3ded8909cb703729ab..9f3901b4b19eb35331cd22be16c5b3a1ab5f65d6 100644
index ddc3e4e6caff1a781e662a3ded8909cb703729ab..258031508ec490b49c71dbf60f3c5669f4c7c380 100644
--- a/include/gcem_incl/max.hpp
+++ b/include/gcem_incl/max.hpp
@@ -21,6 +21,12 @@
#ifndef _gcem_max_HPP
#define _gcem_max_HPP

+#include <cmath>
+#include <algorithm>
+#include <type_traits>
+
+namespace gcem
Expand All @@ -1485,14 +1485,14 @@ index ddc3e4e6caff1a781e662a3ded8909cb703729ab..9f3901b4b19eb35331cd22be16c5b3a1

#endif
diff --git a/include/gcem_incl/min.hpp b/include/gcem_incl/min.hpp
index 5ce70b38e6d243267a053ec33fae31e59f6a359f..a35bcf6e2cb65f8712b873d3ef2827aca2d4d0f0 100644
index 5ce70b38e6d243267a053ec33fae31e59f6a359f..af1be618776413f8de8bcce5d56fc838ee5c968a 100644
--- a/include/gcem_incl/min.hpp
+++ b/include/gcem_incl/min.hpp
@@ -21,6 +21,12 @@
#ifndef _gcem_min_HPP
#define _gcem_min_HPP

+#include <cmath>
+#include <algorithm>
+#include <type_traits>
+
+namespace gcem
Expand Down
1 change: 1 addition & 0 deletions wpimath/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ file(
src/main/native/cpp/jni/WPIMathJNI_ArmFeedforward.cpp
src/main/native/cpp/jni/WPIMathJNI_DARE.cpp
src/main/native/cpp/jni/WPIMathJNI_Eigen.cpp
src/main/native/cpp/jni/WPIMathJNI_Ellipse2d.cpp
src/main/native/cpp/jni/WPIMathJNI_Exceptions.cpp
src/main/native/cpp/jni/WPIMathJNI_Pose3d.cpp
src/main/native/cpp/jni/WPIMathJNI_StateSpaceUtil.cpp
Expand Down
Loading
Loading