类的使用
org.meteoinfo.chart.jogl.pipe.Line
-
使用Line的程序包 程序包 说明 org.meteoinfo.chart.jogl.pipe -
-
org.meteoinfo.chart.jogl.pipe中Line的使用
返回Line的org.meteoinfo.chart.jogl.pipe中的方法 修饰符和类型 方法 说明 LinePlane. intersect(Plane rhs)find the intersection line of 2 planes // P1: N1 dot p + d1 = 0 (a1*X + b1*Y + c1*Z + d1 = 0) // P2: N2 dot p + d2 = 0 (a2*X + b2*Y + c2*Z + d2 = 0) // // L: p0 + a*V where // V is the direction vector of intersection line = (a1,b1,c1) x (a2,b2,c2) // p0 is a point, which is on the L and both P1 and P2 as well // // p0 can be found by solving a linear system of 3 planes // P1: N1 dot p + d1 = 0 (given) // P2: N2 dot p + d2 = 0 (given) // P3: V dot p = 0 (chosen where d3=0) // // Use the formula for intersecting 3 planes to find p0; // p0 = ((-d1*N2 + d2*N1) x V) / V dot V参数类型为Line的org.meteoinfo.chart.jogl.pipe中的方法 修饰符和类型 方法 说明 org.joml.Vector3fLine. intersect(Line line)find the intersection point with the other line.org.joml.Vector3fPlane. intersect(Line line)find the intersect point // substitute a point on the line to the plane equation, then solve for alpha // a point on a line: (x0 + x*t, y0 + y*t, z0 + z*t) // plane: a*X + b*Y + c*Z + d = 0 // // a*(x0 + x*t) + b*(y0 + y*t) + c*(z0 + z*t) + d = 0 // a*x0 + a*x*t + b*y0 + b*y*t + c*z0 + c*z*t + d = 0 // (a*x + b*x + c*x)*t = -(a*x0 + b*y0 + c*z0 + d) // // t = -(a*x0 + b*y0 + c*z0 + d) / (a*x + b*x + c*x)booleanLine. isIntersected(Line line)determine if it intersects with the other linebooleanPlane. isIntersected(Line line)determine if it intersects with the line
-