d660a72a |
1 | // Created on: 2015-09-21 |
2 | // Copyright (c) 2015 OPEN CASCADE SAS |
3 | // |
4 | // This file is part of Open CASCADE Technology software library. |
5 | // |
6 | // This library is free software; you can redistribute it and/or modify it under |
7 | // the terms of the GNU Lesser General Public License version 2.1 as published |
8 | // by the Free Software Foundation, with special exception defined in the file |
9 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
10 | // distribution for complete text of the license and disclaimer of any warranty. |
11 | // |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
14 | |
15 | #ifndef _Geom2dEvaluator_Curve_HeaderFile |
16 | #define _Geom2dEvaluator_Curve_HeaderFile |
17 | |
18 | #include <Standard_Transient.hxx> |
19 | #include <Standard_Type.hxx> |
20 | |
21 | class gp_Pnt2d; |
22 | class gp_Vec2d; |
23 | |
24 | //! Interface for calculation of values and derivatives for different kinds of curves in 2D. |
25 | //! Works both with adaptors and curves. |
26 | class Geom2dEvaluator_Curve : public Standard_Transient |
27 | { |
28 | public: |
29 | Geom2dEvaluator_Curve() {} |
30 | |
31 | //! Value of 2D curve |
32 | virtual void D0(const Standard_Real theU, |
33 | gp_Pnt2d& theValue) const = 0; |
34 | //! Value and first derivatives of curve |
35 | virtual void D1(const Standard_Real theU, |
36 | gp_Pnt2d& theValue, gp_Vec2d& theD1) const = 0; |
37 | //! Value, first and second derivatives of curve |
38 | virtual void D2(const Standard_Real theU, |
39 | gp_Pnt2d& theValue, gp_Vec2d& theD1, gp_Vec2d& theD2) const = 0; |
40 | //! Value, first, second and third derivatives of curve |
41 | virtual void D3(const Standard_Real theU, |
42 | gp_Pnt2d& theValue, gp_Vec2d& theD1, gp_Vec2d& theD2, gp_Vec2d& theD3) const = 0; |
43 | //! Calculates N-th derivatives of curve, where N = theDerU. Raises if N < 1 |
44 | virtual gp_Vec2d DN(const Standard_Real theU, |
45 | const Standard_Integer theDerU) const = 0; |
46 | |
872a7e3a |
47 | virtual Handle(Geom2dEvaluator_Curve) ShallowCopy() const = 0; |
48 | |
92efcf78 |
49 | DEFINE_STANDARD_RTTI_INLINE(Geom2dEvaluator_Curve,Standard_Transient) |
d660a72a |
50 | }; |
51 | |
52 | DEFINE_STANDARD_HANDLE(Geom2dEvaluator_Curve, Standard_Transient) |
53 | |
54 | |
55 | #endif // _Geom2dEvaluator_Curve_HeaderFile |