b311480e |
1 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
2 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
3 | // |
973c2be1 |
4 | // This file is part of Open CASCADE Technology software library. |
b311480e |
5 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
11 | // |
973c2be1 |
12 | // Alternatively, this file may be used under the terms of Open CASCADE |
13 | // commercial license or contractual agreement. |
b311480e |
14 | |
7fd59977 |
15 | #include <AppCont_FunctionTool.ixx> |
16 | |
17 | #include <AppCont_Function.hxx> |
18 | #include <TColgp_Array1OfPnt.hxx> |
19 | #include <TColgp_Array1OfVec.hxx> |
20 | #include <gp_Pnt.hxx> |
21 | #include <gp_Vec.hxx> |
22 | |
b311480e |
23 | |
7fd59977 |
24 | Standard_Real AppCont_FunctionTool::FirstParameter |
25 | (const AppCont_Function& F) |
26 | { |
27 | return F.FirstParameter(); |
28 | } |
29 | |
30 | Standard_Real AppCont_FunctionTool::LastParameter |
31 | (const AppCont_Function& F) |
32 | { |
33 | return F.LastParameter(); |
34 | } |
35 | |
36 | Standard_Integer AppCont_FunctionTool::NbP2d |
37 | (const AppCont_Function&) |
38 | { |
39 | return (0); |
40 | } |
41 | |
42 | |
43 | Standard_Integer AppCont_FunctionTool::NbP3d |
44 | (const AppCont_Function&) |
45 | { |
46 | return (1); |
47 | } |
48 | |
49 | void AppCont_FunctionTool::Value(const AppCont_Function& F, |
50 | const Standard_Real U, |
51 | TColgp_Array1OfPnt& tabPt) |
52 | { |
53 | tabPt(tabPt.Lower()) = F.Value(U); |
54 | } |
55 | |
56 | |
57 | |
58 | |
59 | Standard_Boolean AppCont_FunctionTool::D1 |
60 | (const AppCont_Function& F, |
61 | const Standard_Real U, |
62 | TColgp_Array1OfVec& tabV) |
63 | { |
64 | gp_Pnt P; |
65 | gp_Vec V; |
66 | Standard_Boolean Ok = F.D1(U, P, V); |
67 | tabV(tabV.Lower()) = V; |
68 | return Ok; |
69 | } |
70 | |
71 | |
72 | |
73 | |
74 | |
75 | |
76 | void AppCont_FunctionTool::Value(const AppCont_Function&, |
77 | const Standard_Real, |
78 | TColgp_Array1OfPnt2d&) |
79 | { |
80 | } |
81 | |
82 | |
83 | void AppCont_FunctionTool::Value(const AppCont_Function&, |
84 | const Standard_Real, |
85 | TColgp_Array1OfPnt&, |
86 | TColgp_Array1OfPnt2d&) |
87 | { |
88 | } |
89 | |
90 | |
91 | |
92 | Standard_Boolean AppCont_FunctionTool::D1 |
93 | (const AppCont_Function&, |
94 | const Standard_Real, |
95 | TColgp_Array1OfVec2d&) |
96 | { |
97 | return (Standard_True); |
98 | } |
99 | |
100 | |
101 | Standard_Boolean AppCont_FunctionTool::D1 |
102 | (const AppCont_Function&, |
103 | const Standard_Real, |
104 | TColgp_Array1OfVec&, |
105 | TColgp_Array1OfVec2d&) |
106 | { |
107 | return (Standard_True); |
108 | } |
109 | |