This has been on my mind since @reduz renamed AABB to Rect3, and I'd like to discuss this before beta, while we can still make such a change.
This change was made along Matrix3 -> Basis change (which made sense because Matrix3 was not a general matrix but a rotation-scale matrix). but AABB -> Rect3 change did the opposite thing: AABB is a special kind of Rect3, the name should have been kept (since axis-aligned bounding box is a very specific case of a 3D generalization of rectangle.
So I'd like to rename Rect3 back to AABB.
Also, AABB is the term used in literature and other game engines.
I don't mind either way
On Nov 16, 2017 5:42 PM, "Ferenc Arn" notifications@github.com wrote:
Also, AABB is the term used in literature and other game engines.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/godotengine/godot/issues/12973#issuecomment-345056229,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AF-Z29ZbIv6ecNoLeCH9Pvqa5YY2aAoPks5s3J5KgaJpZM4QhGze
.
Great! I'll submit the PR before the deadline.
Just a note to myself, I'll need to update the c# files in mono module as well
also needs some work in gdnative module
I don't really mind either.
But if we do this change we loose the explicit "3-dimensional" property of the class, as AABB also exist in 2D. That being said, Basis also removed it, so i guess it's ok.
I'm fine with the change too, but make sure to be thorough (including renaming files when relevant), I remember having had to fix many s/AABB/Rect3/ after reduz's initial renaming.
I'll do a first pass using qtdevelop's refactor tool (never used qtdevelop before so we'll see how it goes), and do a second pass with grep and manual replace which should catch the remaining stuff.
A tip for QtCreator's refactoring tool: make sure to add as many #defines as possible in your Godot.config, otherwise the refactoring tool ignores all the code within #ifdefs... Maybe there's a way to override this behaviour though, it's a bit silly.
I've finished Rect3 -> AABB change.
Now I see the reason why @reduz did that change though: Rect2 is an inconsistent name for 2D AABB. Following the convention for Transform Transform2 etc, would you mind if I rename Rect2 to AABB2? ("defaulting" to 3D in naming is OK because AABB typically refers to a 3D AABB in the literature)
Is there any difference between a 2D AABB and a rectangle?
Rect2 is the return value of things like get_rect(). So I'm not sure if renaming it to AABB2 would really make things clearer: http://docs.godotengine.org/en/stable/classes/class_sprite.html?highlight=get_rect#class-sprite-get-region-rect
Well, Rect2 is used for a lot of things that are not physic-related, like GUI for example.
IMHO, I wouldn't recommend changing it to AABB2; as AABB is a term strongly related to physics collision.
@groud AABB is used in rendering and culling too ;)
@groud AABB is used in rendering and culling too ;)
Sure, in 3D. :) But when used in 2D, it usually refers to collisions.
Rect2 is fine as is, its used for drawing and many other things. In 3D its pretty much only used as bounding box
OK, sounds good to me
Ah yeah it's used for UI rectangles so it's dual purpose, makes sense.
Haven't used non-3D stuff much so far but I do remember the Control derived objects
Most helpful comment
Well, Rect2 is used for a lot of things that are not physic-related, like GUI for example.
IMHO, I wouldn't recommend changing it to AABB2; as AABB is a term strongly related to physics collision.