Boundries
Say I had four points like so:
*-----------------* |//////////////////| |\\\\\\\\\\\\\\\\\\| |//////////////////| |\\\\\\\\\\\\\\\\\\| *-----------------* How could I tell if something was inside of those four points (the slashes)? I know I could prolly look @ xero's OOB plugin, but I'm too lazy for that. PS: You can compliment on my beloved artwork later.. ;) |
Theoretically:
If you have a 2D box and a 2D point, you can test if the point is inside the box like by comparing the X,Y coordinates: The Box: Code:
// (bx,by)(Box X, Y == bx, by) (Box Width == bw) (Box Height == bh) Just imagine those are your variables, you could do: Code:
The same theory applies to 3D Boxes/Points, just add the extra coordinate checks for Z! This is basically what I've done in OOB.. |
Ah.. I knew you'd be the one to reply! :)
Hmm... I'll have to figure this out.. It's still kinda confusing for me. |
| All times are GMT -4. The time now is 16:49. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.