Main MRPT website > C++ reference for MRPT 1.5.6
corner_12.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_12(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[-w3],t)) { // -???????????????
19  if (!C::eval(p[-3],t)) { // -???????????-???
20  return false;
21  } // -???????????@???
22  if (!C::eval(p[3],t)) { // -???-???????@???
23  return false;
24  } // -???@???????@???
25  if (!C::eval(p[3+w],t)) { // -???@-??????@???
26  return false;
27  } // -???@@??????@???
28  if (!C::eval(p[-3+w],t)) { // -???@@?????-@???
29  return false;
30  } // -???@@?????@@???
31  if (!C::eval(p[-2+2*w],t)) { // -???@@????-@@???
32  return false;
33  } // -???@@????@@@???
34  if (!C::eval(p[-1+w3],t)) { // -???@@???-@@@???
35  return false;
36  } // -???@@???@@@@???
37  if (!C::eval(p[2+2*w],t)) { // -???@@-??@@@@???
38  return false;
39  } // -???@@@??@@@@???
40  if (!C::eval(p[w3],t)) { // -???@@@?-@@@@???
41  return false;
42  } // -???@@@?@@@@@???
43  if (!C::eval(p[1+w3],t)) { // -???@@@-@@@@@???
44  return false;
45  } // -???@@@@@@@@@???
46  if (!C::eval(p[-3-w],t)) { // -???@@@@@@@@@-??
47  if (!C::eval(p[1-w3],t)) { // --??@@@@@@@@@-??
48  return false;
49  } // -@??@@@@@@@@@-??
50  if (!C::eval(p[2-2*w],t)) { // -@-?@@@@@@@@@-??
51  return false;
52  } // -@@?@@@@@@@@@-??
53  if (!C::eval(p[3-w],t)) { // -@@-@@@@@@@@@-??
54  return false;
55  } // -@@@@@@@@@@@@-??
56  return true;
57  } // -???@@@@@@@@@@??
58  if (!C::eval(p[-2-2*w],t)) { // -???@@@@@@@@@@-?
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-w],t)) { // -??-@@@@@@@@@@@?
68  if (!C::eval(p[-1-w3],t)) { // -??-@@@@@@@@@@@-
69  return false;
70  } // -??-@@@@@@@@@@@@
71  return true;
72  } // -??@@@@@@@@@@@@?
73  return true;
74  } // @???????????????
75  if (!C::eval(p[-1-w3],t)) { // @??????????????-
76  if (!C::eval(p[3-w],t)) { // @??-???????????-
77  return false;
78  } // @??@???????????-
79  if (!C::eval(p[-3+w],t)) { // @??@???????-???-
80  return false;
81  } // @??@???????@???-
82  if (!C::eval(p[-2+2*w],t)) { // @??@??????-@???-
83  return false;
84  } // @??@??????@@???-
85  if (!C::eval(p[-1+w3],t)) { // @??@?????-@@???-
86  return false;
87  } // @??@?????@@@???-
88  if (!C::eval(p[w3],t)) { // @??@????-@@@???-
89  return false;
90  } // @??@????@@@@???-
91  if (!C::eval(p[3],t)) { // @??@-???@@@@???-
92  return false;
93  } // @??@@???@@@@???-
94  if (!C::eval(p[1+w3],t)) { // @??@@??-@@@@???-
95  return false;
96  } // @??@@??@@@@@???-
97  if (!C::eval(p[2+2*w],t)) { // @??@@?-@@@@@???-
98  return false;
99  } // @??@@?@@@@@@???-
100  if (!C::eval(p[3+w],t)) { // @??@@-@@@@@@???-
101  return false;
102  } // @??@@@@@@@@@???-
103  if (!C::eval(p[2-2*w],t)) { // @?-@@@@@@@@@???-
104  if (!C::eval(p[-3],t)) { // @?-@@@@@@@@@-??-
105  return false;
106  } // @?-@@@@@@@@@@??-
107  if (!C::eval(p[-3-w],t)) { // @?-@@@@@@@@@@-?-
108  return false;
109  } // @?-@@@@@@@@@@@?-
110  if (!C::eval(p[-2-2*w],t)) { // @?-@@@@@@@@@@@--
111  return false;
112  } // @?-@@@@@@@@@@@@-
113  return true;
114  } // @?@@@@@@@@@@???-
115  if (!C::eval(p[1-w3],t)) { // @-@@@@@@@@@@???-
116  if (!C::eval(p[-3],t)) { // @-@@@@@@@@@@-??-
117  return false;
118  } // @-@@@@@@@@@@@??-
119  if (!C::eval(p[-3-w],t)) { // @-@@@@@@@@@@@-?-
120  return false;
121  } // @-@@@@@@@@@@@@?-
122  return true;
123  } // @@@@@@@@@@@@???-
124  return true;
125  } // @??????????????@
126  if (!C::eval(p[1-w3],t)) { // @-?????????????@
127  if (!C::eval(p[3+w],t)) { // @-???-?????????@
128  return false;
129  } // @-???@?????????@
130  if (!C::eval(p[-3-w],t)) { // @-???@???????-?@
131  return false;
132  } // @-???@???????@?@
133  if (!C::eval(p[-3],t)) { // @-???@??????-@?@
134  return false;
135  } // @-???@??????@@?@
136  if (!C::eval(p[-3+w],t)) { // @-???@?????-@@?@
137  return false;
138  } // @-???@?????@@@?@
139  if (!C::eval(p[-2+2*w],t)) { // @-???@????-@@@?@
140  return false;
141  } // @-???@????@@@@?@
142  if (!C::eval(p[2+2*w],t)) { // @-???@-???@@@@?@
143  return false;
144  } // @-???@@???@@@@?@
145  if (!C::eval(p[1+w3],t)) { // @-???@@-??@@@@?@
146  return false;
147  } // @-???@@@??@@@@?@
148  if (!C::eval(p[-1+w3],t)) { // @-???@@@?-@@@@?@
149  return false;
150  } // @-???@@@?@@@@@?@
151  if (!C::eval(p[w3],t)) { // @-???@@@-@@@@@?@
152  return false;
153  } // @-???@@@@@@@@@?@
154  if (!C::eval(p[-2-2*w],t)) { // @-???@@@@@@@@@-@
155  if (!C::eval(p[2-2*w],t)) { // @--??@@@@@@@@@-@
156  return false;
157  } // @-@??@@@@@@@@@-@
158  if (!C::eval(p[3-w],t)) { // @-@-?@@@@@@@@@-@
159  return false;
160  } // @-@@?@@@@@@@@@-@
161  if (!C::eval(p[3],t)) { // @-@@-@@@@@@@@@-@
162  return false;
163  } // @-@@@@@@@@@@@@-@
164  return true;
165  } // @-???@@@@@@@@@@@
166  return true;
167  } // @@?????????????@
168  if (!C::eval(p[2-2*w],t)) { // @@-????????????@
169  if (!C::eval(p[2+2*w],t)) { // @@-???-????????@
170  return false;
171  } // @@-???@????????@
172  if (!C::eval(p[1+w3],t)) { // @@-???@-???????@
173  return false;
174  } // @@-???@@???????@
175  if (!C::eval(p[-2-2*w],t)) { // @@-???@@??????-@
176  return false;
177  } // @@-???@@??????@@
178  if (!C::eval(p[w3],t)) { // @@-???@@-?????@@
179  return false;
180  } // @@-???@@@?????@@
181  if (!C::eval(p[-3-w],t)) { // @@-???@@@????-@@
182  return false;
183  } // @@-???@@@????@@@
184  if (!C::eval(p[-3],t)) { // @@-???@@@???-@@@
185  return false;
186  } // @@-???@@@???@@@@
187  if (!C::eval(p[-1+w3],t)) { // @@-???@@@-??@@@@
188  return false;
189  } // @@-???@@@@??@@@@
190  if (!C::eval(p[-2+2*w],t)) { // @@-???@@@@-?@@@@
191  return false;
192  } // @@-???@@@@@?@@@@
193  if (!C::eval(p[-3+w],t)) { // @@-???@@@@@-@@@@
194  return false;
195  } // @@-???@@@@@@@@@@
196  return true;
197  } // @@@????????????@
198  if (!C::eval(p[-2-2*w],t)) { // @@@???????????-@
199  if (!C::eval(p[3-w],t)) { // @@@-??????????-@
200  return false;
201  } // @@@@??????????-@
202  if (!C::eval(p[-2+2*w],t)) { // @@@@??????-???-@
203  return false;
204  } // @@@@??????@???-@
205  if (!C::eval(p[3],t)) { // @@@@-?????@???-@
206  return false;
207  } // @@@@@?????@???-@
208  if (!C::eval(p[-1+w3],t)) { // @@@@@????-@???-@
209  return false;
210  } // @@@@@????@@???-@
211  if (!C::eval(p[w3],t)) { // @@@@@???-@@???-@
212  return false;
213  } // @@@@@???@@@???-@
214  if (!C::eval(p[3+w],t)) { // @@@@@-??@@@???-@
215  return false;
216  } // @@@@@@??@@@???-@
217  if (!C::eval(p[2+2*w],t)) { // @@@@@@-?@@@???-@
218  return false;
219  } // @@@@@@@?@@@???-@
220  if (!C::eval(p[1+w3],t)) { // @@@@@@@-@@@???-@
221  return false;
222  } // @@@@@@@@@@@???-@
223  return true;
224  } // @@@???????????@@
225  if (!C::eval(p[3-w],t)) { // @@@-??????????@@
226  if (!C::eval(p[-3-w],t)) { // @@@-?????????-@@
227  return false;
228  } // @@@-?????????@@@
229  if (!C::eval(p[1+w3],t)) { // @@@-???-?????@@@
230  return false;
231  } // @@@-???@?????@@@
232  if (!C::eval(p[-3],t)) { // @@@-???@????-@@@
233  return false;
234  } // @@@-???@????@@@@
235  if (!C::eval(p[-3+w],t)) { // @@@-???@???-@@@@
236  return false;
237  } // @@@-???@???@@@@@
238  if (!C::eval(p[w3],t)) { // @@@-???@-??@@@@@
239  return false;
240  } // @@@-???@@??@@@@@
241  if (!C::eval(p[-1+w3],t)) { // @@@-???@@-?@@@@@
242  return false;
243  } // @@@-???@@@?@@@@@
244  if (!C::eval(p[-2+2*w],t)) { // @@@-???@@@-@@@@@
245  return false;
246  } // @@@-???@@@@@@@@@
247  return true;
248  } // @@@@??????????@@
249  if (!C::eval(p[3],t)) { // @@@@-?????????@@
250  if (!C::eval(p[w3],t)) { // @@@@-???-?????@@
251  return false;
252  } // @@@@-???@?????@@
253  if (!C::eval(p[-3-w],t)) { // @@@@-???@????-@@
254  return false;
255  } // @@@@-???@????@@@
256  if (!C::eval(p[-3],t)) { // @@@@-???@???-@@@
257  return false;
258  } // @@@@-???@???@@@@
259  if (!C::eval(p[-1+w3],t)) { // @@@@-???@-??@@@@
260  return false;
261  } // @@@@-???@@??@@@@
262  if (!C::eval(p[-2+2*w],t)) { // @@@@-???@@-?@@@@
263  return false;
264  } // @@@@-???@@@?@@@@
265  if (!C::eval(p[-3+w],t)) { // @@@@-???@@@-@@@@
266  return false;
267  } // @@@@-???@@@@@@@@
268  return true;
269  } // @@@@@?????????@@
270  if (!C::eval(p[-3-w],t)) { // @@@@@????????-@@
271  if (!C::eval(p[-1+w3],t)) { // @@@@@????-???-@@
272  return false;
273  } // @@@@@????@???-@@
274  if (!C::eval(p[w3],t)) { // @@@@@???-@???-@@
275  return false;
276  } // @@@@@???@@???-@@
277  if (!C::eval(p[3+w],t)) { // @@@@@-??@@???-@@
278  return false;
279  } // @@@@@@??@@???-@@
280  if (!C::eval(p[2+2*w],t)) { // @@@@@@-?@@???-@@
281  return false;
282  } // @@@@@@@?@@???-@@
283  if (!C::eval(p[1+w3],t)) { // @@@@@@@-@@???-@@
284  return false;
285  } // @@@@@@@@@@???-@@
286  return true;
287  } // @@@@@????????@@@
288  if (!C::eval(p[3+w],t)) { // @@@@@-???????@@@
289  if (!C::eval(p[-3],t)) { // @@@@@-??????-@@@
290  return false;
291  } // @@@@@-??????@@@@
292  if (!C::eval(p[-1+w3],t)) { // @@@@@-???-??@@@@
293  return false;
294  } // @@@@@-???@??@@@@
295  if (!C::eval(p[-2+2*w],t)) { // @@@@@-???@-?@@@@
296  return false;
297  } // @@@@@-???@@?@@@@
298  if (!C::eval(p[-3+w],t)) { // @@@@@-???@@-@@@@
299  return false;
300  } // @@@@@-???@@@@@@@
301  return true;
302  } // @@@@@@???????@@@
303  if (!C::eval(p[2+2*w],t)) { // @@@@@@-??????@@@
304  if (!C::eval(p[-2+2*w],t)) { // @@@@@@-???-??@@@
305  return false;
306  } // @@@@@@-???@??@@@
307  if (!C::eval(p[-3+w],t)) { // @@@@@@-???@-?@@@
308  return false;
309  } // @@@@@@-???@@?@@@
310  if (!C::eval(p[-3],t)) { // @@@@@@-???@@-@@@
311  return false;
312  } // @@@@@@-???@@@@@@
313  return true;
314  } // @@@@@@@??????@@@
315  if (!C::eval(p[1+w3],t)) { // @@@@@@@-?????@@@
316  if (!C::eval(p[-3+w],t)) { // @@@@@@@-???-?@@@
317  return false;
318  } // @@@@@@@-???@?@@@
319  if (!C::eval(p[-3],t)) { // @@@@@@@-???@-@@@
320  return false;
321  } // @@@@@@@-???@@@@@
322  return true;
323  } // @@@@@@@@?????@@@
324  if (!C::eval(p[-3],t)) { // @@@@@@@@????-@@@
325  if (!C::eval(p[w3],t)) { // @@@@@@@@-???-@@@
326  return false;
327  } // @@@@@@@@@???-@@@
328  return true;
329  } // @@@@@@@@????@@@@
330  return true;
331 }
332 
GLdouble GLdouble t
Definition: glext.h:3610
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:3962
unsigned char uint8_t
Definition: rptypes.h:43
bool is_corner_12(const uint8_t *p, const int w, const int barrier)
Definition: corner_12.h:15
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