RaycasterBase.hpp
Go to the documentation of this file.
1 
28 /*
29  * RaycasterBase.hpp
30  *
31  * @date 25.01.2019
32  * @author Alexander Mock <amock@uos.de>
33  */
34 
35 #pragma once
36 #ifndef LVR_RAYCASTER_BASE_HPP
37 #define LVR_RAYCASTER_BASE_HPP
38 
39 #include <memory>
40 #include "lvr2/io/MeshBuffer.hpp"
42 
43 #include "Intersection.hpp"
44 
45 namespace lvr2
46 {
47 
52 template<typename IntT>
54 public:
59 
60  // PURE VIRTUALS
70  virtual bool castRay(
71  const Vector3f& origin,
72  const Vector3f& direction,
73  IntT& intersection
74  ) = 0;
75 
76  // VIRTUALS WITH DEFAULTS. overridable
77 
87  virtual void castRays(
88  const Vector3f& origin,
89  const std::vector<Vector3f>& directions,
90  std::vector<IntT>& intersections,
91  std::vector<uint8_t>& hits
92  );
93 
103  virtual void castRays(
104  const Vector3f& origin,
105  const std::vector<std::vector<Vector3f> >& directions,
106  std::vector< std::vector<IntT> >& intersections,
107  std::vector< std::vector<uint8_t> >& hits
108  );
109 
119  virtual void castRays(
120  const std::vector<Vector3f>& origins,
121  const std::vector<Vector3f>& directions,
122  std::vector<IntT>& intersections,
123  std::vector<uint8_t>& hits
124  );
125 
135  virtual void castRays(
136  const std::vector<Vector3f>& origins,
137  const std::vector<std::vector<Vector3f> >& directions,
138  std::vector<std::vector<IntT> >& intersections,
139  std::vector<std::vector<uint8_t> >& hits
140  );
141 
142 private:
144 };
145 
146 template<typename IntT>
147 using RaycasterBasePtr = std::shared_ptr<RaycasterBase<IntT> >;
148 
149 } // namespace lvr2
150 
151 #include "RaycasterBase.tcc"
152 
153 #endif // LVR_RAYCASTER_BASE_HPP
lvr2::RaycasterBasePtr
std::shared_ptr< RaycasterBase< IntT > > RaycasterBasePtr
Definition: RaycasterBase.hpp:147
lvr2::RaycasterBase::RaycasterBase
RaycasterBase(const MeshBufferPtr mesh)
Constructor: Stores mesh as member.
lvr2::RaycasterBase::m_mesh
const MeshBufferPtr m_mesh
Definition: RaycasterBase.hpp:143
lvr2::Vector3f
Eigen::Vector3f Vector3f
Eigen 3D vector, single precision.
Definition: MatrixTypes.hpp:118
MatrixTypes.hpp
Intersection.hpp
lvr2::RaycasterBase::castRay
virtual bool castRay(const Vector3f &origin, const Vector3f &direction, IntT &intersection)=0
Cast a single ray onto the mesh.
MeshBuffer.hpp
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::MeshBufferPtr
std::shared_ptr< MeshBuffer > MeshBufferPtr
Definition: MeshBuffer.hpp:217
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26
lvr2::RaycasterBase
RaycasterBase interface.
Definition: RaycasterBase.hpp:53
lvr2::RaycasterBase::castRays
virtual void castRays(const Vector3f &origin, const std::vector< Vector3f > &directions, std::vector< IntT > &intersections, std::vector< uint8_t > &hits)
Cast a ray from single origin with multiple directions onto the mesh.


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