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_ */
lvr2::operator<<
std::ostream & operator<<(std::ostream &os, const BaseVector< T > &v)
Definition: BaseVector.hpp:227
lvr2::Normal< typename BaseVecT::CoordType >
lvr2::Line::normal
Normal< typename BaseVecT::CoordType > normal
Definition: Line.hpp:53
lvr2::Line::Line
Line()
Definition: Line.hpp:51
lvr2::Line::project
BaseVecT project(const BaseVecT &other) const
Projects the given point onto the line and returns the projection point.
lvr2
Definition: BaseBufferManipulators.hpp:39
Normal.hpp
lvr2::Line::pos
BaseVecT pos
Definition: Line.hpp:54
lvr2::Line
A Line.
Definition: Line.hpp:49


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 Wed Mar 2 2022 00:37:24