Drawing3d documented Class Library

Plane.Cross(LineType, Double, xyz) Method

Calculate the cross point with a line.

[Visual Basic]
Public Overloads Sub Cross( _
   ByVal aLine As LineType, _
   ByRef Lam As Double, _
   ByRef pt As xyz _
public bool Cross(
   LineType aLine,
   out double Lam,
   out xyz pt


A line which intersects the plane
Is a parameter, which determines the crosspoint
Is the cross point

Return Value

returns true, if there is a crosspoint.


//the following snippet shows the meaning of lam
Plane p = new Plane( new xyz(0, 0, 0), new xyz(1, 5, 5));
LineType l = new LineType( new xyz (3,-1,3), new xyz(2, 1, 5));
if (p.Cross(l, out Lam, out pt))
    // you can also get p through the following
    pt = l.P + l.Direction*lam;

See Also

Plane Class | Drawing3d.Math Namespace | Plane.Cross Overload List