-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix C# operator *(Transform3D, Aabb)
#97208
Fix C# operator *(Transform3D, Aabb)
#97208
Conversation
_FORCE_INLINE_ const Vector3 &operator[](int p_axis) const { | ||
return rows[p_axis]; | ||
_FORCE_INLINE_ const Vector3 &operator[](int p_row) const { | ||
return rows[p_row]; | ||
} | ||
_FORCE_INLINE_ Vector3 &operator[](int p_axis) { | ||
return rows[p_axis]; | ||
_FORCE_INLINE_ Vector3 &operator[](int p_row) { | ||
return rows[p_row]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p_axis
is confusing in there, AFAICT everywhere else in there axis refers to column.
operator *(Transform3D, AABB)
operator *(Transform3D, Aabb)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct. The confusing thing is that (as the PR description states) in Godot's C++ code, the []
operator uses rows, while in GDScript and C#, the []
operator uses columns. The rename of p_axis
to p_row
helps too.
Thanks! |
…e Node3D - Fixed by godotengine/godot#97208 - Cleanup all unused files - Only our Node3D can be selected chore(project): Update to godot 4.4-dev.7
The current C# implemention of
static Aabb operator *(Transform3D transform, Aabb aabb)
(added in #64729) is pretty-much a copy-paste of the core/C++ implementation ofAABB Transform3D::xform(const AABB &p_aabb)
. The issue is that such implemenation usesBasis[int]
operator and:This discrepancy was not taken into account, hence incorrect calculations. This PR fixes that.
Fixes #97197.