日期:2014-05-18 浏览次数:20937 次
public Line3D CrossPlane(Plane3D p) //求平面与平面的交线 { Line3D CrossLine = new Line3D(); float tempA = (p.d - d) - (norm.x - p.norm.x); float tempB = (p.d - d) - (norm.y - p.norm.y); float tempC = norm.z - p.norm.z; if (tempC != 0) { CrossLine.ptBegin.x = 1; CrossLine.ptBegin.y = 0; CrossLine.ptBegin.z = tempA /tempC; CrossLine.ptEnd.x = 0; CrossLine.ptEnd.y = 1; CrossLine.ptEnd.z = tempB / tempC; return CrossLine; } else { return null; } }