I am looking to retrieve the highest Y-axis value of a 3D triangle that is in an axis aligned bounding box. This should not necessarily return one of the 3 vertices of the triangle but return the highest point that the AABB would be colliding with. If you need more information just ask, but I am looking for some kind of example preferably using Java.
Asked
Active
Viewed 228 times
0
-
I'm not sure but, isn't it the max of all Y-coordinate of all 3 points? – Matthieu Oct 06 '13 at 11:34
-
I'm not looking for the highest point of the triangle, I am looking for the highest point where the AABB would collide with the triangle if it were sort of lowered onto it. And if it wasn't colliding with any of the corners it would return a value that isn't one of the 3 vertices. – Reiss Gomez Oct 06 '13 at 11:39
2 Answers
0
Step 1: find the centroid of a base triangle(use the actual method to finding it) Step 2: Once you find the centroid, already you have the hypotenuse(Y), use the Pythagorean theorem method to find the height(expected answer). hope you get the answer..

Vinith
- 1,264
- 14
- 25
0
you want an intersection query between a plane (lower of the bounding box) and your triangle. it depends on the library you're using, but I'm quite sure you'll find it if you look for intersection query in the documentation of said AABB library (as AABB are generally used for collision and distance queries).

luneart
- 182
- 1
- 8