Image Component Library (ICL)
TriangleIntersectionEstimator.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2014 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLPhysics/src/ICLPhysics/TriangleIntersectionEstimator.h**
10 ** Module : ICLPhysics **
11 ** Author : Christof Elbrechter, Matthias Esau **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 #pragma once
31 
32 #include <ICLGeom/ViewRay.h>
33 #include <ICLUtils/Point32f.h>
34 
35 namespace icl{
36 namespace physics{
37 
39  public:
45  rayIsCollinearWithTriangle
46  };
47 
50  Triangle(const geom::Vec &a, const geom::Vec &b, const geom::Vec &c):a(a),b(b),c(c){}
51  geom::Vec a,b,c;
52  };
53 
54 
56  Intersection(IntersectionType type=noIntersection,
57  const geom::Vec &position=geom::Vec(),
58  const utils::Point32f &trianglePosition=utils::Point32f::null):
59  type(type),position(position),trianglePosition(trianglePosition){}
63  operator bool() const { return type == foundIntersection; }
64  };
65 
66  static Intersection find(const Triangle &t, const geom::ViewRay &r);
67  };
68 
69 }
70 }
Definition: TriangleIntersectionEstimator.h:43
undocument this line if you encounter any issues!
Definition: Any.h:37
Definition: TriangleIntersectionEstimator.h:44
IntersectionType type
Definition: TriangleIntersectionEstimator.h:60
Triangle()
Definition: TriangleIntersectionEstimator.h:49
Intersection(IntersectionType type=noIntersection, const geom::Vec &position=geom::Vec(), const utils::Point32f &trianglePosition=utils::Point32f::null)
Definition: TriangleIntersectionEstimator.h:56
Triangle(const geom::Vec &a, const geom::Vec &b, const geom::Vec &c)
Definition: TriangleIntersectionEstimator.h:50
Definition: TriangleIntersectionEstimator.h:38
Definition: TriangleIntersectionEstimator.h:48
geom::Vec position
Definition: TriangleIntersectionEstimator.h:61
static const Point32f null
null Point is x=0, y=0
Definition: Point32f.h:51
Definition: TriangleIntersectionEstimator.h:41
Definition: TriangleIntersectionEstimator.h:55
#define ICLPhysics_API
Definition: CompatMacros.h:181
This is a view-ray's line equation in parameter form.
Definition: ViewRay.h:49
Single precission 3D Vectors Point class of the ICL.
Definition: Point32f.h:41
IntersectionType
Definition: TriangleIntersectionEstimator.h:40
geom::Vec c
Definition: TriangleIntersectionEstimator.h:51
Definition: TriangleIntersectionEstimator.h:42
utils::Point32f trianglePosition
Definition: TriangleIntersectionEstimator.h:62