1 #ifndef _ISession2D_Curve_HeaderFile
2 #define _ISession2D_Curve_HeaderFile
4 #include <Standard_Macro.hxx>
5 #include <Standard_DefineHandle.hxx>
7 #include <Aspect_TypeOfline.hxx>
8 #include <Aspect_WidthOfline.hxx>
9 #include <Standard_Integer.hxx>
10 #include <SelectMgr_SelectableObject.hxx>
11 #include <SelectMgr_Selection.hxx>
12 #include <Standard_OStream.hxx>
13 #include <Standard_IStream.hxx>
14 #include <Standard_CString.hxx>
16 #include <TColGeom2d_HSequenceOfCurve.hxx>
17 class PrsMgr_PresentationManager2d;
18 class Graphic2d_GraphicObject;
19 class SelectMgr_Selection;
21 #include "Geom2d_Curve.hxx"
23 #include "AIS_InteractiveObject.hxx"
24 class ISession2D_Curve;
25 DEFINE_STANDARD_HANDLE(ISession2D_Curve,AIS_InteractiveObject)
26 class ISession2D_Curve : public AIS_InteractiveObject {
34 (const Handle(Geom2d_Curve) aGeom2dCurve,
35 const Aspect_TypeOfLine aTypeOfline = Aspect_TOL_SOLID,
36 const Aspect_WidthOfLine aWidthOfLine = Aspect_WOL_MEDIUM,
37 const Standard_Integer aColorIndex = 4);
39 inline Standard_Integer NbPossibleSelection() const;
41 inline Aspect_TypeOfLine GetTypeOfLine() const;
42 inline void SetTypeOfLine(const Aspect_TypeOfLine aNewTypeOfLine);
44 inline Aspect_WidthOfLine GetWidthOfLine() const;
45 inline void SetWidthOfLine(const Aspect_WidthOfLine aNewWidthOfLine);
47 inline Standard_Integer GetColorIndex() const;
48 inline void SetColorIndex(const Standard_Integer aNewColorIndex) ;
50 inline Standard_Boolean GetDisplayPole() const;
51 inline void SetDisplayPole(const Standard_Boolean aNewDisplayPole) ;
53 inline Standard_Boolean ISession2D_Curve::GetDisplayCurbure() const;
54 inline void ISession2D_Curve::SetDisplayCurbure
55 (const Standard_Boolean aNewDisplayCurbure);
57 inline Standard_Real GetDiscretisation() const;
58 inline void SetDiscretisation(const Standard_Real aNewDiscretisation) ;
60 DEFINE_STANDARD_RTTIEXT(ISession2D_Curve,AIS_InteractiveObject)
65 virtual Standard_Boolean AcceptDisplayMode (const Standard_Integer theMode) const { return theMode == 0; }
66 virtual void Compute(const Handle(PrsMgr_PresentationManager)& aPresentationManager,const Handle(Prs3d_Presentation)& aPresentation,const Standard_Integer aMode = 0) ;
67 void ComputeSelection(const Handle(SelectMgr_Selection)& ,const Standard_Integer ) {}
71 Handle(Geom2d_Curve) myGeom2dCurve;
72 Aspect_TypeOfLine myTypeOfLine;
73 Aspect_WidthOfLine myWidthOfLine;
74 Standard_Integer myColorIndex;
75 Standard_Boolean myDisplayPole;
76 Standard_Boolean myDisplayCurbure;
77 Standard_Real myDiscretisation;
78 Standard_Real myradiusmax ;
79 Standard_Real myradiusratio ;
84 // other inCurve functions and methods (like "C++: function call" methods)
87 inline Standard_Integer ISession2D_Curve::NbPossibleSelection() const
92 inline Aspect_TypeOfLine ISession2D_Curve::GetTypeOfLine() const
97 inline void ISession2D_Curve::SetTypeOfLine(const Aspect_TypeOfLine aNewTypeOfLine)
99 myTypeOfLine = aNewTypeOfLine;
102 inline Aspect_WidthOfLine ISession2D_Curve::GetWidthOfLine() const
104 return myWidthOfLine ;
107 inline void ISession2D_Curve::SetWidthOfLine(const Aspect_WidthOfLine aNewWidthOfLine)
109 myWidthOfLine = aNewWidthOfLine;
112 inline Standard_Integer ISession2D_Curve::GetColorIndex() const
114 return myColorIndex ;
117 inline void ISession2D_Curve::SetColorIndex(const Standard_Integer aNewColorIndex)
119 myColorIndex = aNewColorIndex;
122 inline Standard_Boolean ISession2D_Curve::GetDisplayPole
125 return myDisplayPole;
127 inline void ISession2D_Curve::SetDisplayPole
128 (const Standard_Boolean aNewDisplayPole)
130 myDisplayPole = aNewDisplayPole;
133 inline Standard_Boolean ISession2D_Curve::GetDisplayCurbure
136 return myDisplayCurbure;
138 inline void ISession2D_Curve::SetDisplayCurbure
139 (const Standard_Boolean aNewDisplayCurbure)
141 myDisplayCurbure = aNewDisplayCurbure;
145 inline Standard_Real ISession2D_Curve::GetDiscretisation
148 return myDiscretisation;
150 inline void ISession2D_Curve::SetDiscretisation
151 (const Standard_Real aNewDiscretisation)
153 myDiscretisation = aNewDiscretisation;