Go to: Synopsis. Return value. MEL examples.

Synopsis

float [] lineIntersection(float $p1[], float $v1[],
float $p2[], float $v2[])

Returns the intersection point of two 3D lines. Each line is described by a 3D point and direction.

Return value

None

Arguments

Variable Name Variable Type Description
$p1float[]Starting point of first line
$v1float[]Vector direction of first line
$p2float[]Starting point of second line
$v2float[]Vector direction of second line

MEL examples

	float $p1[3] = {0,1,0};
	float $v1[3] = {1,0,0};
	float $p2[3] = {0,0,0};
	float $v2[3] = {0,1,0};
	lineIntersection($p1, $v1, $p2, $v2);
	// Results: 0 1 0 //