ILinearDistance.hpp
1 #ifndef DM_ILINEAR_DISTANCE_HPP_INCLUDED
2 #define DM_ILINEAR_DISTANCE_HPP_INCLUDED
3 
4 #ifdef _MSC_VER
5  #pragma once
6 #endif
7 
8 #include "DM/config.hpp"
9 #include "DM/ObjectBase.hpp"
10 #include "DM/Handle.hpp"
11 
12 DM_NAMESPACE_BEGIN
13 
14 /// \brief Computes an average linear distance of a given point set in 2d
15 class DM_API ILinearDistance2D : public ObjectBase
16 {
17 public:
18  static ILinearDistance2D *New(); ///< creates a linear distance object
19 
20 protected:
21  virtual ~ILinearDistance2D() {}
22 
23 public:
24  virtual void add(double x, double y) = 0; ///< adds a point to the point set
25  virtual void clear() = 0; ///< removes all points from the point set
26  virtual double get() const = 0; ///< compute the linear distance of the current point set
27 };
28 
29 
30 /// \brief Computes an average linear distance of a given point set in 3d
31 class DM_API ILinearDistance3D : public ObjectBase
32 {
33 public:
34  static ILinearDistance3D *New(); ///< creates a linear distance object
35 protected:
36  virtual ~ILinearDistance3D() {}
37 
38 public:
39  virtual void add(double x, double y, double z) = 0; ///< adds a point to the point set
40  virtual void clear() = 0; ///< removes all points from the point set
41  virtual double get() const = 0; ///< compute the linear distance of the current point set
42 };
43 
46 
47 DM_NAMESPACE_END
48 
49 #endif //DM_ILINEAR_DISTANCE_HPP_INCLUDED