All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Intersection2d.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "VectorMathDecl.h"
6 #include "Line2.h"
7 
8 namespace Eegeo
9 {
10  namespace Geometry
11  {
12  int Intersect2dLineSegments(
13  const v2& a, const v2& b,
14  const v2& c, const v2& d,
15  float & outTIntersection, v2& outPointIntersection
16  );
17 
18  int Intersect2dLines(
19  const v2& linePointA, const v2& lineDirA,
20  const v2& linePointB, const v2& lineDirB,
21  v2& outPointIntersection
22  );
23 
24  inline int Intersect2dLines(
25  const Line2& lineA,
26  const Line2& lineB,
27  v2& outPointIntersection)
28  {
29  return Intersect2dLines(
30  lineA.point, lineA.dir,
31  lineB.point, lineB.dir,
32  outPointIntersection);
33  }
34  }
35 }
36