Sign in to follow this  

Disc - Axis Aligned Bounding Box

This topic is 2639 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey there,

this is my first post, so please forgive if I make any mistake here.

I've got a problem, calculating the AABB of a Disc.

The Disc is described by a point p, a normal vector n, and a radius r.
From that I could calculate two orthogonal vectors, that span the plane in which the disk lies.
I used a simple method where I took two values from the coordinates of the vector (of which at least one value is not zero), swapped them, negated one and the third coordinate is set to zero.
For example <1,2,3> -> <2,-1,0>
The second vector is generated by the cross product of the normal and the vector created above.

I'm not sure if this vector generation makes sense, or if it's necessary. Can Someone please help me?

Thanks a lot!

Cheers,
--Markus

[Edited by - BaiLong on September 27, 2010 5:28:11 AM]

Share this post


Link to post
Share on other sites
If I'm following you, then yes, that's a valid way to build the basis.

But were you asking about computing an axis-aligned bounding box for the disc? If so, you should be able to use the support function for a cylinder for this (the support function for a disc will be similar, but with the half-height disregarded). You can find the support function in the book 'Collision Detection in Interactive 3-D Environments', among other places.

Once you have the support function, you can simply project the disc onto the three cardinal axes to yield the bounds of the AABB.

Share this post


Link to post
Share on other sites
Quote:
Original post by jyk
But were you asking about computing an axis-aligned bounding box for the disc?

Sorry, the question is: How do I calculate the Axis Aligned Bounding Box for a disc?

Quote:
Original post by jyk
If so, you should be able to use the support function for a cylinder for this (the support function for a disc will be similar, but with the half-height disregarded). You can find the support function in the book 'Collision Detection in Interactive 3-D Environments', among other places.

Once you have the support function, you can simply project the disc onto the three cardinal axes to yield the bounds of the AABB.


What is the support function for a cylinder you are talking about? I don't have this book.
How does it work?

Is it the easiest/fastest way? To do it by projecting a cylinder?

The more detailed the better, cause I'm not that familiar with the projecting stuff, sorry. ^^

Share this post


Link to post
Share on other sites
Quote:
Is it the easiest/fastest way? To do it by projecting a cylinder?
It's the easiest and fastest way I can think of at the moment. (Note that I just mentioned 'cylinder' because it's a somewhat more common shape than a disc, so there's more info available on it. For this operation though, you'd just treat the disc as a cylinder with a height of zero, which will simplify the support function somewhat.)
Quote:
The more detailed the better, cause I'm not that familiar with the projecting stuff, sorry. ^^
I don't have a reference in front of me right now, but you might have some luck by searching for (e.g.) 'cylinder support function' or 'cylinder support point'. You might also see if you can get ahold of the code for the SOLID collision detection library, as it might include code for the cylinder support function (not sure though).

Share this post


Link to post
Share on other sites

This topic is 2639 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this