0024927: Getting rid of "Persistent" functionality -- Code
[occt.git] / src / PGeom2d / PGeom2d_BSplineCurve.cxx
1 // Created on: 1993-03-03
2 // Created by: Philippe DAUTRY
3 // Copyright (c) 1993-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 #include <PGeom2d_BSplineCurve.ixx>
18
19 //=======================================================================
20 //function : PGeom2d_BSplineCurve
21 //purpose  : 
22 //=======================================================================
23
24 PGeom2d_BSplineCurve::PGeom2d_BSplineCurve()
25 {}
26
27
28 //=======================================================================
29 //function : PGeom2d_BSplineCurve
30 //purpose  : 
31 //=======================================================================
32
33 PGeom2d_BSplineCurve::PGeom2d_BSplineCurve
34   (const Standard_Boolean aRational,
35    const Standard_Boolean aPeriodic,
36    const Standard_Integer aSpineDegree,
37    const Handle(PColgp_HArray1OfPnt2d)& aPoles,
38    const Handle(PColStd_HArray1OfReal)& aWeights,
39    const Handle(PColStd_HArray1OfReal)& aKnots,
40    const Handle(PColStd_HArray1OfInteger)& aMultiplicities) :
41   rational(aRational),
42   periodic(aPeriodic),
43   spineDegree(aSpineDegree),
44   poles(aPoles),
45   weights(aWeights),
46   knots(aKnots),
47   multiplicities(aMultiplicities)
48 {}
49
50
51 //=======================================================================
52 //function : Periodic
53 //purpose  : 
54 //=======================================================================
55
56 void  PGeom2d_BSplineCurve::Periodic(const Standard_Boolean aPeriodic)
57 { periodic = aPeriodic; }
58
59
60 //=======================================================================
61 //function : Periodic
62 //purpose  : 
63 //=======================================================================
64
65 Standard_Boolean  PGeom2d_BSplineCurve::Periodic() const 
66 { return periodic; }
67
68
69 //=======================================================================
70 //function : Rational
71 //purpose  : 
72 //=======================================================================
73
74 void  PGeom2d_BSplineCurve::Rational(const Standard_Boolean aRational)
75 { rational = aRational; }
76
77
78 //=======================================================================
79 //function : Rational
80 //purpose  : 
81 //=======================================================================
82
83 Standard_Boolean  PGeom2d_BSplineCurve::Rational() const 
84 { return rational; }
85
86
87 //=======================================================================
88 //function : SpineDegree
89 //purpose  : 
90 //=======================================================================
91
92 void  PGeom2d_BSplineCurve::SpineDegree(const Standard_Integer aSpineDegree)
93 { spineDegree = aSpineDegree; }
94
95
96 //=======================================================================
97 //function : SpineDegree
98 //purpose  : 
99 //=======================================================================
100
101 Standard_Integer  PGeom2d_BSplineCurve::SpineDegree() const 
102 { return spineDegree; }
103
104
105 //=======================================================================
106 //function : Poles
107 //purpose  : 
108 //=======================================================================
109
110 void  PGeom2d_BSplineCurve::Poles(const Handle(PColgp_HArray1OfPnt2d)& aPoles)
111 { poles = aPoles; }
112
113
114 //=======================================================================
115 //function : Poles
116 //purpose  : 
117 //=======================================================================
118
119 Handle(PColgp_HArray1OfPnt2d)  PGeom2d_BSplineCurve::Poles() const 
120 { return poles; }
121
122
123 //=======================================================================
124 //function : Weights
125 //purpose  : 
126 //=======================================================================
127
128 void  PGeom2d_BSplineCurve::Weights
129   (const Handle(PColStd_HArray1OfReal)& aWeights)
130 { weights = aWeights; }
131
132
133 //=======================================================================
134 //function : Weights
135 //purpose  : 
136 //=======================================================================
137
138 Handle(PColStd_HArray1OfReal)  PGeom2d_BSplineCurve::Weights() const 
139 { return weights; }
140
141
142 //=======================================================================
143 //function : Knots
144 //purpose  : 
145 //=======================================================================
146
147 void  PGeom2d_BSplineCurve::Knots
148   (const Handle(PColStd_HArray1OfReal)& aKnots)
149 { knots = aKnots; }
150
151
152 //=======================================================================
153 //function : Knots
154 //purpose  : 
155 //=======================================================================
156
157 Handle(PColStd_HArray1OfReal)  PGeom2d_BSplineCurve::Knots() const 
158 { return knots; }
159
160
161 //=======================================================================
162 //function : Multiplicities
163 //purpose  : 
164 //=======================================================================
165
166 void  PGeom2d_BSplineCurve::Multiplicities
167   (const Handle(PColStd_HArray1OfInteger)& aMultiplicities)
168 { multiplicities = aMultiplicities; }
169
170
171 //=======================================================================
172 //function : Multiplicities
173 //purpose  : 
174 //=======================================================================
175
176 Handle(PColStd_HArray1OfInteger)
177      PGeom2d_BSplineCurve::Multiplicities() const 
178 { return multiplicities; }