b311480e |
1 | // Created on: 1996-12-05 |
2 | // Created by: Odile Olivier |
3 | // Copyright (c) 1996-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | #define BUC60915 //GG 05/06/01 Enable to compute the requested arrow size |
18 | // if any in all dimensions. |
19 | |
20 | //======================================================================= |
21 | //function : FirstShape |
22 | //purpose : |
23 | //======================================================================= |
24 | |
25 | inline const TopoDS_Shape& AIS_Relation::FirstShape() const |
26 | { |
27 | return myFShape; |
28 | } |
29 | |
30 | |
31 | //======================================================================= |
32 | //function : SecondShape |
33 | //purpose : |
34 | //======================================================================= |
35 | |
36 | inline const TopoDS_Shape& AIS_Relation::SecondShape() const |
37 | { |
38 | return mySShape; |
39 | } |
40 | |
41 | |
42 | //======================================================================= |
43 | //function : SetBndBox |
44 | //purpose : |
45 | //======================================================================= |
46 | |
47 | inline void AIS_Relation::SetBndBox( const Standard_Real Xmin, |
48 | const Standard_Real Ymin, |
49 | const Standard_Real Zmin, |
50 | const Standard_Real Xmax, |
51 | const Standard_Real Ymax, |
52 | const Standard_Real Zmax ) |
53 | { |
54 | myBndBox.Update( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax ); |
55 | myIsSetBndBox = Standard_True; |
56 | } |
57 | |
58 | inline void AIS_Relation::UnsetBndBox() |
59 | { |
60 | myIsSetBndBox = Standard_False; |
61 | } |
62 | |
63 | //======================================================================= |
64 | //function : :Plane |
65 | //purpose : |
66 | //======================================================================= |
67 | |
68 | inline const Handle(Geom_Plane)& AIS_Relation::Plane() const |
69 | { |
70 | return myPlane; |
71 | } |
72 | |
73 | //======================================================================= |
74 | //function : SetPlane |
75 | //purpose : |
76 | //======================================================================= |
77 | |
78 | inline void AIS_Relation::SetPlane(const Handle(Geom_Plane)& aPlane) |
79 | { |
80 | myPlane = aPlane; |
81 | } |
82 | |
83 | //======================================================================= |
84 | //function : Value |
85 | //purpose : |
86 | //======================================================================= |
87 | |
88 | inline Standard_Real AIS_Relation::Value() const |
89 | { |
90 | return myVal; |
91 | } |
92 | |
93 | //======================================================================= |
94 | //function : SetValue |
95 | //purpose : |
96 | //======================================================================= |
97 | |
98 | inline void AIS_Relation::SetValue(const Standard_Real aVal) |
99 | { |
100 | myVal = aVal; |
101 | } |
102 | |
103 | //======================================================================= |
104 | //function : Position |
105 | //purpose : |
106 | //======================================================================= |
107 | |
108 | inline const gp_Pnt& AIS_Relation::Position() const |
109 | { |
110 | return myPosition; |
111 | } |
112 | |
113 | |
114 | //======================================================================= |
115 | //function : SetPosition |
116 | //purpose : |
117 | //======================================================================= |
118 | |
119 | inline void AIS_Relation::SetPosition(const gp_Pnt& aPosition) |
120 | { |
121 | myPosition = aPosition; |
122 | myAutomaticPosition = Standard_False; |
123 | } |
124 | |
125 | //======================================================================= |
126 | //function : Text |
127 | //purpose : |
128 | //======================================================================= |
129 | |
130 | inline const TCollection_ExtendedString& AIS_Relation::Text() const |
131 | { |
132 | return myText; |
133 | } |
134 | |
135 | //======================================================================= |
136 | //function : SetText |
137 | //purpose : |
138 | //======================================================================= |
139 | |
140 | inline void AIS_Relation::SetText(const TCollection_ExtendedString& aText) |
141 | { |
142 | myText = aText; |
143 | } |
144 | |
145 | //======================================================================= |
146 | //function : ArrowSize |
147 | //purpose : |
148 | //======================================================================= |
149 | |
150 | inline Standard_Real AIS_Relation::ArrowSize() const |
151 | { |
152 | return myArrowSize; |
153 | } |
154 | |
155 | //======================================================================= |
156 | //function : SetArrowSize |
157 | //purpose : |
158 | //======================================================================= |
159 | |
160 | inline void AIS_Relation::SetArrowSize(const Standard_Real anArrowSize) |
161 | { |
162 | myArrowSize = anArrowSize; |
163 | #ifdef BUC60915 |
164 | myArrowSizeIsDefined = Standard_True; |
165 | #endif |
166 | } |
167 | |
168 | //======================================================================= |
169 | //function : SymbolPrs |
170 | //purpose : |
171 | //======================================================================= |
172 | |
173 | inline DsgPrs_ArrowSide AIS_Relation::SymbolPrs() const |
174 | { |
175 | return mySymbolPrs; |
176 | } |
177 | |
178 | //======================================================================= |
179 | //function : SetSymbolPrs |
180 | //purpose : |
181 | //======================================================================= |
182 | inline void AIS_Relation::SetSymbolPrs(const DsgPrs_ArrowSide aSymbolPrs) |
183 | { |
184 | mySymbolPrs = aSymbolPrs; |
185 | } |
186 | |
187 | |
188 | |
189 | //======================================================================= |
190 | //function : KindOfInteractive |
191 | //purpose : |
192 | //======================================================================= |
193 | inline AIS_KindOfInteractive AIS_Relation::Type() const |
194 | {return AIS_KOI_Relation;} |
195 | |
196 | |
197 | //======================================================================= |
198 | //function : SetExtShape |
199 | //purpose : |
200 | //======================================================================= |
201 | inline void AIS_Relation::SetExtShape(const Standard_Integer ExtSh) |
202 | {myExtShape = ExtSh;} |
203 | |
204 | |
205 | //======================================================================= |
206 | //function : ExtShape |
207 | //purpose : |
208 | //======================================================================= |
209 | inline Standard_Integer AIS_Relation::ExtShape() const |
210 | {return myExtShape;} |
211 | |
212 | |
213 | //======================================================================= |
214 | //function : SetAutomaticPosition |
215 | //purpose : |
216 | //======================================================================= |
217 | inline void AIS_Relation::SetAutomaticPosition ( const Standard_Boolean aStatus ) |
218 | { |
219 | myAutomaticPosition = aStatus ; |
220 | } |
221 | |
222 | //======================================================================= |
223 | //function : AutomaticPosition |
224 | //purpose : |
225 | //======================================================================= |
226 | inline Standard_Boolean AIS_Relation::AutomaticPosition () const |
227 | { |
228 | return myAutomaticPosition; |
229 | } |