1 #pragma once
2 
3 #ifndef COLORFXUTILS_H
4 #define COLORFXUTILS_H
5 
6 #include "tgeometry.h"
7 #include "tpixel.h"
8 #include "trandom.h"
9 #include "tregionoutline.h"
10 #include "tcurves.h"
11 
12 class TRegion;
13 class TFlash;
14 
15 class RubberDeform {
16   std::vector<T3DPointD> *m_pPolyOri;
17   std::vector<T3DPointD> m_polyLoc;
18 
19   void deformStep();
20   double avgLength();
21   void refinePoly(const double rf = -1.0);
22   void getBBox(TRectD &bbox);
23 
24 public:
25   RubberDeform();
26   RubberDeform(std::vector<T3DPointD> *pPolyOri, const double rf = -1.0);
copyLoc2Ori()27   void copyLoc2Ori() { *m_pPolyOri = m_polyLoc; };
copyOri2Loc()28   void copyOri2Loc() { m_polyLoc = *m_pPolyOri; };
29 
30   virtual ~RubberDeform();
31   void deform(const double n);
32 };
33 
34 #endif
35