Using Shape:computeAABB to get bounding box

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Yell0w
Prole
Posts: 28
Joined: Wed Nov 21, 2012 7:40 am
Location: Norway
Contact:

Using Shape:computeAABB to get bounding box

Post by Yell0w »

Hello good sirs and madams!

Im trying to figure out if a rotated box is fully inside another box using the Shape:computeAABB function to get the bounding box coordinates.
My problem is, what are the translated X and translated Y values? Can someone supply a small snippet please? I couldnot find any other forum entries regarding compute AABB (ALSO THAT FuNCTION NAME!)
You can learn anything, but you cannot learn everything!
User avatar
RedHot
Citizen
Posts: 87
Joined: Mon May 27, 2013 2:43 pm
Location: Poland

Re: Using Shape:computeAABB to get bounding box

Post by RedHot »

Yell0w wrote:Hello good sirs and madams!

Im trying to figure out if a rotated box is fully inside another box using the Shape:computeAABB function to get the bounding box coordinates.
My problem is, what are the translated X and translated Y values? Can someone supply a small snippet please? I couldnot find any other forum entries regarding compute AABB (ALSO THAT FuNCTION NAME!)
Im trying to figure out if a rotated box is fully inside another box using the Shape:computeAABB function to get the bounding box coordinates.
Rotated box is always within BBox, that's the usual idea of a bounding box.
My problem is, what are the translated X and translated Y values
What do you actualy understand by saying "X and Y" ?

Shape:computeAABB returns local shape coords. You can get the world coords using "YourBody:getWorldPoints(YourShape:computeAABB)" , http://love2d.org/wiki/Body:getWorldPoints

And the function name is perfectly fine. AABB is a term used very often in simulations.
User avatar
Yell0w
Prole
Posts: 28
Joined: Wed Nov 21, 2012 7:40 am
Location: Norway
Contact:

Re: Using Shape:computeAABB to get bounding box

Post by Yell0w »

Okay then i misunderstood the function a bit, even tho it will work just fine. What i was really trying to do was finding the four corners coordinates from a rounded rectangle.

I have never used AABB, before and im sorry i did not know it was common knowledge. (wiki: axis-aligned bounding box (AABB).)

Still i dont know what the transformed prefix is supposed to mean, is it just a normal x,y integer or is it transformed from the left back foot of a cow?

Dziękuję Red Hot
You can learn anything, but you cannot learn everything!
User avatar
RedHot
Citizen
Posts: 87
Joined: Mon May 27, 2013 2:43 pm
Location: Poland

Re: Using Shape:computeAABB to get bounding box

Post by RedHot »

This part remains ambiguous to me :
Still i dont know what the transformed prefix is supposed to mean
Can you rephrase it?

Du er velkommen Yell0w
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests