Author Topic: Intersection of 3 Planes in world space  (Read 493 times)

Offline jiarongkoh

  • byte
  • *
  • Posts: 18
    • View Profile
Intersection of 3 Planes in world space
« on: January 04, 2015, 03:28:38 pm »
Hi there, any idea how can I obtain the intersection of 3 planes in world space assuming these 3 planes intersect at a single point.

Mathematically its pretty straight forward if I have the equations of these 3 planes, but I think its rather difficult to obtain that information if my planes are placed inside using Primitives.getPlane. Alternatively I can compute using normal vectors (cross product) but still I do require 'some points' on the planes to do it purely mathematically. Anyone knows of a more direct approach to it?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Intersection of 3 Planes in world space
« Reply #1 on: January 04, 2015, 04:20:42 pm »
You can obtain transformed points on the plane from the PolygonManager. That should be sufficient, shouldn't it?

Offline jiarongkoh

  • byte
  • *
  • Posts: 18
    • View Profile
Re: Intersection of 3 Planes in world space
« Reply #2 on: January 05, 2015, 05:19:54 am »
You mean getTransformedNormal() and getTransformedVertex()? Both of these methods require polyID argument, how can I obtain such ID?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: Intersection of 3 Planes in world space
« Reply #3 on: January 05, 2015, 10:12:21 am »
Just use 0. You only need some points on the plane, so the ones from the first polygon should do it.