IPolygonFactory.hpp
1 #ifndef DM_IPOLYGON_FACTORY_HPP_INCLUDED
2 #define DM_IPOLYGON_FACTORY_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/IPolygon.hpp"
11 #include "DM/AutoLink.hpp" //enable autolink
12 
13 DM_NAMESPACE_BEGIN
14 
15 /// \brief factory interface for creating polygon objects
16 class DM_API IPolygonFactory : public ObjectBase
17 {
18 public:
19  static IPolygonFactory* New();
20 
21 protected:
22  virtual ~IPolygonFactory() {}
23 
24 public:
25  virtual void clear() = 0;
26 
27  virtual IPolygonFactory& addPoint(const IPoint &pt) = 0;
28  virtual IPolygonFactory& addPoint(PointHandle pt) = 0;
29  virtual IPolygonFactory& addPoint(double x, double y) = 0;
30  virtual IPolygonFactory& addPoint(double x, double y, double z) = 0;
31 
32  virtual IPolygonFactory& closePart() = 0;
33 
34  virtual PolygonHandle getPolygon(Orientation::Type ori = Orientation::undefined, bool clear = true) = 0;
35 };
36 
38 
39 
40 DM_NAMESPACE_END
41 
42 #endif //DM_IPOLYGON_FACTORY_HPP_INCLUDED