FirstCoordProjector.h
1 /* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
2  * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
3  * Author(s): David Salinas
4  *
5  * Copyright (C) 2014 Inria
6  *
7  * Modification(s):
8  * - YYYY/MM Author: Description of the modification
9  */
10 
11 #ifndef VIEW_FIRSTCOORDPROJECTOR_H_
12 #define VIEW_FIRSTCOORDPROJECTOR_H_
13 
14 #include "utils/UI_utils.h"
15 #include "Projector3D.h"
16 
17 class FirstCoordProjector3D : public Projector3D {
18  typedef Projector3D::Point Point;
19  typedef Projector3D::Point_3 Point_3;
20 
21  Point_3 operator()(const Point& p) const {
22  if (p.dimension() >= 3)
23  return Point_3(p.x(), p.y(), p.z());
24  else if (p.dimension() >= 2)
25  return Point_3(p.x(), p.y(), 0.0);
26  else
27  return Point_3(0.0, 0.0, 0.0);
28  }
29 };
30 
31 #endif // VIEW_FIRSTCOORDPROJECTOR_H_
GUDHIdev  Version 3.5.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : MIT Generated on Sun May 1 2022 09:19:32 for GUDHIdev by Doxygen 1.9.1