![]() |
| [[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]] |
|
|
#1 |
|
New Member
Join Date: Jun 2006
Location: Canada
Posts: 2
|
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 |
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Sep 2005
Location: Jönköping, Sweden
Posts: 646
|
Rotate all corners around the center, by the inversed orientation. Then just find min/max values for the axis you are interested in.
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Jun 2006
Location: Canada
Posts: 2
|
Wow! Simple. Thanks.
|
|
|
|
|
|
#4 |
|
Valued Member
Join Date: Apr 2006
Posts: 210
|
I think you can caclulate the half-widths without rotating the obb twice. Something about distance between two points ...
![]() |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|