xmsmesh  1.0
MePolyOffsetter.h
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
6 //------------------------------------------------------------------------------
7 #pragma once
8 
9 //----- Included files ---------------------------------------------------------
10 #include <vector>
11 #include <xmscore/points/ptsfwd.h>
14 
15 //----- Forward declarations ---------------------------------------------------
16 
17 //----- Namespace declaration --------------------------------------------------
18 namespace xms
19 {
20 //----- Constants / Enumerations -----------------------------------------------
21 
22 //----- Structs / Classes ------------------------------------------------------
25 {
26 public:
27  std::vector<Pt3d> m_pts;
28  std::vector<std::vector<size_t>> m_loops;
29  std::vector<int> m_loopTypes;
30 };
31 
36 {
37 public:
38  static BSHP<MePolyOffsetter> New();
39 
41  enum polytype { OUTSIDE_POLY = 0, INSIDE_POLY, NEWOUT_POLY };
42 
44  virtual bool Offset(const std::vector<Pt3d>& a_input,
45  polytype a_ptype,
46  MePolyOffsetterOutput& a_out,
47  double a_xyTol) = 0;
48 
49 protected:
50  MePolyOffsetter() {}
51  virtual ~MePolyOffsetter() {}
52 
53 private:
54  XM_DISALLOW_COPY_AND_ASSIGN(MePolyOffsetter);
56 };
57 //----- Function prototypes ----------------------------------------------------
58 
59 } // namespace xms
static BSHP< MePolyOffsetter > New()
Creates a BufferPoly class.
convenience class for holding output data from the MePolyOffsetter
std::vector< Pt3d > m_pts
locations used by polygons
polytype
enum to identify types of polygons created by this class
Does an internal offset from a polygon outer boundary (shrink) and does an external offset from a pol...
#define XM_DISALLOW_COPY_AND_ASSIGN(TypeName)
std::vector< int > m_loopTypes
type of loop
std::vector< std::vector< size_t > > m_loops
indexes of points that define loops