File indexing completed on 2025-01-18 10:02:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _AIS_Circle_HeaderFile
0018 #define _AIS_Circle_HeaderFile
0019
0020 #include <AIS_InteractiveObject.hxx>
0021
0022 class Geom_Circle;
0023
0024
0025
0026 class AIS_Circle : public AIS_InteractiveObject
0027 {
0028 DEFINE_STANDARD_RTTIEXT(AIS_Circle, AIS_InteractiveObject)
0029 public:
0030
0031
0032
0033 Standard_EXPORT AIS_Circle(const Handle(Geom_Circle)& aCircle);
0034
0035
0036
0037
0038
0039 Standard_EXPORT AIS_Circle(const Handle(Geom_Circle)& theCircle, const Standard_Real theUStart, const Standard_Real theUEnd, const Standard_Boolean theIsFilledCircleSens = Standard_False);
0040
0041
0042 virtual Standard_Integer Signature() const Standard_OVERRIDE { return 6; }
0043
0044
0045 virtual AIS_KindOfInteractive Type() const Standard_OVERRIDE { return AIS_KindOfInteractive_Datum; }
0046
0047
0048 const Handle(Geom_Circle)& Circle() const { return myComponent; }
0049
0050
0051
0052 void Parameters (Standard_Real& theU1, Standard_Real& theU2) const
0053 {
0054 theU1 = myUStart;
0055 theU2 = myUEnd;
0056 }
0057
0058
0059 void SetCircle (const Handle(Geom_Circle)& theCircle) { myComponent = theCircle; }
0060
0061
0062 void SetFirstParam (const Standard_Real theU)
0063 {
0064 myUStart = theU;
0065 myCircleIsArc = Standard_True;
0066 }
0067
0068
0069 void SetLastParam (const Standard_Real theU)
0070 {
0071 myUEnd = theU;
0072 myCircleIsArc = Standard_True;
0073 }
0074
0075 Standard_EXPORT void SetColor (const Quantity_Color& aColor) Standard_OVERRIDE;
0076
0077
0078 Standard_EXPORT void SetWidth (const Standard_Real aValue) Standard_OVERRIDE;
0079
0080
0081 Standard_EXPORT void UnsetColor() Standard_OVERRIDE;
0082
0083
0084 Standard_EXPORT void UnsetWidth() Standard_OVERRIDE;
0085
0086
0087 Standard_Boolean IsFilledCircleSens() const { return myIsFilledCircleSens; }
0088
0089
0090
0091 void SetFilledCircleSens (const Standard_Boolean theIsFilledCircleSens) { myIsFilledCircleSens = theIsFilledCircleSens; }
0092
0093 private:
0094
0095 Standard_EXPORT virtual void Compute (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
0096 const Handle(Prs3d_Presentation)& theprs,
0097 const Standard_Integer theMode) Standard_OVERRIDE;
0098
0099 Standard_EXPORT virtual void ComputeSelection (const Handle(SelectMgr_Selection)& theSel,
0100 const Standard_Integer theMode) Standard_OVERRIDE;
0101
0102 Standard_EXPORT void ComputeCircle (const Handle(Prs3d_Presentation)& aPresentation);
0103
0104 Standard_EXPORT void ComputeArc (const Handle(Prs3d_Presentation)& aPresentation);
0105
0106 Standard_EXPORT void ComputeCircleSelection (const Handle(SelectMgr_Selection)& aSelection);
0107
0108 Standard_EXPORT void ComputeArcSelection (const Handle(SelectMgr_Selection)& aSelection);
0109
0110
0111 void replaceWithNewLineAspect (const Handle(Prs3d_LineAspect)& theAspect);
0112
0113 private:
0114
0115 Handle(Geom_Circle) myComponent;
0116 Standard_Real myUStart;
0117 Standard_Real myUEnd;
0118 Standard_Boolean myCircleIsArc;
0119 Standard_Boolean myIsFilledCircleSens;
0120
0121 };
0122
0123 DEFINE_STANDARD_HANDLE(AIS_Circle, AIS_InteractiveObject)
0124
0125 #endif