www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: jiarongkoh on January 04, 2015, 03:28:38 pm

Title: Intersection of 3 Planes in world space
Post by: jiarongkoh 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?
Title: Re: Intersection of 3 Planes in world space
Post by: EgonOlsen 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?
Title: Re: Intersection of 3 Planes in world space
Post by: jiarongkoh 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?
Title: Re: Intersection of 3 Planes in world space
Post by: EgonOlsen 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.