0023831: Ghosts appears in 2D viewer of HLR MFC sample
[occt.git] / samples / mfc / standard / Common / ISession2D / ISession2D_Shape.h
1 #ifndef _ISession2D_Shape_HeaderFile
2 #define _ISession2D_Shape_HeaderFile
3
4 #include <Standard_Macro.hxx>
5 #include <Standard_DefineHandle.hxx>
6 #include "TopoDS_Shape.hxx"
7
8 #include "SelectMgr_SelectableObject.hxx"  
9 #include "Graphic3d_ArrayOfPolylines.hxx"  
10 #include "AIS_InteractiveObject.hxx"  
11
12 #include <HLRAlgo_Projector.hxx>
13 #include <HLRBRep_Algo.hxx>
14 #include <HLRBRep_PolyAlgo.hxx>
15
16 DEFINE_STANDARD_HANDLE(ISession2D_Shape,AIS_InteractiveObject)
17 class ISession2D_Shape : public AIS_InteractiveObject {
18
19 public:
20
21  // Methods PUBLIC
22  // 
23 Standard_EXPORT ISession2D_Shape ();
24 void Standard_EXPORT Add(const TopoDS_Shape& aShape);
25
26 DEFINE_STANDARD_RTTI(ISession2D_Shape)
27
28
29 //           myProjector
30 HLRAlgo_Projector& Projector() { return myProjector;};
31 Standard_EXPORT void SetProjector(HLRAlgo_Projector& aProjector);
32
33 private:
34 Standard_Integer myNbIsos;
35 public :
36 Standard_Integer& NbIsos() { return myNbIsos;};
37 Standard_EXPORT void SetNbIsos(Standard_Integer& aNbIsos) ;
38
39 Standard_Boolean AcceptShapeDecomposition() {return Standard_True;};
40
41 virtual Standard_Boolean  AcceptSelectionMode(const Standard_Integer aMode) const
42 {return Standard_True; } 
43
44
45 private: 
46
47  // Methods PRIVATE
48  // 
49 void BuildAlgo();
50 void BuildPolyAlgo();
51
52 void DrawCompound(const Handle(Prs3d_Presentation)& thePresentation,const TopoDS_Shape& theCompound, const Handle(Prs3d_LineAspect) theAspect);
53
54
55 Standard_EXPORT virtual  void Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,const Handle(Prs3d_Presentation)& thePresentation,const Standard_Integer theMode = 0) ;
56
57 virtual void ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,const Standard_Integer aMode) ;
58
59 private :
60 TopTools_ListOfShape myListOfShape;
61 HLRAlgo_Projector myProjector;
62 Handle(HLRBRep_Algo) myAlgo;
63 Handle(HLRBRep_PolyAlgo) myPolyAlgo;
64
65
66 };
67
68
69 // other inCurve functions and methods (like "C++: function call" methods)
70 //
71
72
73
74 #endif