[This is preliminary documentation and is subject to change.]

Determines the relationship between lines AB and CD.

Namespace: org.critterai.geom
Assembly: cai-util (in cai-util.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static LineRelType GetRelationship(
	Vector2 a,
	Vector2 b,
	Vector2 c,
	Vector2 d,
	out Vector2 intersectPoint
)
Public Shared Function GetRelationship ( _
	a As Vector2, _
	b As Vector2, _
	c As Vector2, _
	d As Vector2, _
	<OutAttribute> ByRef intersectPoint As Vector2 _
) As LineRelType
public:
static LineRelType GetRelationship(
	Vector2 a, 
	Vector2 b, 
	Vector2 c, 
	Vector2 d, 
	[OutAttribute] Vector2% intersectPoint
)

Parameters

a
Vector2
Point A on line AB.
b
Vector2
Point B on ling AB.
c
Vector2
Point C on line CD.
d
Vector2
Point D on line CD.
intersectPoint
Vector2%
The point of intersection, if applicable.

Return Value

The relationship between lines AB and CD.

Remarks

While this check is technically inclusive of segment end points, floating point errors can result in end point intersection being missed. If this matters, a SloppyEquals or similar test of the intersection point can be performed.

See Also