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_BSplineSurface_HeaderFile
0018 #define _DrawTrSurf_BSplineSurface_HeaderFile
0019
0020 #include <Draw_MarkerShape.hxx>
0021 #include <Draw_Color.hxx>
0022 #include <DrawTrSurf_Surface.hxx>
0023
0024 class Geom_BSplineSurface;
0025
0026 DEFINE_STANDARD_HANDLE(DrawTrSurf_BSplineSurface, DrawTrSurf_Surface)
0027
0028
0029
0030
0031
0032
0033 class DrawTrSurf_BSplineSurface : public DrawTrSurf_Surface
0034 {
0035 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_BSplineSurface, DrawTrSurf_Surface)
0036 Draw_Drawable3D_FACTORY
0037 public:
0038
0039
0040
0041
0042
0043
0044 Standard_EXPORT DrawTrSurf_BSplineSurface (const Handle(Geom_BSplineSurface)& S);
0045
0046
0047 Standard_EXPORT DrawTrSurf_BSplineSurface (const Handle(Geom_BSplineSurface)& S,
0048 const Draw_Color& BoundsColor, const Draw_Color& IsosColor, const Draw_Color& PolesColor,
0049 const Draw_Color& KnotsColor, const Draw_MarkerShape KnotsShape, const Standard_Integer KnotsSize,
0050 const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots,
0051 const Standard_Integer Discret, const Standard_Real Deflection, const Standard_Integer DrawMode);
0052
0053
0054 Standard_EXPORT DrawTrSurf_BSplineSurface (const Handle(Geom_BSplineSurface)& S,
0055 const Standard_Integer NbUIsos, const Standard_Integer NbVIsos,
0056 const Draw_Color& BoundsColor, const Draw_Color& IsosColor, const Draw_Color& PolesColor,
0057 const Draw_Color& KnotsColor, const Draw_MarkerShape KnotsShape, const Standard_Integer KnotsSize,
0058 const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots,
0059 const Standard_Integer Discret, const Standard_Real Deflection, const Standard_Integer DrawMode);
0060
0061 Standard_EXPORT virtual void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
0062
0063 void ShowPoles() { drawPoles = Standard_True; }
0064
0065 void ShowKnots() { drawKnots = Standard_True; }
0066
0067
0068 Standard_EXPORT virtual void ShowIsos (const Standard_Integer Nu, const Standard_Integer Nv) Standard_OVERRIDE;
0069
0070
0071 Standard_EXPORT void ShowKnotsIsos();
0072
0073
0074 Standard_EXPORT virtual void ClearIsos() Standard_OVERRIDE;
0075
0076 void ClearPoles() { drawPoles = Standard_False; }
0077
0078 void ClearKnots() { drawKnots = Standard_False; }
0079
0080 Standard_EXPORT void FindPole (const Standard_Real X, const Standard_Real Y, const Draw_Display& D, const Standard_Real Prec, Standard_Integer& UIndex, Standard_Integer& VIndex) const;
0081
0082 Standard_EXPORT void FindUKnot (const Standard_Real X, const Standard_Real Y, const Draw_Display& D, const Standard_Real Prec, Standard_Integer& UIndex) const;
0083
0084 Standard_EXPORT void FindVKnot (const Standard_Real X, const Standard_Real Y, const Draw_Display& D, const Standard_Real Prec, Standard_Integer& VIndex) const;
0085
0086 void SetPolesColor (const Draw_Color& theColor) { polesLook = theColor; }
0087
0088 void SetKnotsColor (const Draw_Color& theColor) { knotsLook = theColor; }
0089
0090 void SetKnotsShape (const Draw_MarkerShape theShape) { knotsForm = theShape; }
0091
0092 Draw_MarkerShape KnotsShape() const { return knotsForm; }
0093
0094 Draw_Color KnotsColor() const { return knotsLook; }
0095
0096 Draw_Color PolesColor() const { return polesLook; }
0097
0098
0099 Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
0100
0101 private:
0102
0103 Standard_Boolean drawPoles;
0104 Standard_Boolean drawKnots;
0105 Standard_Boolean knotsIsos;
0106 Draw_MarkerShape knotsForm;
0107 Draw_Color knotsLook;
0108 Standard_Integer knotsDim;
0109 Draw_Color polesLook;
0110
0111 };
0112
0113 #endif