0027105: Make code ISO-compliant [-Wpedantic fixes]
[occt.git] / src / DrawTrSurf / DrawTrSurf_BSplineSurface.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-05-22
2// Created by: Jean Claude VAUTHIER
3// Copyright (c) 1992-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _DrawTrSurf_BSplineSurface_HeaderFile
18#define _DrawTrSurf_BSplineSurface_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <Standard_Boolean.hxx>
24#include <Draw_MarkerShape.hxx>
25#include <Draw_Color.hxx>
26#include <Standard_Integer.hxx>
27#include <DrawTrSurf_Surface.hxx>
28#include <Standard_Real.hxx>
29class Geom_BSplineSurface;
30class Draw_Color;
31class Draw_Display;
32class Draw_Drawable3D;
33
34
35class DrawTrSurf_BSplineSurface;
36DEFINE_STANDARD_HANDLE(DrawTrSurf_BSplineSurface, DrawTrSurf_Surface)
37
38
39//! This class defines a drawable BSplineSurface.
40//! With this class you can draw the control points and the knots
41//! of the surface.
42//! You can use the general class Surface from DrawTrSurf too,
43//! if you just want to sea boundaries and isoparametric curves.
44class DrawTrSurf_BSplineSurface : public DrawTrSurf_Surface
45{
46
47public:
48
49
50 //! default drawing mode.
51 //! The isoparametric curves corresponding to the knots values are
52 //! drawn.
53 //! The control points and the knots points are drawn.
54 //! The boundaries are yellow, the isoparametric curves are blues.
55 //! For the discretisation 50 points are computed in each parametric
56 //! direction.
57 Standard_EXPORT DrawTrSurf_BSplineSurface(const Handle(Geom_BSplineSurface)& S);
58
59
60 //! The isoparametric curves corresponding to the knots values are
61 //! drawn.
62 Standard_EXPORT DrawTrSurf_BSplineSurface(const Handle(Geom_BSplineSurface)& S, const Draw_Color& BoundsColor, const Draw_Color& IsosColor, const Draw_Color& PolesColor, const Draw_Color& KnotsColor, const Draw_MarkerShape KnotsShape, const Standard_Integer KnotsSize, const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots, const Standard_Integer Discret, const Standard_Real Deflection, const Standard_Integer DrawMode);
63
64 //! Parametric equidistant iso curves are drawn.
65 Standard_EXPORT DrawTrSurf_BSplineSurface(const Handle(Geom_BSplineSurface)& S, const Standard_Integer NbUIsos, const Standard_Integer NbVIsos, const Draw_Color& BoundsColor, const Draw_Color& IsosColor, const Draw_Color& PolesColor, const Draw_Color& KnotsColor, const Draw_MarkerShape KnotsShape, const Standard_Integer KnotsSize, const Standard_Boolean ShowPoles, const Standard_Boolean ShowKnots, const Standard_Integer Discret, const Standard_Real Deflection, const Standard_Integer DrawMode);
66
67 Standard_EXPORT void DrawOn (Draw_Display& dis) const Standard_OVERRIDE;
68
69 Standard_EXPORT void ShowPoles();
70
71 Standard_EXPORT void ShowKnots();
72
73 //! change the number of isoparametric curves to be drawn.
74 Standard_EXPORT virtual void ShowIsos (const Standard_Integer Nu, const Standard_Integer Nv) Standard_OVERRIDE;
75
76 //! change the number of isoparametric curves to be drawn.
77 Standard_EXPORT void ShowKnotsIsos();
78
79 //! rub out all the isoparametric curves.
80 Standard_EXPORT virtual void ClearIsos() Standard_OVERRIDE;
81
82 Standard_EXPORT void ClearPoles();
83
84 Standard_EXPORT void ClearKnots();
85
86 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;
87
88 Standard_EXPORT void FindUKnot (const Standard_Real X, const Standard_Real Y, const Draw_Display& D, const Standard_Real Prec, Standard_Integer& UIndex) const;
89
90 Standard_EXPORT void FindVKnot (const Standard_Real X, const Standard_Real Y, const Draw_Display& D, const Standard_Real Prec, Standard_Integer& VIndex) const;
91
92 void SetPolesColor (const Draw_Color& aColor);
93
94 void SetKnotsColor (const Draw_Color& aColor);
95
96 void SetKnotsShape (const Draw_MarkerShape Shape);
97
98 Draw_MarkerShape KnotsShape() const;
99
100 Draw_Color KnotsColor() const;
101
102 Draw_Color PolesColor() const;
103
104 //! For variable copy.
105 Standard_EXPORT virtual Handle(Draw_Drawable3D) Copy() const Standard_OVERRIDE;
106
107
108
109
92efcf78 110 DEFINE_STANDARD_RTTIEXT(DrawTrSurf_BSplineSurface,DrawTrSurf_Surface)
42cf5bc1 111
112protected:
113
114
115
116
117private:
118
119
120 Standard_Boolean drawPoles;
121 Standard_Boolean drawKnots;
122 Standard_Boolean knotsIsos;
123 Draw_MarkerShape knotsForm;
124 Draw_Color knotsLook;
125 Standard_Integer knotsDim;
126 Draw_Color polesLook;
127
128
129};
130
131
132#include <DrawTrSurf_BSplineSurface.lxx>
133
134
135
136
137
138#endif // _DrawTrSurf_BSplineSurface_HeaderFile