Helios++
Helios software for LiDAR simulations
PyVertexWrapper.h
1 #pragma once
2 
3 #ifdef PYTHON_BINDING
4 
5 #include <Vertex.h>
6 #include <PythonDVec3.h>
7 
8 namespace pyhelios{
9 
18 public:
19  // *** ATTRIBUTE *** //
20  // ******************* //
21  Vertex *v;
22  bool release = true;
23 
24  // *** CONSTRUCTION / DESTRUCTION *** //
25  // ************************************ //
27  this->v = v;
28  release = false;
29  }
30  PyVertexWrapper(Vertex const v){
31  this->v = new Vertex(v);
32  release = true;
33  }
34  virtual ~PyVertexWrapper(){}
35 
36  // *** GETTERS and SETTERS *** //
37  // ***************************** //
38  PythonDVec3 * getPosition() {return new PythonDVec3(&v->pos);}
39  PythonDVec3 * getNormal() {return new PythonDVec3(&v->normal);}
40 };
41 
42 }
43 
44 #endif
Class representing a vertex.
Definition: Vertex.h:14
glm::dvec3 pos
Vertex 3D position.
Definition: Vertex.h:39
glm::dvec3 normal
Vertex normal vector.
Definition: Vertex.h:43
Wrapper for Vertex class.
Definition: PyVertexWrapper.h:17
Wrapper to communicate glm::dvec3 with python.
Definition: PythonDVec3.h:16