e1eb39d2 |
1 | // Copyright (c) 2021 OPEN CASCADE SAS |
2 | // |
3 | // This file is part of Open CASCADE Technology software library. |
4 | // |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
10 | // |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
13 | |
14 | #include <SelectMgr_BaseIntersector.hxx> |
15 | |
16 | #include <Graphic3d_Camera.hxx> |
17 | |
18 | IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_BaseIntersector, Standard_Transient) |
19 | |
20 | //======================================================================= |
21 | // function : ScaleAndTransform |
22 | // purpose : |
23 | //======================================================================= |
24 | Handle(SelectMgr_BaseIntersector) SelectMgr_BaseIntersector::ScaleAndTransform (const Standard_Integer, |
25 | const gp_GTrsf&, |
26 | const Handle(SelectMgr_FrustumBuilder)&) const |
27 | { |
28 | return NULL; |
29 | } |
30 | |
31 | //======================================================================= |
32 | // function : Camera |
33 | // purpose : |
34 | //======================================================================= |
35 | const Handle(Graphic3d_Camera)& SelectMgr_BaseIntersector::Camera() const |
36 | { |
37 | static const Handle(Graphic3d_Camera) anEmptyCamera; |
38 | return anEmptyCamera; |
39 | } |
40 | |
41 | //======================================================================= |
42 | // function : SetCamera |
43 | // purpose : |
44 | //======================================================================= |
45 | void SelectMgr_BaseIntersector::SetCamera (const Handle(Graphic3d_Camera)&) |
46 | { |
47 | } |
48 | |
49 | //======================================================================= |
50 | // function : SetCamera |
51 | // purpose : |
52 | //======================================================================= |
53 | void SelectMgr_BaseIntersector::SetCamera (const Graphic3d_Mat4d&, |
54 | const Graphic3d_Mat4d&, |
55 | const Standard_Boolean, |
56 | const Graphic3d_WorldViewProjState&) |
57 | { |
58 | } |
59 | |
60 | //======================================================================= |
61 | // function : ProjectionMatrix |
62 | // purpose : |
63 | //======================================================================= |
64 | const Graphic3d_Mat4d& SelectMgr_BaseIntersector::ProjectionMatrix() const |
65 | { |
66 | static const Graphic3d_Mat4d anEmptyMatrix; |
67 | return anEmptyMatrix; |
68 | } |
69 | |
70 | //======================================================================= |
71 | // function : WorldViewMatrix |
72 | // purpose : |
73 | //======================================================================= |
74 | const Graphic3d_Mat4d& SelectMgr_BaseIntersector::WorldViewMatrix() const |
75 | { |
76 | static const Graphic3d_Mat4d anEmptyMatrix; |
77 | return anEmptyMatrix; |
78 | } |
79 | |
80 | //======================================================================= |
81 | // function : WorldViewProjState |
82 | // purpose : |
83 | //======================================================================= |
84 | const Graphic3d_WorldViewProjState& SelectMgr_BaseIntersector::WorldViewProjState() const |
85 | { |
86 | static const Graphic3d_WorldViewProjState anEmptyState; |
87 | return anEmptyState; |
88 | } |
89 | |
90 | //======================================================================= |
91 | // function : SetPixelTolerance |
92 | // purpose : |
93 | //======================================================================= |
94 | void SelectMgr_BaseIntersector::SetPixelTolerance (const Standard_Integer) |
95 | { |
96 | } |
97 | |
98 | //======================================================================= |
99 | // function : WindowSize |
100 | // purpose : |
101 | //======================================================================= |
102 | void SelectMgr_BaseIntersector::WindowSize (Standard_Integer&, |
103 | Standard_Integer&) const |
104 | { |
105 | } |
106 | |
107 | //======================================================================= |
108 | // function : SetWindowSize |
109 | // purpose : |
110 | //======================================================================= |
111 | void SelectMgr_BaseIntersector::SetWindowSize (const Standard_Integer, |
112 | const Standard_Integer) |
113 | { |
114 | } |
115 | |
116 | //======================================================================= |
117 | // function : SetViewport |
118 | // purpose : |
119 | //======================================================================= |
120 | void SelectMgr_BaseIntersector::SetViewport (const Standard_Real, |
121 | const Standard_Real, |
122 | const Standard_Real, |
123 | const Standard_Real) |
124 | { |
125 | } |
126 | |
127 | //======================================================================= |
128 | // function : GetNearPnt |
129 | // purpose : |
130 | //======================================================================= |
131 | const gp_Pnt& SelectMgr_BaseIntersector::GetNearPnt() const |
132 | { |
133 | static const gp_Pnt anEmptyPnt; |
134 | return anEmptyPnt; |
135 | } |
136 | |
137 | //======================================================================= |
138 | // function : GetFarPnt |
139 | // purpose : |
140 | //======================================================================= |
141 | const gp_Pnt& SelectMgr_BaseIntersector::GetFarPnt() const |
142 | { |
143 | static const gp_Pnt anEmptyPnt(RealLast(), RealLast(), RealLast()); |
144 | return anEmptyPnt; |
145 | } |
146 | |
147 | //======================================================================= |
148 | // function : GetViewRayDirection |
149 | // purpose : |
150 | //======================================================================= |
151 | const gp_Dir& SelectMgr_BaseIntersector::GetViewRayDirection() const |
152 | { |
153 | static const gp_Dir anEmptyDir; |
154 | return anEmptyDir; |
155 | } |
156 | |
157 | //======================================================================= |
158 | // function : GetMousePosition |
159 | // purpose : |
160 | //======================================================================= |
161 | const gp_Pnt2d& SelectMgr_BaseIntersector::GetMousePosition() const |
162 | { |
163 | static const gp_Pnt2d aPnt(RealLast(), RealLast()); |
164 | return aPnt; |
165 | } |
166 | |
167 | //======================================================================= |
03c9cc86 |
168 | // function : OverlapsBox |
e1eb39d2 |
169 | // purpose : |
170 | //======================================================================= |
03c9cc86 |
171 | Standard_Boolean SelectMgr_BaseIntersector::OverlapsBox (const SelectMgr_Vec3&, |
172 | const SelectMgr_Vec3&, |
173 | const SelectMgr_ViewClipRange&, |
174 | SelectBasics_PickResult&) const |
e1eb39d2 |
175 | { |
176 | return Standard_False; |
177 | } |
178 | |
179 | //======================================================================= |
03c9cc86 |
180 | // function : OverlapsBox |
e1eb39d2 |
181 | // purpose : |
182 | //======================================================================= |
03c9cc86 |
183 | Standard_Boolean SelectMgr_BaseIntersector::OverlapsBox (const SelectMgr_Vec3&, |
184 | const SelectMgr_Vec3&, |
185 | Standard_Boolean*) const |
e1eb39d2 |
186 | { |
187 | return Standard_False; |
188 | } |
189 | |
190 | //======================================================================= |
03c9cc86 |
191 | // function : OverlapsPoint |
e1eb39d2 |
192 | // purpose : |
193 | //======================================================================= |
03c9cc86 |
194 | Standard_Boolean SelectMgr_BaseIntersector::OverlapsPoint (const gp_Pnt&, |
195 | const SelectMgr_ViewClipRange&, |
196 | SelectBasics_PickResult&) const |
e1eb39d2 |
197 | { |
198 | return Standard_False; |
199 | } |
200 | |
201 | //======================================================================= |
03c9cc86 |
202 | // function : OverlapsPoint |
e1eb39d2 |
203 | // purpose : |
204 | //======================================================================= |
03c9cc86 |
205 | Standard_Boolean SelectMgr_BaseIntersector::OverlapsPoint (const gp_Pnt& thePnt) const |
e1eb39d2 |
206 | { |
207 | (void )thePnt; |
208 | return Standard_False; |
209 | } |
210 | |
211 | //======================================================================= |
03c9cc86 |
212 | // function : OverlapsPolygon |
e1eb39d2 |
213 | // purpose : |
214 | //======================================================================= |
03c9cc86 |
215 | Standard_Boolean SelectMgr_BaseIntersector::OverlapsPolygon (const TColgp_Array1OfPnt&, |
216 | Select3D_TypeOfSensitivity, |
217 | const SelectMgr_ViewClipRange&, |
218 | SelectBasics_PickResult&) const |
e1eb39d2 |
219 | { |
220 | return Standard_False; |
221 | } |
222 | |
223 | //======================================================================= |
03c9cc86 |
224 | // function : OverlapsTriangle |
e1eb39d2 |
225 | // purpose : |
226 | //======================================================================= |
03c9cc86 |
227 | Standard_Boolean SelectMgr_BaseIntersector::OverlapsTriangle (const gp_Pnt&, |
228 | const gp_Pnt&, |
229 | const gp_Pnt&, |
230 | Select3D_TypeOfSensitivity, |
231 | const SelectMgr_ViewClipRange&, |
232 | SelectBasics_PickResult&) const |
e1eb39d2 |
233 | { |
234 | return Standard_False; |
235 | } |
236 | |
237 | //======================================================================= |
03c9cc86 |
238 | // function : OverlapsSegment |
e1eb39d2 |
239 | // purpose : |
240 | //======================================================================= |
03c9cc86 |
241 | Standard_Boolean SelectMgr_BaseIntersector::OverlapsSegment (const gp_Pnt&, |
242 | const gp_Pnt&, |
243 | const SelectMgr_ViewClipRange&, |
244 | SelectBasics_PickResult&) const |
e1eb39d2 |
245 | { |
246 | return Standard_False; |
247 | } |
248 | |
249 | //======================================================================= |
250 | // function : DistToGeometryCenter |
251 | // purpose : |
252 | //======================================================================= |
253 | Standard_Real SelectMgr_BaseIntersector::DistToGeometryCenter (const gp_Pnt&) const |
254 | { |
255 | return RealLast(); |
256 | } |
257 | |
258 | //======================================================================= |
259 | // function : DetectedPoint |
260 | // purpose : |
261 | //======================================================================= |
262 | gp_Pnt SelectMgr_BaseIntersector::DetectedPoint (const Standard_Real) const |
263 | { |
264 | return gp_Pnt(RealLast(), RealLast(), RealLast()); |
265 | } |
266 | |
267 | //======================================================================= |
268 | //function : DumpJson |
269 | //purpose : |
270 | //======================================================================= |
271 | void SelectMgr_BaseIntersector::DumpJson (Standard_OStream& theOStream, Standard_Integer) const |
272 | { |
273 | OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream) |
274 | |
275 | OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, mySelectionType) |
276 | } |