Click or drag to resize

UtilsCheckThreePointsOnLinearityWithCrossproduct Method

Checks if point P is on the same line as defined by points S and E.

Namespace: RAYLASE.Marker.VectorGraphicElement
Assembly: RAYLASE.Marker.VectorGraphicElement (in RAYLASE.Marker.VectorGraphicElement.dll) Version: 2.19.0
Syntax
C#
public static bool CheckThreePointsOnLinearityWithCrossproduct(
	dvec3 s,
	dvec3 e,
	dvec3 p,
	double delta
)

Parameters

s  dvec3
The start point of the line.
e  dvec3
The end point of the line.
p  dvec3
The point that is checked to be on the line.
delta  Double
Point P is considered to be on the line if the cross product is less than delta.

Return Value

Boolean
true, if point P is on the line defined by S and E.
Remarks
^              /
|          E  /   * P
|            *
|           /        
|          / 
|       S /      
|        *             
|       /             
+---------------------------->
It is tested if |(E-S)x(P-S)| is less than delta. (E-S) and (P-S) are normalized before the cross product is calculated.
See Also