ILinearDistance.hpp
1 #pragma once
2 
3 #include "DM/config.hpp"
4 #include "DM/ObjectBase.hpp"
5 #include "DM/Handle.hpp"
6 
7 DM_NAMESPACE_BEGIN
8 
9 /// \brief Computes an average linear distance of a given point set in 2d
10 class DM_API ILinearDistance2D : public ObjectBase
11 {
12 public:
13  static ILinearDistance2D *New(); ///< creates a linear distance object
14 
15 protected:
16  virtual ~ILinearDistance2D() {}
17 
18 public:
19  virtual void add(double x, double y) = 0; ///< adds a point to the point set
20  virtual void clear() = 0; ///< removes all points from the point set
21  virtual double get() const = 0; ///< compute the linear distance of the current point set
22 };
23 
24 
25 /// \brief Computes an average linear distance of a given point set in 3d
26 class DM_API ILinearDistance3D : public ObjectBase
27 {
28 public:
29  static ILinearDistance3D *New(); ///< creates a linear distance object
30 protected:
31  virtual ~ILinearDistance3D() {}
32 
33 public:
34  virtual void add(double x, double y, double z) = 0; ///< adds a point to the point set
35  virtual void clear() = 0; ///< removes all points from the point set
36  virtual double get() const = 0; ///< compute the linear distance of the current point set
37 };
38 
41 
42 DM_NAMESPACE_END
Computes an average linear distance of a given point set in 3d.
Definition: ILinearDistance.hpp:26
Computes an average linear distance of a given point set in 2d.
Definition: ILinearDistance.hpp:10
Smart pointer class using reference counting with support for DM objects (see ObjectBase)
Definition: Handle.hpp:75
Definition: M/c++_api/inc/DM/ObjectBase.hpp:8