DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Math & Physics
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 06-02-2006, 08:53 AM   #1
vetroXL
New Member
 
Join Date: Jun 2006
Location: Canada
Posts: 2
Default Calculating Half-Width of an OBB

Hi,

I have been struggling with the following problem. I;m trying to calculate the halfwidth of my boundingbox so I can go ahead and use it for an OBB-OBB test.

I have the 8 corners of the box, the center and the oriention axis. How do I go about calculating the halfwidth of each axis? Do I need to calculate the planes of the x,y,z axis and then find the distance from the cneter?

Thanks
vetroXL is offline   Reply With Quote
Old 06-02-2006, 09:02 AM   #2
geon
Senior Member
 
geon's Avatar
 
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 570
Default Re: Calculating Half-Width of an OBB

Rotate all corners around the center, by the inversed orientation. Then just find min/max values for the axis you are interested in.
geon is offline   Reply With Quote
Old 06-02-2006, 09:15 AM   #3
vetroXL
New Member
 
Join Date: Jun 2006
Location: Canada
Posts: 2
Default Re: Calculating Half-Width of an OBB

Wow! Simple. Thanks.
vetroXL is offline   Reply With Quote
Old 06-02-2006, 02:47 PM   #4
SmokingRope
Valued Member
 
Join Date: Apr 2006
Posts: 206
Default Re: Calculating Half-Width of an OBB

I think you can caclulate the half-widths without rotating the obb twice. Something about distance between two points ...
SmokingRope is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 08:16 AM.


Powered by vBulletin
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.