Geometry Classes (Rotation2d, Translation2d, etc.) EJML question #7562
-
Has any thought been given to having these classes backed up more by the Matrix, Vector classes in Java or are there concerns that are not easily noticeable. Seems like it would be a logical fit. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Using matrix/vector types instead of native types like double internally would massively hurt performance due to the allocation overhead. Rewriting Quaternion to use doubles instead of Vector in #5525 gave a 100x performance improvement for Rotation3d.rotateBy(). Furthermore, matrix representations of Rotation2d/3d and Pose2d/3d require more FLOPs than what we use now. If you're after interoperability with affine transformation matrices, we added that in #7430. |
Beta Was this translation helpful? Give feedback.
Using matrix/vector types instead of native types like double internally would massively hurt performance due to the allocation overhead. Rewriting Quaternion to use doubles instead of Vector in #5525 gave a 100x performance improvement for Rotation3d.rotateBy().
Furthermore, matrix representations of Rotation2d/3d and Pose2d/3d require more FLOPs than what we use now.
If you're after interoperability with affine transformation matrices, we added that in #7430.