Main MRPT website > C++ reference for MRPT 1.5.6
corner_10.h
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 // ---------------------------------------------------------------------------
11 // LICENSING: This file is a slightly-modified version of part of libcvd,
12 // released under LGPL 2.1 by Edward Rosten
13 // ---------------------------------------------------------------------------
14 
15 template <class C> inline bool is_corner_10(const uint8_t* p, const int w, const int barrier) {
16  const int w3 = 3*w;
17  const int t = C::prep_t(*p, barrier);
18  if (!C::eval(p[-1-w3],t)) { // ???????????????-
19  if (!C::eval(p[3+w],t)) { // ?????-?????????-
20  return false;
21  } // ?????@?????????-
22  if (!C::eval(p[2+2*w],t)) { // ?????@-????????-
23  return false;
24  } // ?????@@????????-
25  if (!C::eval(p[-1+w3],t)) { // ?????@@??-?????-
26  return false;
27  } // ?????@@??@?????-
28  if (!C::eval(p[1+w3],t)) { // ?????@@-?@?????-
29  return false;
30  } // ?????@@@?@?????-
31  if (!C::eval(p[w3],t)) { // ?????@@@-@?????-
32  return false;
33  } // ?????@@@@@?????-
34  if (!C::eval(p[-2+2*w],t)) { // ?????@@@@@-????-
35  if (!C::eval(p[-w3],t)) { // -????@@@@@-????-
36  return false;
37  } // @????@@@@@-????-
38  if (!C::eval(p[3],t)) { // @???-@@@@@-????-
39  return false;
40  } // @???@@@@@@-????-
41  if (!C::eval(p[1-w3],t)) { // @-??@@@@@@-????-
42  return false;
43  } // @@??@@@@@@-????-
44  if (!C::eval(p[2-2*w],t)) { // @@-?@@@@@@-????-
45  return false;
46  } // @@@?@@@@@@-????-
47  if (!C::eval(p[3-w],t)) { // @@@-@@@@@@-????-
48  return false;
49  } // @@@@@@@@@@-????-
50  return true;
51  } // ?????@@@@@@????-
52  if (!C::eval(p[-3+w],t)) { // ?????@@@@@@-???-
53  if (!C::eval(p[3],t)) { // ????-@@@@@@-???-
54  return false;
55  } // ????@@@@@@@-???-
56  if (!C::eval(p[1-w3],t)) { // ?-??@@@@@@@-???-
57  return false;
58  } // ?@??@@@@@@@-???-
59  if (!C::eval(p[2-2*w],t)) { // ?@-?@@@@@@@-???-
60  return false;
61  } // ?@@?@@@@@@@-???-
62  if (!C::eval(p[3-w],t)) { // ?@@-@@@@@@@-???-
63  return false;
64  } // ?@@@@@@@@@@-???-
65  return true;
66  } // ?????@@@@@@@???-
67  if (!C::eval(p[3],t)) { // ????-@@@@@@@???-
68  if (!C::eval(p[-3],t)) { // ????-@@@@@@@-??-
69  return false;
70  } // ????-@@@@@@@@??-
71  if (!C::eval(p[-3-w],t)) { // ????-@@@@@@@@-?-
72  return false;
73  } // ????-@@@@@@@@@?-
74  if (!C::eval(p[-2-2*w],t)) { // ????-@@@@@@@@@--
75  return false;
76  } // ????-@@@@@@@@@@-
77  return true;
78  } // ????@@@@@@@@???-
79  if (!C::eval(p[3-w],t)) { // ???-@@@@@@@@???-
80  if (!C::eval(p[-3],t)) { // ???-@@@@@@@@-??-
81  return false;
82  } // ???-@@@@@@@@@??-
83  if (!C::eval(p[-3-w],t)) { // ???-@@@@@@@@@-?-
84  return false;
85  } // ???-@@@@@@@@@@?-
86  return true;
87  } // ???@@@@@@@@@???-
88  if (!C::eval(p[-3],t)) { // ???@@@@@@@@@-??-
89  if (!C::eval(p[2-2*w],t)) { // ??-@@@@@@@@@-??-
90  return false;
91  } // ??@@@@@@@@@@-??-
92  return true;
93  } // ???@@@@@@@@@@??-
94  return true;
95  } // ???????????????@
96  if (!C::eval(p[-2-2*w],t)) { // ??????????????-@
97  if (!C::eval(p[3],t)) { // ????-?????????-@
98  return false;
99  } // ????@?????????-@
100  if (!C::eval(p[3+w],t)) { // ????@-????????-@
101  return false;
102  } // ????@@????????-@
103  if (!C::eval(p[w3],t)) { // ????@@??-?????-@
104  return false;
105  } // ????@@??@?????-@
106  if (!C::eval(p[1+w3],t)) { // ????@@?-@?????-@
107  return false;
108  } // ????@@?@@?????-@
109  if (!C::eval(p[2+2*w],t)) { // ????@@-@@?????-@
110  return false;
111  } // ????@@@@@?????-@
112  if (!C::eval(p[3-w],t)) { // ???-@@@@@?????-@
113  if (!C::eval(p[-1+w3],t)) { // ???-@@@@@-????-@
114  return false;
115  } // ???-@@@@@@????-@
116  if (!C::eval(p[-3-w],t)) { // ???-@@@@@@???--@
117  return false;
118  } // ???-@@@@@@???@-@
119  if (!C::eval(p[-2+2*w],t)) { // ???-@@@@@@-??@-@
120  return false;
121  } // ???-@@@@@@@??@-@
122  if (!C::eval(p[-3+w],t)) { // ???-@@@@@@@-?@-@
123  return false;
124  } // ???-@@@@@@@@?@-@
125  if (!C::eval(p[-3],t)) { // ???-@@@@@@@@-@-@
126  return false;
127  } // ???-@@@@@@@@@@-@
128  return true;
129  } // ???@@@@@@?????-@
130  if (!C::eval(p[2-2*w],t)) { // ??-@@@@@@?????-@
131  if (!C::eval(p[-3],t)) { // ??-@@@@@@???-?-@
132  return false;
133  } // ??-@@@@@@???@?-@
134  if (!C::eval(p[-1+w3],t)) { // ??-@@@@@@-??@?-@
135  return false;
136  } // ??-@@@@@@@??@?-@
137  if (!C::eval(p[-2+2*w],t)) { // ??-@@@@@@@-?@?-@
138  return false;
139  } // ??-@@@@@@@@?@?-@
140  if (!C::eval(p[-3+w],t)) { // ??-@@@@@@@@-@?-@
141  return false;
142  } // ??-@@@@@@@@@@?-@
143  return true;
144  } // ??@@@@@@@?????-@
145  if (!C::eval(p[1-w3],t)) { // ?-@@@@@@@?????-@
146  if (!C::eval(p[-1+w3],t)) { // ?-@@@@@@@-????-@
147  return false;
148  } // ?-@@@@@@@@????-@
149  if (!C::eval(p[-2+2*w],t)) { // ?-@@@@@@@@-???-@
150  return false;
151  } // ?-@@@@@@@@@???-@
152  if (!C::eval(p[-3+w],t)) { // ?-@@@@@@@@@-??-@
153  return false;
154  } // ?-@@@@@@@@@@??-@
155  return true;
156  } // ?@@@@@@@@?????-@
157  if (!C::eval(p[-w3],t)) { // -@@@@@@@@?????-@
158  if (!C::eval(p[-1+w3],t)) { // -@@@@@@@@-????-@
159  return false;
160  } // -@@@@@@@@@????-@
161  if (!C::eval(p[-2+2*w],t)) { // -@@@@@@@@@-???-@
162  return false;
163  } // -@@@@@@@@@@???-@
164  return true;
165  } // @@@@@@@@@?????-@
166  return true;
167  } // ??????????????@@
168  if (!C::eval(p[-3-w],t)) { // ?????????????-@@
169  if (!C::eval(p[1+w3],t)) { // ???????-?????-@@
170  return false;
171  } // ???????@?????-@@
172  if (!C::eval(p[3-w],t)) { // ???-???@?????-@@
173  return false;
174  } // ???@???@?????-@@
175  if (!C::eval(p[3],t)) { // ???@-??@?????-@@
176  return false;
177  } // ???@@??@?????-@@
178  if (!C::eval(p[3+w],t)) { // ???@@-?@?????-@@
179  return false;
180  } // ???@@@?@?????-@@
181  if (!C::eval(p[2+2*w],t)) { // ???@@@-@?????-@@
182  return false;
183  } // ???@@@@@?????-@@
184  if (!C::eval(p[2-2*w],t)) { // ??-@@@@@?????-@@
185  if (!C::eval(p[w3],t)) { // ??-@@@@@-????-@@
186  return false;
187  } // ??-@@@@@@????-@@
188  if (!C::eval(p[-3],t)) { // ??-@@@@@@???--@@
189  return false;
190  } // ??-@@@@@@???@-@@
191  if (!C::eval(p[-1+w3],t)) { // ??-@@@@@@-??@-@@
192  return false;
193  } // ??-@@@@@@@??@-@@
194  if (!C::eval(p[-2+2*w],t)) { // ??-@@@@@@@-?@-@@
195  return false;
196  } // ??-@@@@@@@@?@-@@
197  if (!C::eval(p[-3+w],t)) { // ??-@@@@@@@@-@-@@
198  return false;
199  } // ??-@@@@@@@@@@-@@
200  return true;
201  } // ??@@@@@@?????-@@
202  if (!C::eval(p[1-w3],t)) { // ?-@@@@@@?????-@@
203  if (!C::eval(p[-3+w],t)) { // ?-@@@@@@???-?-@@
204  return false;
205  } // ?-@@@@@@???@?-@@
206  if (!C::eval(p[w3],t)) { // ?-@@@@@@-??@?-@@
207  return false;
208  } // ?-@@@@@@@??@?-@@
209  if (!C::eval(p[-1+w3],t)) { // ?-@@@@@@@-?@?-@@
210  return false;
211  } // ?-@@@@@@@@?@?-@@
212  if (!C::eval(p[-2+2*w],t)) { // ?-@@@@@@@@-@?-@@
213  return false;
214  } // ?-@@@@@@@@@@?-@@
215  return true;
216  } // ?@@@@@@@?????-@@
217  if (!C::eval(p[-w3],t)) { // -@@@@@@@?????-@@
218  if (!C::eval(p[w3],t)) { // -@@@@@@@-????-@@
219  return false;
220  } // -@@@@@@@@????-@@
221  if (!C::eval(p[-1+w3],t)) { // -@@@@@@@@-???-@@
222  return false;
223  } // -@@@@@@@@@???-@@
224  if (!C::eval(p[-2+2*w],t)) { // -@@@@@@@@@-??-@@
225  return false;
226  } // -@@@@@@@@@@??-@@
227  return true;
228  } // @@@@@@@@?????-@@
229  return true;
230  } // ?????????????@@@
231  if (!C::eval(p[-w3],t)) { // -????????????@@@
232  if (!C::eval(p[2+2*w],t)) { // -?????-??????@@@
233  return false;
234  } // -?????@??????@@@
235  if (!C::eval(p[1+w3],t)) { // -?????@-?????@@@
236  return false;
237  } // -?????@@?????@@@
238  if (!C::eval(p[-2+2*w],t)) { // -?????@@??-??@@@
239  return false;
240  } // -?????@@??@??@@@
241  if (!C::eval(p[w3],t)) { // -?????@@-?@??@@@
242  return false;
243  } // -?????@@@?@??@@@
244  if (!C::eval(p[-1+w3],t)) { // -?????@@@-@??@@@
245  return false;
246  } // -?????@@@@@??@@@
247  if (!C::eval(p[-3+w],t)) { // -?????@@@@@-?@@@
248  if (!C::eval(p[1-w3],t)) { // --????@@@@@-?@@@
249  return false;
250  } // -@????@@@@@-?@@@
251  if (!C::eval(p[3+w],t)) { // -@???-@@@@@-?@@@
252  return false;
253  } // -@???@@@@@@-?@@@
254  if (!C::eval(p[2-2*w],t)) { // -@-??@@@@@@-?@@@
255  return false;
256  } // -@@??@@@@@@-?@@@
257  if (!C::eval(p[3-w],t)) { // -@@-?@@@@@@-?@@@
258  return false;
259  } // -@@@?@@@@@@-?@@@
260  if (!C::eval(p[3],t)) { // -@@@-@@@@@@-?@@@
261  return false;
262  } // -@@@@@@@@@@-?@@@
263  return true;
264  } // -?????@@@@@@?@@@
265  if (!C::eval(p[-3],t)) { // -?????@@@@@@-@@@
266  if (!C::eval(p[3+w],t)) { // -????-@@@@@@-@@@
267  return false;
268  } // -????@@@@@@@-@@@
269  if (!C::eval(p[2-2*w],t)) { // -?-??@@@@@@@-@@@
270  return false;
271  } // -?@??@@@@@@@-@@@
272  if (!C::eval(p[3-w],t)) { // -?@-?@@@@@@@-@@@
273  return false;
274  } // -?@@?@@@@@@@-@@@
275  if (!C::eval(p[3],t)) { // -?@@-@@@@@@@-@@@
276  return false;
277  } // -?@@@@@@@@@@-@@@
278  return true;
279  } // -?????@@@@@@@@@@
280  return true;
281  } // @????????????@@@
282  if (!C::eval(p[-3],t)) { // @???????????-@@@
283  if (!C::eval(p[2+2*w],t)) { // @?????-?????-@@@
284  return false;
285  } // @?????@?????-@@@
286  if (!C::eval(p[2-2*w],t)) { // @?-???@?????-@@@
287  return false;
288  } // @?@???@?????-@@@
289  if (!C::eval(p[3-w],t)) { // @?@-??@?????-@@@
290  return false;
291  } // @?@@??@?????-@@@
292  if (!C::eval(p[3+w],t)) { // @?@@?-@?????-@@@
293  return false;
294  } // @?@@?@@?????-@@@
295  if (!C::eval(p[3],t)) { // @?@@-@@?????-@@@
296  return false;
297  } // @?@@@@@?????-@@@
298  if (!C::eval(p[1-w3],t)) { // @-@@@@@?????-@@@
299  if (!C::eval(p[1+w3],t)) { // @-@@@@@-????-@@@
300  return false;
301  } // @-@@@@@@????-@@@
302  if (!C::eval(p[-3+w],t)) { // @-@@@@@@???--@@@
303  return false;
304  } // @-@@@@@@???@-@@@
305  if (!C::eval(p[w3],t)) { // @-@@@@@@-??@-@@@
306  return false;
307  } // @-@@@@@@@??@-@@@
308  if (!C::eval(p[-1+w3],t)) { // @-@@@@@@@-?@-@@@
309  return false;
310  } // @-@@@@@@@@?@-@@@
311  if (!C::eval(p[-2+2*w],t)) { // @-@@@@@@@@-@-@@@
312  return false;
313  } // @-@@@@@@@@@@-@@@
314  return true;
315  } // @@@@@@@?????-@@@
316  return true;
317  } // @???????????@@@@
318  if (!C::eval(p[1-w3],t)) { // @-??????????@@@@
319  if (!C::eval(p[1+w3],t)) { // @-?????-????@@@@
320  return false;
321  } // @-?????@????@@@@
322  if (!C::eval(p[-3+w],t)) { // @-?????@???-@@@@
323  return false;
324  } // @-?????@???@@@@@
325  if (!C::eval(p[w3],t)) { // @-?????@-??@@@@@
326  return false;
327  } // @-?????@@??@@@@@
328  if (!C::eval(p[-1+w3],t)) { // @-?????@@-?@@@@@
329  return false;
330  } // @-?????@@@?@@@@@
331  if (!C::eval(p[-2+2*w],t)) { // @-?????@@@-@@@@@
332  return false;
333  } // @-?????@@@@@@@@@
334  return true;
335  } // @@??????????@@@@
336  if (!C::eval(p[2-2*w],t)) { // @@-?????????@@@@
337  if (!C::eval(p[-3+w],t)) { // @@-????????-@@@@
338  return false;
339  } // @@-????????@@@@@
340  if (!C::eval(p[w3],t)) { // @@-?????-??@@@@@
341  return false;
342  } // @@-?????@??@@@@@
343  if (!C::eval(p[-1+w3],t)) { // @@-?????@-?@@@@@
344  return false;
345  } // @@-?????@@?@@@@@
346  if (!C::eval(p[-2+2*w],t)) { // @@-?????@@-@@@@@
347  return false;
348  } // @@-?????@@@@@@@@
349  return true;
350  } // @@@?????????@@@@
351  if (!C::eval(p[-3+w],t)) { // @@@????????-@@@@
352  if (!C::eval(p[3-w],t)) { // @@@-???????-@@@@
353  return false;
354  } // @@@@???????-@@@@
355  if (!C::eval(p[3],t)) { // @@@@-??????-@@@@
356  return false;
357  } // @@@@@??????-@@@@
358  if (!C::eval(p[3+w],t)) { // @@@@@-?????-@@@@
359  return false;
360  } // @@@@@@?????-@@@@
361  return true;
362  } // @@@????????@@@@@
363  if (!C::eval(p[-2+2*w],t)) { // @@@???????-@@@@@
364  if (!C::eval(p[3-w],t)) { // @@@-??????-@@@@@
365  return false;
366  } // @@@@??????-@@@@@
367  if (!C::eval(p[3],t)) { // @@@@-?????-@@@@@
368  return false;
369  } // @@@@@?????-@@@@@
370  return true;
371  } // @@@???????@@@@@@
372  if (!C::eval(p[3-w],t)) { // @@@-??????@@@@@@
373  if (!C::eval(p[-1+w3],t)) { // @@@-?????-@@@@@@
374  return false;
375  } // @@@-?????@@@@@@@
376  return true;
377  } // @@@@??????@@@@@@
378  return true;
379 }
380 
GLdouble GLdouble t
Definition: glext.h:3610
bool is_corner_10(const uint8_t *p, const int w, const int barrier)
Definition: corner_10.h:15
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:3962
unsigned char uint8_t
Definition: rptypes.h:43
GLfloat GLfloat p
Definition: glext.h:5587



Page generated by Doxygen 1.8.14 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at lun oct 28 01:35:26 CET 2019