[Plib-users] Problems using sgIsectPlanePlane(), point is always at 0, 0, 0
Brought to you by:
sjbaker
From: Satz K. <sat...@go...> - 2011-09-20 07:16:06
|
Hi, I want to find the intersection line out of two planes but fail miserably. That's what I'm doing: - I start with two triangles a1,b1,c1 and a2,b2,c2 that describe my planes and consist of three coordinates x,y and z for every corner of it - out of their corner coordinates x,y and z I calculate 3D vectors sgVec3 va1,vb1,vc1 by substracting the coordinate values b1-a1, c1-b1, a1-c1 and normalizing the result; the same is done for the second triangle's coordinates - then I call sgMakePlane (plane1,va1,vb1,vc1); sgMakePlane (plane2,va2,vb2,vc2); ret=sgIsectPlanePlane (point,dir,plane1,plane2 ); But here the result is unusable and nearly every time the same. "point" always contains _very_ small values so that after rounding to 6 decimal places the coordinates of it are 0,0,0. What am I doing wrong here? Elmi |