Integration of OCCT 6.5.0 from SVN
[occt.git] / samples / mfc / occtdemo / Offset2d / Offset2d_Presentation.h
1 // Offset2d_Presentation.h: interface for the Offset2d_Presentation class.
2 // Presentation class: Offset of curves and wires
3 //////////////////////////////////////////////////////////////////////
4
5 #if !defined(AFX_Offset2d_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_)
6 #define AFX_Offset2d_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_
7
8 #if _MSC_VER > 1000
9 #pragma once
10 #endif // _MSC_VER > 1000
11
12 #include <OCCDemo_Presentation.h>
13 #include <Geom2d_Curve.hxx>
14 class Quantity_Color;
15 class TopoDS_Wire;
16
17 class Offset2d_Presentation : public OCCDemo_Presentation
18 {
19 public:
20   // Construction
21   Offset2d_Presentation();
22
23 public:
24   // Iteration on samples
25   virtual void DoSample();
26   // one phase of iterations
27
28 private:
29   // Sample functions
30   void sampleCircle();
31   void sampleEllipse();
32   void sampleParabola();
33   void sampleHyperbola();
34   void sampleBezier();
35   void samplePBSpline();
36   void sampleWire1();
37   void sampleWire2();
38
39   void drawAndOffsetCurve2d (Handle_Geom2d_Curve theCurve,
40     const Standard_CString theName,
41     TCollection_AsciiString& theText);
42   void drawAndOffsetWire (const TopoDS_Wire& theWire,
43     const Standard_CString theName,
44     TCollection_AsciiString& theText);
45
46 private:
47   // Array of pointers to sample functions
48   typedef void (Offset2d_Presentation::*PSampleFuncType)();
49   typedef struct
50   {
51     PSampleFuncType pFunc;
52     int             nNeg;
53     Standard_Real   dNeg;
54     int             nPos;
55     Standard_Real   dPos;
56   } SampleDescrType;
57   static const SampleDescrType SampleDescrs[];
58
59 };
60
61 #endif // !defined(AFX_Offset2d_Presentation_H__790EED7F_7BA2_11D5_BA4A_0060B0EE18EA__INCLUDED_)