|
![](/i/fill.gif) |
On 8/5/2013 4:38 AM, scott wrote:
> There are much easier, well documented, ways for doing bounding box
> tests, you don't need to go into splitting it up to squares and
> triangles and measuring areas as you seem to have done. If that's what
> you want to do?
>
Yeah, basically. What I searched google for was, basically, "Find if
point is in a box". And, well, adding "in 3D" didn't seem to help much.
lol I completely forgot to search on "bounding box". :p
My actual theory here though, if its more understandable, was like.. If
you had an aquarium, which you could look into, from any two sides, and
a 90 degree angle from each other, but you couldn't get around to any of
the other sides, and you needed to "prove" mathematically, that an
object in it was "actually" in the aquarium, and not outside.
So, logically, you take two sides, that are at 90 degrees from each
other, than mathematically test of you can "see" the object from those
two sides, "inside" of the rectangle each side represented.
In principle, this should work. What I screwed up with was that I need
two sets of calculations. One set is other original, from here (if your
mouse is in the box, the box turns red):
http://www.emanueleferonato.com/2012/03/09/algorithm-to-determine-if-a-point-is-inside-a-square-with-mathematics-no-hit-test-involved/
Then, completely screwed up, by trying to reuse the same exact
equations, for both sides (or, rather, the same "components" of the
vectors).
Post a reply to this message
|
![](/i/fill.gif) |