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 _
)
[C#]
public bool Cross(
   LineType aLine,
   out double Lam,
   out xyz pt
);

Parameters

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

Return Value

returns true, if there is a crosspoint.

Example

//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