Public Group

# Disc - Axis Aligned Bounding Box

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

## 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 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 on other sites
Quote:
 Original post by jykBut 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 jykIf 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 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).

1. 1
2. 2
Rutin
22
3. 3
4. 4
JoeJ
16
5. 5

• 14
• 29
• 9
• 11
• 11
• ### Forum Statistics

• Total Topics
631775
• Total Posts
3002278
×

## Important Information

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!