0

I'm writing my own 3D engine (which can be found here) in Java and I'm trying to implement collision events. How can I tell if two 2D triangles intersect in 3D space? My end goal is to have a method that would take the six 3D points of the two triangles as arguments and return a boolean, true if the two triangles intersect. Something like this:

// where the Vector3 class has three fields, x, y, and z
boolean triangleIntersect(Vector3[] triangle1, Vector3[] triangle2) {
    // do stuff with triangle1[0] through [2] and triangle2[0] through [2]
}

I've seen this question already, but it only covers 2D. Any help would be greatly appreciated.

0 Answers0