Bounding Box
Bounding Box
Bounding Box
Bounding Box
Bounding Box
Bounding Box Bounding Box Bounding Box Bounding Box Bounding Box Bounding Box Bounding Box Bounding Box
Bounding Box Bounding Box
Bounding Box
Go Back  Xtreme Visual Basic Talk > > > Bounding Box


Reply
 
Thread Tools Display Modes
  #1  
Old 02-27-2013, 05:45 AM
CodeCruncher CodeCruncher is offline
Junior Contributor
 
Join Date: Jul 2006
Posts: 355
Default Bounding Box


I am still very unsure about how a bounding box works properly, but I have tried doing a bit of reading up on it. I know there are more complex shapes with more planes, but I just want to get my head around a box to start with. If anyone has a simple example that shows how it works it would be greatly appreciated.

The main thing I am trying to learn first up is how to create the bounding box, how it reduce in size until it touches an object on all sides. I eventually want to work out how to rotate it on 3D AABB axis, but for now I would be happy to work out how to get the basics working.

Edit:
I think the bounding box might be made up of these verticies, but not entirely sure. If it is I not sure how the 1 & -1 factor into it, just looking at the coordinates of the eight verticies and using cartasian coordinates, they seem to make a cube.. but what is this value of 1 all about, I thought it was meant to be an infinate value to come in from?

Code:
        ' Create the cube vertices.
        m_vertices = New Point3D() {New Point3D(-1, 1, -1), New Point3D(1, 1, -1), New Point3D(1, -1, -1), New Point3D(-1, -1, -1),
                                     New Point3D(-1, 1, 1), New Point3D(1, 1, 1), New Point3D(1, -1, 1), New Point3D(-1, -1, 1)}

Last edited by CodeCruncher; 02-27-2013 at 06:11 AM.
Reply With Quote
  #2  
Old 02-27-2013, 03:17 PM
hDC_0Bounding Box hDC_0 is offline
Contributor

* Expert *
 
Join Date: Feb 2004
Posts: 559
Default Thread cross-referencing info..

Just in case there are some forum members who don't religiously read each and every post of each and every thread (as I do)...

This thread is an offshoot of the discusssion in posts #54 and #55 of the Intersecting Lines thread.

I guess at some future point we'll be seeing some attempt at a bounding box
in the next version of the Baffle Step Calculator (version 6, maybe?).

Last edited by hDC_0; 02-27-2013 at 03:29 PM.
Reply With Quote
  #3  
Old 02-27-2013, 03:54 PM
CodeCruncher CodeCruncher is offline
Junior Contributor
 
Join Date: Jul 2006
Posts: 355
Default

I would really like to if I can get my head around it. I can visualise what it is meant to look like and I have seen this image illustrating it http://upload.wikimedia.org/wikipedi...oundingBox.jpg
But one of the things I am trying to get my head around is the concept of starting at infinity and working my way in. How do you set something to infinity?

I am fairly confident the m_vertices = New Point3D() {New Point3D(-1, 1, -1)… are Cartesian coordinate markers. -1 on the X axis, + 1 on the Y axis, and -1 on the Z axis. I highly suspect that the 1 and -1 does not represent a value from 0,0, but instead are being used to stipulate a specific quadrant.

Then how do I place and object inside those un-sized coordinates? If we were talking about a straight line that went from 0 to 100 and you ask me to place a rectangle that was 20 long starting at 40 that would be easy. But to place an object inside a box without knowing how big the box is leaves me perplexed.

I know the box is meant to be wrapped around the object and perhaps I am somehow supposed to centre the object but if I knew the size of the object to find the centre why would I ever need to create the box? So if someone has a simple example that I can step through and see how each of these plays a role I might have a better chance of getter my head around how it works.

Edit:
Hmmm if the bounding box started at infinity in all direction I guess it really wouldn’t matter where inside the object is placed, because once the bounding box is wrapped around the object it can be adjusted by X,Y and Z offset to get it centred.

Last edited by CodeCruncher; 02-27-2013 at 04:06 PM.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Bounding Box
Bounding Box
Bounding Box Bounding Box
Bounding Box
Bounding Box
Bounding Box Bounding Box Bounding Box Bounding Box Bounding Box Bounding Box Bounding Box
Bounding Box
Bounding Box
 
Bounding Box
Bounding Box
 
-->