Hello;
In the wiki the Shape:getBoundingBox( ) description is "x1, y1, x2, y2, x3, y3, x4, y4 = Shape:getBoundingBox( )
Vertexes are returned starting in the top-left in a counterclockwise fashion (top-left, bottom-left, bottom-right, top-right)"
--http://love2d.org/wiki/Shape:getBoundingBox
I found in the "Tutorial:Physics" use this function.--http://love2d.org/wiki/Tutorial:Physics
Actually the "Vertexes are returned starting in the bottom-left in a clockwise fashion(bottom-left,top-left,top-right,bottom-right)
Is this a mistake for the wiki?
Thks
a problem about Shape:getBoundingBox( ) in WIKI
-
- Prole
- Posts: 47
- Joined: Thu Sep 24, 2009 1:49 pm
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: a problem about Shape:getBoundingBox( ) in WIKI
I think the docs are right.
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: a problem about Shape:getBoundingBox( ) in WIKI
I suspect the this is another of those issues that come from the way LÖVE interprets the "y" coordinate when drawing - opposite as the "natural" (call it whatever you want) way to interpret it.
I'm not saying that LÖVE's way should be corrected, mind you; I'm just saying that its peculiarities must be taken into account. I had this same problem myself.
When I first read "Top" I assumed it meant "higher on the screen". I then learnt that it meant "the maximum <<y>> value", which is the opposite when drawing. This leads to a lot of interesting surprises; clockwise gets transformed in counter-clockwise.
The same goes for "Bottom"; they are kind of misleading words on this context.
I propose changing the documentation so all the "Top" and "Bottom" read "Maximum y" and "Minimum y" instead.
I'm not saying that LÖVE's way should be corrected, mind you; I'm just saying that its peculiarities must be taken into account. I had this same problem myself.
When I first read "Top" I assumed it meant "higher on the screen". I then learnt that it meant "the maximum <<y>> value", which is the opposite when drawing. This leads to a lot of interesting surprises; clockwise gets transformed in counter-clockwise.
The same goes for "Bottom"; they are kind of misleading words on this context.
I propose changing the documentation so all the "Top" and "Bottom" read "Maximum y" and "Minimum y" instead.
Last edited by kikito on Thu Jul 01, 2010 2:16 pm, edited 1 time in total.
When I write def I mean function.
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: a problem about Shape:getBoundingBox( ) in WIKI
That explains a lot.. now that I think of it that might be the problem.
-
- Prole
- Posts: 47
- Joined: Thu Sep 24, 2009 1:49 pm
Re: a problem about Shape:getBoundingBox( ) in WIKI
Yes,I understand it。
It is different understanding about the "bottom" and "top". If OK,I will add this picture into wiki for this function,remind others not muddle
It is different understanding about the "bottom" and "top". If OK,I will add this picture into wiki for this function,remind others not muddle
Re: a problem about Shape:getBoundingBox( ) in WIKI
Vertexes are returned starting in the top-left in a counterclockwise fashion (top-left, bottom-left, bottom-right, top-right).
That isn't right. When will it be changed?
That isn't right. When will it be changed?
- TechnoCat
- Inner party member
- Posts: 1612
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: a problem about Shape:getBoundingBox( ) in WIKI
You tell me http://love2d.org/w/index.php?title=Sha ... ction=editMaggots wrote:Vertexes are returned starting in the top-left in a counterclockwise fashion (top-left, bottom-left, bottom-right, top-right).
That isn't right. When will it be changed?
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: a problem about Shape:getBoundingBox( ) in WIKI
I fixed it, you lazy farts!
Help us help you: attach a .love.
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest