BrydenWoodUtilsLineSegementsIntersect Method |
Test whether two line segments intersect. If so, calculate the intersection point.
[!:http://stackoverflow.com/a/14143738/292237]
Namespace:
BrydenWoodUnity
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntaxpublic static bool LineSegementsIntersect(
Vector p,
Vector p2,
Vector q,
Vector q2,
out Vector intersection,
bool considerCollinearOverlapAsIntersect = false
)
Public Shared Function LineSegementsIntersect (
p As Vector,
p2 As Vector,
q As Vector,
q2 As Vector,
<OutAttribute> ByRef intersection As Vector,
Optional considerCollinearOverlapAsIntersect As Boolean = false
) As Boolean
public:
static bool LineSegementsIntersect(
Vector^ p,
Vector^ p2,
Vector^ q,
Vector^ q2,
[OutAttribute] Vector^% intersection,
bool considerCollinearOverlapAsIntersect = false
)
static member LineSegementsIntersect :
p : Vector *
p2 : Vector *
q : Vector *
q2 : Vector *
intersection : Vector byref *
?considerCollinearOverlapAsIntersect : bool
(* Defaults:
let _considerCollinearOverlapAsIntersect = defaultArg considerCollinearOverlapAsIntersect false
*)
-> bool
Parameters
- p
- Type: BrydenWoodUnityVector
Vector to the start point of p. - p2
- Type: BrydenWoodUnityVector
Vector to the end point of p. - q
- Type: BrydenWoodUnityVector
Vector to the start point of q. - q2
- Type: BrydenWoodUnityVector
Vector to the end point of q. - intersection
- Type: BrydenWoodUnityVector
The point of intersection, if any. - considerCollinearOverlapAsIntersect (Optional)
- Type: SystemBoolean
[Missing <param name="considerCollinearOverlapAsIntersect"/> documentation for "M:BrydenWoodUnity.BrydenWoodUtils.LineSegementsIntersect(BrydenWoodUnity.Vector,BrydenWoodUnity.Vector,BrydenWoodUnity.Vector,BrydenWoodUnity.Vector,BrydenWoodUnity.Vector@,System.Boolean)"]
Return Value
Type:
BooleanTrue if an intersection point was found.
See Also