d500007220e642ac8acbb19d80c92e839e0dc26e
[occt.git] / samples / mfc / standard / Common / Primitive / Sample2D_Markers.h
1 #ifndef _Sample2D_Markers_HeaderFile
2 #define _Sample2D_Markers_HeaderFile
3
4 #include <Standard_Macro.hxx>
5 #include <Standard_DefineHandle.hxx>
6 #include <Graphic3d_ArrayOfPoints.hxx>
7 class Sample2D_Markers;
8 DEFINE_STANDARD_HANDLE(Sample2D_Markers,AIS_InteractiveObject)
9 class Sample2D_Markers : public AIS_InteractiveObject {
10
11 enum Sample2D_CurrentTypeOfMarker {
12 Sample2D_CTOM_Generic,
13 Sample2D_CTOM_Polyline,
14 Sample2D_CTOM_Circle,
15 Sample2D_CTOM_Ellips
16 } ;
17
18 public:
19
20  // Generic marker
21  Standard_EXPORT Sample2D_Markers (const Quantity_Length theXPosition , 
22                    const Quantity_Length theYPosition ,
23                    const Aspect_TypeOfMarker theMarkerType,
24                    const Quantity_Color theColor,
25                    const Standard_Real theScaleOrId=5.0);
26
27  // Polyline marker
28   Standard_EXPORT Sample2D_Markers (const Quantity_Length theXPosition , 
29                    const Quantity_Length theYPosition ,
30                    const Handle(Graphic3d_ArrayOfPoints)& theArrayOfPoints,
31                    const Aspect_TypeOfMarker theMarkerType,
32                    const Quantity_Color theColor,
33                    const Standard_Real theScaleOrId=2.0);
34
35
36 DEFINE_STANDARD_RTTIEXT(Sample2D_Markers,AIS_InteractiveObject)
37
38 private: 
39
40 virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& /*aPresentationManager*/,
41                       const Handle(Prs3d_Presentation)& /*aPresentation*/,
42                       const Standard_Integer /*aMode*/);
43
44 virtual void ComputeSelection (const Handle(SelectMgr_Selection)& /*aSelection*/,
45                                const Standard_Integer /*aMode*/) {}
46
47
48 Standard_EXPORT virtual void SetContext(const Handle(AIS_InteractiveContext)& /*theContext*/) {}
49
50
51
52 Sample2D_CurrentTypeOfMarker myCurrentTypeOfMarker;
53 Quantity_Length          myXPosition   ; 
54 Quantity_Length          myYPosition   ; 
55 Aspect_TypeOfMarker      myMarkerType;
56 Quantity_Color           myColor;
57 Quantity_Length          myWidth       ;
58 Quantity_Length          myHeight      ;
59 Standard_Real         myIndex       ;//myScaleOrId
60 // specific polyline marker
61 Handle(Graphic3d_ArrayOfPoints) myArrayOfPoints;
62 };
63
64
65
66 // other inCurve functions and methods (like "C++: function call" methods)
67 //
68
69
70
71 #endif