AliceVision
Photogrammetric Computer Vision Framework
OrientedPoint.hpp
1 // This file is part of the AliceVision project.
2 // Copyright (c) 2017 AliceVision contributors.
3 // This Source Code Form is subject to the terms of the Mozilla Public License,
4 // v. 2.0. If a copy of the MPL was not distributed with this file,
5 // You can obtain one at https://mozilla.org/MPL/2.0/.
6 
7 #pragma once
8 
9 #include <aliceVision/mvsData/Point3d.hpp>
10 
11 namespace aliceVision {
12 
14 {
15  Point3d p; // 3 * float : 3 * 4 = 12 Bytes : (one float is 4 Bytes : 3.4E +/- 38 (7 digits) )
16  Point3d n; // 3 * float : 3 * 4 = 12 Bytes
17  float sim; // 4-Bytes : 3.4E +/- 38 (7 digits)
18  // TOTAL: 12 + 12 + 4 = 28 Bytes
19 
21  {
22  p = Point3d();
23  n = Point3d();
24  sim = 1.0f;
25  }
26 
27  OrientedPoint(const Point3d& _p, const Point3d& _n, float _sim)
28  {
29  sim = _sim;
30  p = _p;
31  n = _n;
32  }
33 
34  OrientedPoint& operator=(const OrientedPoint& param)
35  {
36  p = param.p;
37  n = param.n;
38  sim = param.sim;
39  return *this;
40  }
41 
42  bool operator>(const OrientedPoint& param) const { return (sim > param.sim); }
43 };
44 
45 } // namespace aliceVision
aliceVision::Point3d
Definition: Point3d.hpp:24
aliceVision
Definition: checkerDetector.cpp:32
aliceVision::OrientedPoint
Definition: OrientedPoint.hpp:13