Line.hpp
Go to the documentation of this file.
1 
28 /*
29  * Line.hpp
30  *
31  * @date 06.10.2017
32  * @author Christian Swan cswan@uos.de
33  */
34 
35 #ifndef LVR2_GEOMETRY_LINE_H_
36 #define LVR2_GEOMETRY_LINE_H_
37 
38 #include "Normal.hpp"
39 
40 namespace lvr2
41 {
42 
48 template <typename BaseVecT>
49 struct Line
50 {
51  Line() : normal(0, 0, 1) {}
52 
54  BaseVecT pos;
55 
57  BaseVecT project(const BaseVecT& other) const;
58 };
59 
60 template<typename BaseVecT>
61 inline std::ostream& operator<<(std::ostream& os, const Line<BaseVecT>& l)
62 {
63  os << "Line[" << l.normal << ", " << l.pos << "]";
64  return os;
65 }
66 
67 } // namespace lvr2
68 
69 #include "lvr2/geometry/Line.tcc"
70 
71 #endif /* LVR2_GEOMETRY_LINE_H_ */
A Line.
Definition: Line.hpp:49
BaseVecT pos
Definition: Line.hpp:54
Normal< typename BaseVecT::CoordType > normal
Definition: Line.hpp:53
BaseVecT project(const BaseVecT &other) const
Projects the given point onto the line and returns the projection point.
Line()
Definition: Line.hpp:51


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:08