File indexing completed on 2025-01-18 10:03:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _DrawTrSurf_BSplineCurve_HeaderFile
0018 #define _DrawTrSurf_BSplineCurve_HeaderFile
0019
0020 #include <Draw_MarkerShape.hxx>
0021 #include <Draw_Color.hxx>
0022 #include <DrawTrSurf_Curve.hxx>
0023
0024 class Geom_BSplineCurve;
0025
0026 DEFINE_STANDARD_HANDLE(DrawTrSurf_BSplineCurve, DrawTrSurf_Curve)
0027
0028 class DrawTrSurf_BSplineCurve : public DrawTrSurf_Curve
0029 {
0030 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_BSplineCurve, DrawTrSurf_Curve)
0031 Draw_Drawable3D_FACTORY
0032 public:
0033
0034
0035 Standard_EXPORT DrawTrSurf_BSplineCurve (const Handle(Geom_BSplineCurve)& C);
0036
0037
0038 Standard_EXPORT DrawTrSurf_BSplineCurve (const Handle(Geom_BSplineCurve)& C,
0039 const Draw_Color& CurvColor, const Draw_Color& PolesColor, const Draw_Color& KnotsColor, const Draw_MarkerShape KnotsShape,
0040 const Standard_Integer KnotsSize, const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots,
0041 const Standard_Integer Discret, const Standard_Real Deflection, const Standard_Integer DrawMode);
0042
0043 Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
0044
0045 Standard_EXPORT void DrawOn (Draw_Display& dis,
0046 const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots) const;
0047
0048 Standard_EXPORT void DrawOn (Draw_Display& dis,
0049 const Standard_Real U1, const Standard_Real U2, const Standard_Integer Pindex,
0050 const Standard_Boolean ShowPoles = Standard_True, const Standard_Boolean ShowKnots = Standard_True) const;
0051
0052 void ShowPoles() { drawPoles = Standard_True; }
0053
0054 void ShowKnots() { drawKnots = Standard_True; }
0055
0056 void ClearPoles() { drawPoles = Standard_False; }
0057
0058 void ClearKnots() { drawKnots = Standard_False; }
0059
0060
0061
0062
0063
0064
0065 Standard_EXPORT void FindPole (const Standard_Real X, const Standard_Real Y, const Draw_Display& D, const Standard_Real Prec, Standard_Integer& Index) const;
0066
0067 Standard_EXPORT void FindKnot (const Standard_Real X, const Standard_Real Y, const Draw_Display& D, const Standard_Real Prec, Standard_Integer& Index) const;
0068
0069 void SetPolesColor (const Draw_Color& theColor) { polesLook = theColor; }
0070
0071 void SetKnotsColor (const Draw_Color& theColor) { knotsLook = theColor; }
0072
0073 void SetKnotsShape (const Draw_MarkerShape theShape) { knotsForm = theShape; }
0074
0075 Draw_MarkerShape KnotsShape() const { return knotsForm; }
0076
0077 Draw_Color KnotsColor() const { return knotsLook; }
0078
0079 Draw_Color PolesColor() const { return polesLook; }
0080
0081
0082 Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
0083
0084 private:
0085
0086 Standard_Boolean drawPoles;
0087 Standard_Boolean drawKnots;
0088 Draw_MarkerShape knotsForm;
0089 Draw_Color knotsLook;
0090 Standard_Integer knotsDim;
0091 Draw_Color polesLook;
0092
0093 };
0094
0095 #endif