b311480e |
1 | // Copyright (c) 1998-1999 Matra Datavision |
2 | // Copyright (c) 1999-2012 OPEN CASCADE SAS |
3 | // |
4 | // The content of this file is subject to the Open CASCADE Technology Public |
5 | // License Version 6.5 (the "License"). You may not use the content of this file |
6 | // except in compliance with the License. Please obtain a copy of the License |
7 | // at http://www.opencascade.org and read it completely before using this file. |
8 | // |
9 | // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
10 | // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
11 | // |
12 | // The Original Code and all software distributed under the License is |
13 | // distributed on an "AS IS" basis, without warranty of any kind, and the |
14 | // Initial Developer hereby disclaims all such warranties, including without |
15 | // limitation, any warranties of merchantability, fitness for a particular |
16 | // purpose or non-infringement. Please see the License for the specific terms |
17 | // and conditions governing the rights and limitations under the License. |
18 | |
7fd59977 |
19 | |
20 | |
21 | #include <PPoly_PolygonOnTriangulation.ixx> |
22 | |
23 | //======================================================================= |
24 | //function : PPoly_PolygonOnTriangulation |
25 | //purpose : |
26 | //======================================================================= |
27 | |
28 | PPoly_PolygonOnTriangulation::PPoly_PolygonOnTriangulation() |
29 | { |
30 | } |
31 | |
32 | //======================================================================= |
33 | //function : PPoly_PolygonOnTriangulation |
34 | //purpose : |
35 | //======================================================================= |
36 | |
37 | PPoly_PolygonOnTriangulation::PPoly_PolygonOnTriangulation |
38 | (const Handle(PColStd_HArray1OfInteger)& Nodes, |
39 | const Standard_Real Defl) : |
40 | myDeflection(Defl), |
41 | myNodes(Nodes) |
42 | { |
43 | } |
44 | |
45 | //======================================================================= |
46 | //function : PPoly_PolygonOnTriangulation |
47 | //purpose : |
48 | //======================================================================= |
49 | |
50 | PPoly_PolygonOnTriangulation::PPoly_PolygonOnTriangulation |
51 | (const Handle(PColStd_HArray1OfInteger)& Nodes, |
52 | const Standard_Real Defl, |
53 | const Handle(PColStd_HArray1OfReal)& Param) : |
54 | myDeflection(Defl), |
55 | myNodes(Nodes), |
56 | myParameters(Param) |
57 | { |
58 | } |
59 | |
60 | //======================================================================= |
61 | //function : Deflection |
62 | //purpose : |
63 | //======================================================================= |
64 | |
65 | Standard_Real PPoly_PolygonOnTriangulation::Deflection() const |
66 | { |
67 | return myDeflection; |
68 | } |
69 | |
70 | //======================================================================= |
71 | //function : Deflection |
72 | //purpose : |
73 | //======================================================================= |
74 | |
75 | void PPoly_PolygonOnTriangulation::Deflection(const Standard_Real D) |
76 | { |
77 | myDeflection = D; |
78 | } |
79 | |
80 | //======================================================================= |
81 | //function : NbNodes |
82 | //purpose : |
83 | //======================================================================= |
84 | |
85 | Standard_Integer PPoly_PolygonOnTriangulation::NbNodes() const |
86 | { |
87 | return myNodes->Length(); |
88 | } |
89 | |
90 | //======================================================================= |
91 | //function : Nodes |
92 | //purpose : |
93 | //======================================================================= |
94 | |
95 | Handle(PColStd_HArray1OfInteger) PPoly_PolygonOnTriangulation::Nodes() const |
96 | { |
97 | return myNodes; |
98 | } |
99 | |
100 | //======================================================================= |
101 | //function : Nodes |
102 | //purpose : |
103 | //======================================================================= |
104 | |
105 | void PPoly_PolygonOnTriangulation::Nodes(const Handle(PColStd_HArray1OfInteger)& Nodes) |
106 | { |
107 | myNodes = Nodes; |
108 | } |
109 | |
110 | |
111 | //======================================================================= |
112 | //function : HasParameters |
113 | //purpose : |
114 | //======================================================================= |
115 | |
116 | Standard_Boolean PPoly_PolygonOnTriangulation::HasParameters() const |
117 | { |
118 | return (!myParameters.IsNull()); |
119 | } |
120 | |
121 | //======================================================================= |
122 | //function : Parameters |
123 | //purpose : |
124 | //======================================================================= |
125 | |
126 | Handle(PColStd_HArray1OfReal) PPoly_PolygonOnTriangulation::Parameters() const |
127 | { |
128 | return myParameters; |
129 | } |
130 | |
131 | //======================================================================= |
132 | //function : Parameters |
133 | //purpose : |
134 | //======================================================================= |
135 | |
136 | void PPoly_PolygonOnTriangulation::Parameters(const Handle(PColStd_HArray1OfReal)& Param) |
137 | { |
138 | myParameters = Param; |
139 | } |
140 | |