IGeometry.hpp
1 #ifndef DM_IGEOMETRY_HPP_INCLUDED
2 #define DM_IGEOMETRY_HPP_INCLUDED
3 
4 #ifdef _MSC_VER
5  #pragma once
6 #endif
7 
8 #include "DM/config.hpp"
9 #include "DM/Handle.hpp"
10 #include "DM/ObjectBase.hpp"
11 #include "DM/ScopSemantic.hpp"
12 
13 DM_NAMESPACE_BEGIN
14 
15 namespace GeometryType {
16  enum Type {
17  null, ///< undefined geometry
18  point, ///< point type
19  polyline, ///< polyline type
20  polygon, ///< polygon type
21  window, ///< window type (2D)
22  box, ///< box type (3D)
23  circle, ///< circle (2D)
24  sphere, ///< sphere (3D)
25  cylinder, ///< cylinder (3D)
26  pointSet ///< 3d point set (3D)
27  };
28 }
29 
30 /// \brief Base class of all geometry objects
31 class DM_API IGeometry : public ObjectBase
32 {
33 public:
34  virtual ~IGeometry() {}
35 
36  /// get geometry type (kind of runtime type information)
37  virtual GeometryType::Type type() const = 0;
38 
39  /// sets the special topographic semantic of an geometry objects (not supported by all geometry types yet)
40  virtual void setScopSemantic(int scopSem) = 0;
41  /// returns the special topographic semantic of an geometry object
42  virtual int getScopSemantic() const = 0;
43 
44 
45  /// get an object copy
46  virtual IGeometry* clone() const = 0;
47 };
48 
50 
51 
52 DM_NAMESPACE_END
53 
54 #endif //DM_IGEOMETRY_HPP_INCLUDED