Helios++
Helios software for LiDAR simulations
IntersectionHandlingResult.h
1 #pragma once
2 
3 #include <utility>
4 #include <glm/glm.hpp>
5 #include <iostream>
6 #include <boost/serialization/serialization.hpp>
7 
15 private:
16  // *** SERIALIZATION *** //
17  // *********************** //
18  friend class boost::serialization::access;
25  template <typename Archive>
26  void serialize(Archive &ar, const unsigned int version){
28  ar &canContinue;
29  }
30 
31 protected:
32  // *** ATTRIBUTES *** //
33  // ******************** //
37  glm::dvec3 intersectionPoint;
38  bool canContinue;
39 
40 public:
41  // *** CONSTRUCTION *** //
42  // ********************** //
50  glm::dvec3 intersectionPoint = glm::dvec3(0,0,0),
51  bool canContinue=false
52  ):
54  canContinue(canContinue)
55  {}
56 
57 
58  // *** M E T H O D S *** //
59  // ************************ //
64  inline bool canRayContinue(){return canContinue;}
70 
71  // *** STREAM OPERATORS *** //
72  // ************************** //
73  friend std::ostream& operator<< (
74  std::ostream &out,
76  );
77 
78 };
Output class for intersection handling methods.
Definition: IntersectionHandlingResult.h:14
bool canRayContinue()
Check whether the ray can continue after intersection or not.
Definition: IntersectionHandlingResult.h:64
glm::dvec3 getIntersectionPoint()
Obtain the intersection point.
Definition: IntersectionHandlingResult.h:69
void serialize(Archive &ar, const unsigned int version)
Serialize an IntersectionHandlingResult to a stream of bytes.
Definition: IntersectionHandlingResult.h:26
glm::dvec3 intersectionPoint
True if the ray can continue after intersection, False otherwise.
Definition: IntersectionHandlingResult.h:37
IntersectionHandlingResult(glm::dvec3 intersectionPoint=glm::dvec3(0, 0, 0), bool canContinue=false)
Build an IntersectionHandlingResult.
Definition: IntersectionHandlingResult.h:49