TTK
Loading...
Searching...
No Matches
MultiresTriangulation_CustomDecimation.cpp
Go to the documentation of this file.
2
5
7 const SimplexId &vertexId,
8 const int &localNeighborId,
9 SimplexId &neighborId,
10 int decimation) const {
11
12 const auto &p = this->vertexCoords_[vertexId];
13
14 SimplexId shiftX = decimation;
15 SimplexId shiftY = decimation;
16 SimplexId shiftZ = decimation;
17
18 if(dimensionality_ == 2) {
19 if((nbvoxels_[Di_] % decimation) and (p[0] + decimation > nbvoxels_[Di_])) {
20 shiftX = nbvoxels_[0] % decimation;
21 }
22 if((nbvoxels_[Dj_] % decimation) and (p[1] + decimation > nbvoxels_[Dj_])) {
23 shiftY = nbvoxels_[1] % decimation;
24 }
25 } else if(dimensionality_ == 3) {
26 if((nbvoxels_[0] % decimation) and (p[0] + decimation > nbvoxels_[0])) {
27 shiftX = nbvoxels_[0] % decimation;
28 }
29 if((nbvoxels_[1] % decimation) and (p[1] + decimation > nbvoxels_[1])) {
30 shiftY = nbvoxels_[1] % decimation;
31 }
32 if((nbvoxels_[2] % decimation) and (p[2] + decimation > nbvoxels_[2])) {
33 shiftZ = nbvoxels_[2] % decimation;
34 }
35 }
36
37 switch(vertexPositions_[vertexId]) {
38 case VertexPosition::CENTER_3D:
40 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
41 break;
42 case VertexPosition::FRONT_FACE_3D:
44 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
45 break;
46 case VertexPosition::BACK_FACE_3D:
48 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
49 break;
50 case VertexPosition::TOP_FACE_3D:
52 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
53 break;
54 case VertexPosition::BOTTOM_FACE_3D:
56 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
57 break;
58 case VertexPosition::LEFT_FACE_3D:
60 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
61 break;
62 case VertexPosition::RIGHT_FACE_3D:
64 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
65 break;
66 case VertexPosition::TOP_FRONT_EDGE_3D: // ab
68 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
69 break;
70 case VertexPosition::BOTTOM_FRONT_EDGE_3D: // cd
72 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
73 break;
74 case VertexPosition::LEFT_FRONT_EDGE_3D: // ac
76 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
77 break;
78 case VertexPosition::RIGHT_FRONT_EDGE_3D: // bd
80 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
81 break;
82 case VertexPosition::TOP_BACK_EDGE_3D: // ef
84 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
85 break;
86 case VertexPosition::BOTTOM_BACK_EDGE_3D: // gh
88 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
89 break;
90 case VertexPosition::LEFT_BACK_EDGE_3D: // eg
92 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
93 break;
94 case VertexPosition::RIGHT_BACK_EDGE_3D: // fh
96 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
97 break;
98 case VertexPosition::TOP_LEFT_EDGE_3D: // ae
100 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
101 break;
102 case VertexPosition::TOP_RIGHT_EDGE_3D: // bf
104 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
105 break;
106 case VertexPosition::BOTTOM_LEFT_EDGE_3D: // cg
108 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
109 break;
110 case VertexPosition::BOTTOM_RIGHT_EDGE_3D: // dh
112 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
113 break;
114 case VertexPosition::TOP_LEFT_FRONT_CORNER_3D: // a
116 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
117 break;
118 case VertexPosition::TOP_RIGHT_FRONT_CORNER_3D: // b
120 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
121 break;
122 case VertexPosition::BOTTOM_LEFT_FRONT_CORNER_3D: // c
124 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
125 break;
126 case VertexPosition::BOTTOM_RIGHT_FRONT_CORNER_3D: // d
128 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
129 break;
130 case VertexPosition::TOP_LEFT_BACK_CORNER_3D: // e
132 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
133 break;
134 case VertexPosition::TOP_RIGHT_BACK_CORNER_3D: // f
136 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
137 break;
138 case VertexPosition::BOTTOM_LEFT_BACK_CORNER_3D: // g
140 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
141 break;
142 case VertexPosition::BOTTOM_RIGHT_BACK_CORNER_3D: // h
144 vertexId, localNeighborId, shiftX, shiftY, shiftZ, decimation);
145 break;
146 case VertexPosition::CENTER_2D:
148 vertexId, localNeighborId, shiftX, shiftY, decimation);
149 break;
150 case VertexPosition::TOP_EDGE_2D:
152 vertexId, localNeighborId, shiftX, shiftY, decimation);
153 break;
154 case VertexPosition::BOTTOM_EDGE_2D:
156 vertexId, localNeighborId, shiftX, shiftY, decimation);
157 break;
158 case VertexPosition::LEFT_EDGE_2D:
160 vertexId, localNeighborId, shiftX, shiftY, decimation);
161 break;
162 case VertexPosition::RIGHT_EDGE_2D:
164 vertexId, localNeighborId, shiftX, shiftY, decimation);
165 break;
166 case VertexPosition::TOP_LEFT_CORNER_2D: // a
168 vertexId, localNeighborId, shiftX, shiftY, decimation);
169 break;
170 case VertexPosition::TOP_RIGHT_CORNER_2D: // b
172 vertexId, localNeighborId, shiftX, shiftY, decimation);
173 break;
174 case VertexPosition::BOTTOM_LEFT_CORNER_2D: // c
176 vertexId, localNeighborId, shiftX, shiftY, decimation);
177 break;
178 case VertexPosition::BOTTOM_RIGHT_CORNER_2D: // d
180 vertexId, localNeighborId, shiftX, shiftY, decimation);
181 break;
182 case VertexPosition::CENTER_1D:
183 neighborId = (localNeighborId == 0 ? vertexId + decimation
184 : vertexId - decimation);
185 break;
186 case VertexPosition::LEFT_CORNER_1D:
187 neighborId = vertexId + decimation;
188 break;
189 case VertexPosition::RIGHT_CORNER_1D:
190 neighborId = vertexId - decimation;
191 break;
192 default:
193 neighborId = -1;
194 break;
195 }
196
197 return 0;
198}
199
201 const SimplexId v,
202 const int id,
203 const SimplexId shiftX,
204 const SimplexId shiftY,
205 const int ttkNotUsed(decimation)) const {
206 // V(a)={b,c}
207 switch(id) {
208 case 0:
209 return v + shiftX; // b
210 case 1:
211 return v + gridDimensions_[Di_] * shiftY; // c
212 }
213 return -1;
214}
216 const SimplexId v,
217 const int id,
218 const SimplexId shiftX,
219 const SimplexId shiftY,
220 const int ttkNotUsed(decimation)) const {
221 // V(b)={a,c,d}
222 switch(id) {
223 case 0:
224 return v - shiftX; // a
225 case 1:
226 return v + gridDimensions_[Di_] * shiftY; // d
227 case 2:
228 return v + (gridDimensions_[Di_] * shiftY - shiftX); // c
229 }
230 return -1;
231}
232
234 const SimplexId v,
235 const int id,
236 const SimplexId shiftX,
237 const SimplexId shiftY,
238 const int ttkNotUsed(decimation)) const {
239 // V(c)={a,b,d}
240 switch(id) {
241 case 0:
242 return v + shiftX;
243 case 1:
244 return v - gridDimensions_[Di_] * shiftY; // a
245 case 2:
246 return v + (shiftX - gridDimensions_[Di_] * shiftY); // b
247 }
248 return -1;
249}
251 const SimplexId v,
252 const int id,
253 const SimplexId shiftX,
254 const SimplexId shiftY,
255 const int ttkNotUsed(decimation)) const {
256 // V(d)={c,b}
257 switch(id) {
258 case 0:
259 return v - shiftX; // c
260 case 1:
261 return v - gridDimensions_[Di_] * shiftY; // b
262 }
263 return -1;
264}
266 const SimplexId v,
267 const int id,
268 const SimplexId shiftX,
269 const SimplexId shiftY,
270 const int decimation) const {
271 // V(ab)=V(b)::{a,c,d}+V(a)::{b}
272 switch(id) {
273 case 0:
274 return v - decimation; // V(b)::a
275 case 1:
276 return v + (gridDimensions_[Di_] * shiftY - decimation); // V(b)::c
277 case 2:
278 return v + gridDimensions_[Di_] * shiftY; // V(b)::d
279 case 3:
280 return v + shiftX; // V(a)::b
281 }
282 return -1;
283}
285 const SimplexId v,
286 const int id,
287 const SimplexId shiftX,
288 const SimplexId shiftY,
289 const int decimation) const {
290 // V(cd)=V(c)::{a,b,d}+V(d)::{c}
291 switch(id) {
292 case 0:
293 return v - decimation; // V(d)::c
294 case 1:
295 return v - gridDimensions_[Di_] * shiftY; // V(c)::a
296 case 2:
297 return v + (shiftX - gridDimensions_[Di_] * shiftY); // V(c)::b
298 case 3:
299 return v + shiftX; // V(c)::d
300 }
301 return -1;
302}
304 const SimplexId v,
305 const int id,
306 const SimplexId shiftX,
307 const SimplexId shiftY,
308 const int decimation) const {
309 // V(ac)=V(c)::{a,b,d}+V(a)::{c}
310 switch(id) {
311 case 0:
312 return v - gridDimensions_[Di_] * decimation; // V(c)::{a}
313 case 1:
314 return v + (shiftX - gridDimensions_[Di_] * decimation); // V(c)::{b}
315 case 2:
316 return v + shiftX; // V(c)::{d}
317 case 3:
318 return v + gridDimensions_[Di_] * shiftY; // V(a)::{c}
319 }
320 return -1;
321}
323 const SimplexId v,
324 const int id,
325 const SimplexId shiftX,
326 const SimplexId shiftY,
327 const int decimation) const {
328 // V(bd)=V(b)::{c,d}+V(d)::{b,c}
329 switch(id) {
330 case 0:
331 return v + (gridDimensions_[Di_] * shiftY - shiftX); // V(b)::{c}
332 case 1:
333 return v + gridDimensions_[Di_] * shiftY; // V(b)::{d}
334 case 2:
335 return v - gridDimensions_[Di_] * decimation; // V(d)::{b}
336 case 3:
337 return v - shiftX; // V(d)::{c}
338 }
339 return -1;
340}
341
343 const SimplexId v,
344 const int id,
345 const SimplexId shiftX,
346 const SimplexId shiftY,
347 const int decimation) const {
348 // V(abcd)=V(d)::{b,c}+V(c)::{b,d}+V(a)::{b}+V(b)::{c}
349 switch(id) {
350 case 0:
351 return v - decimation;
352 case 1:
353 return v - gridDimensions_[Di_] * decimation;
354 case 2:
355 return v + (shiftX - gridDimensions_[Di_] * decimation);
356 case 3:
357 return v + shiftX;
358 case 4:
359 return v + gridDimensions_[Di_] * shiftY;
360 case 5:
361 return v + (gridDimensions_[Di_] * shiftY - decimation);
362 }
363 return -1;
364}
365
367 const SimplexId v,
368 const int id,
369 const SimplexId shiftX,
370 const SimplexId shiftY,
371 const SimplexId shiftZ,
372 const int ttkNotUsed(decimation)) const {
373 // V(a)={b,c,e,g}
374 switch(id) {
375 case 0:
376 return v + shiftX; // b
377 case 1:
378 return v + vshift_[0] * shiftY; // c
379 case 2:
380 return v + vshift_[1] * shiftZ; // e
381 case 3:
382 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // g
383 }
384 return -1;
385}
386
388 const SimplexId v,
389 const int id,
390 const SimplexId shiftX,
391 const SimplexId shiftY,
392 const SimplexId shiftZ,
393 const int ttkNotUsed(decimation)) const {
394 // V(b)={a,c,d,e,f,g,h}
395 switch(id) {
396 case 0:
397 return v - shiftX; // a
398 case 1:
399 return v + (vshift_[0] * shiftY - shiftX); // c
400 case 2:
401 return v + vshift_[0] * shiftY; // d
402 case 3:
403 return v + (vshift_[1] * shiftZ - shiftX); // e
404 case 4:
405 return v + vshift_[1] * shiftZ; // f
406 case 5:
407 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX); // g
408 case 6:
409 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // h
410 }
411 return -1;
412}
414 const SimplexId v,
415 const int id,
416 const SimplexId shiftX,
417 const SimplexId shiftY,
418 const SimplexId shiftZ,
419 const int ttkNotUsed(decimation)) const {
420 // V(c)={a,b,d,g}
421 switch(id) {
422 case 0:
423 return v - vshift_[0] * shiftY; // a
424 case 1:
425 return v + (shiftX - vshift_[0] * shiftY); // b
426 case 2:
427 return v + shiftX; // d
428 case 3:
429 return v + vshift_[1] * shiftZ; // g
430 }
431 return -1;
432}
433
435 const SimplexId v,
436 const int id,
437 const SimplexId shiftX,
438 const SimplexId shiftY,
439 const SimplexId shiftZ,
440 const int ttkNotUsed(decimation)) const {
441 // V(d)={b,c,g,h}
442 switch(id) {
443 case 0:
444 return v - vshift_[0] * shiftY; // b
445 case 1:
446 return v - shiftX; // c
447 case 2:
448 return v + (-shiftX + vshift_[1] * shiftZ); // g
449 case 3:
450 return v + vshift_[1] * shiftZ; // h
451 }
452 return -1;
453}
454
456 const SimplexId v,
457 const int id,
458 const SimplexId shiftX,
459 const SimplexId shiftY,
460 const SimplexId shiftZ,
461 const int ttkNotUsed(decimation)) const {
462 // V(e)={a,b,f,g}
463 switch(id) {
464 case 0:
465 return v - vshift_[1] * shiftZ; // a
466 case 1:
467 return v + (shiftX - vshift_[1] * shiftZ); // b
468 case 2:
469 return v + shiftX; // f
470 case 3:
471 return v + vshift_[0] * shiftY; // g
472 }
473 return -1;
474}
475
477 const SimplexId v,
478 const int id,
479 const SimplexId shiftX,
480 const SimplexId shiftY,
481 const SimplexId shiftZ,
482 const int ttkNotUsed(decimation)) const {
483 // V(f)={b,e,g,h}
484 switch(id) {
485 case 0:
486 return v - vshift_[1] * shiftZ; // b
487 case 1:
488 return v - shiftX; // e
489 case 2:
490 return v + (vshift_[0] * shiftY - shiftX); // g
491 case 3:
492 return v + vshift_[0] * shiftY; // h
493 }
494 return -1;
495}
496
498 const SimplexId v,
499 const int id,
500 const SimplexId shiftX,
501 const SimplexId shiftY,
502 const SimplexId shiftZ,
503 const int ttkNotUsed(decimation)) const {
504 // V(g)={a,b,c,d,e,f,h}
505 switch(id) {
506 case 0:
507 return v - (vshift_[0] * shiftY + vshift_[1] * shiftZ); // a
508 case 1:
509 return v + (shiftX - vshift_[0] * shiftY - vshift_[1] * shiftZ); // b
510 case 2:
511 return v - vshift_[1] * shiftZ; // c
512 case 3:
513 return v + (shiftX - vshift_[1] * shiftZ); // d
514 case 4:
515 return v - vshift_[0] * shiftY; // e
516 case 5:
517 return v + (shiftX - vshift_[0] * shiftY); // f
518 case 6:
519 return v + shiftX; // h
520 }
521 return -1;
522}
523
525 const SimplexId v,
526 const int id,
527 const SimplexId shiftX,
528 const SimplexId shiftY,
529 const SimplexId shiftZ,
530 const int ttkNotUsed(decimation)) const {
531 // V(h)={b,d,f,g}
532 switch(id) {
533 case 0:
534 return v - (vshift_[0] * shiftY + vshift_[1] * shiftZ); // b
535 case 1:
536 return v - vshift_[1] * shiftZ; // d
537 case 2:
538 return v - vshift_[0] * shiftY; // f
539 case 3:
540 return v - shiftX; // g
541 }
542 return -1;
543}
544
546 const SimplexId v,
547 const int id,
548 const SimplexId shiftX,
549 const SimplexId shiftY,
550 const SimplexId shiftZ,
551 const int decimation) const {
552 // V(ab)=V(b)+V(a)::{b}
553 switch(id) {
554 case 0:
555 return v - decimation; // a
556 case 1:
557 return v + (vshift_[0] * shiftY - decimation); // c
558 case 2:
559 return v + vshift_[0] * shiftY; // d
560 case 3:
561 return v + (vshift_[1] * shiftZ - decimation); // e
562 case 4:
563 return v + vshift_[1] * shiftZ; // f
564 case 5:
565 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation); // g
566 case 6:
567 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // h
568 case 7:
569 return v + shiftX; // V(a)::{b}
570 }
571 return -1;
572}
573
575 const SimplexId v,
576 const int id,
577 const SimplexId shiftX,
578 const SimplexId shiftY,
579 const SimplexId shiftZ,
580 const int decimation) const {
581 // V(cd)=V(d)+V(c)::{b,d}
582 switch(id) {
583 case 0:
584 return v - vshift_[0] * shiftY; // b
585 case 1:
586 return v - decimation; // c
587 case 2:
588 return v + (vshift_[1] * shiftZ - decimation); // g
589 case 3:
590 return v + vshift_[1] * shiftZ; // h
591 case 4:
592 return v + (shiftX - vshift_[0] * shiftY); // V(c)::{b}
593 case 5:
594 return v + shiftX; // V(c)::{d}
595 }
596 return -1;
597}
598
600 const SimplexId v,
601 const int id,
602 const SimplexId shiftX,
603 const SimplexId shiftY,
604 const SimplexId shiftZ,
605 const int decimation) const {
606 // V(ef)=V(f)+V(e)::{b,f}
607 switch(id) {
608 case 0:
609 return v - vshift_[1] * shiftZ; // b
610 case 1:
611 return v - decimation; // e
612 case 2:
613 return v + (vshift_[0] * shiftY - decimation); // g
614 case 3:
615 return v + vshift_[0] * shiftY; // h
616 case 4:
617 return v + (shiftX - vshift_[1] * shiftZ); // V(e)::{b}
618 case 5:
619 return v + shiftX; // V(e)::{f}
620 }
621 return -1;
622}
623
625 const SimplexId v,
626 const int id,
627 const SimplexId shiftX,
628 const SimplexId shiftY,
629 const SimplexId shiftZ,
630 const int decimation) const {
631 // V(gh)=V(g)+V(h)::{g}
632 switch(id) {
633 case 0:
634 return v - (vshift_[0] * shiftY + vshift_[1] * shiftZ); // a
635 case 1:
636 return v + (shiftX - vshift_[0] * shiftY - vshift_[1] * shiftZ); // b
637 case 2:
638 return v - vshift_[1] * shiftZ; // c
639 case 3:
640 return v + (shiftX - vshift_[1] * shiftZ); // d
641 case 4:
642 return v - vshift_[0] * shiftY; // e
643 case 5:
644 return v + (shiftX - vshift_[0] * shiftY); // f
645 case 6:
646 return v + shiftX; // h
647 case 7:
648 return v - decimation; // V(h)::{g}
649 }
650
651 return -1;
652}
653
655 const SimplexId v,
656 const int id,
657 const SimplexId shiftX,
658 const SimplexId shiftY,
659 const SimplexId shiftZ,
660 const int decimation) const {
661 // V(ac)=V(c)+V(a)::{c,g}
662 switch(id) {
663 case 0:
664 return v - vshift_[0] * decimation; // a
665 case 1:
666 return v + (shiftX - vshift_[0] * decimation); // b
667 case 2:
668 return v + shiftX; // d
669 case 3:
670 return v + vshift_[1] * shiftZ; // g
671 case 4:
672 return v + vshift_[0] * shiftY; // V(a)::{c}
673 case 5:
674 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // V(a)::{c}
675 }
676 return -1;
677}
678
680 const SimplexId v,
681 const int id,
682 const SimplexId shiftX,
683 const SimplexId shiftY,
684 const SimplexId shiftZ,
685 const int decimation) const {
686 // V(bd)=V(b)+V(d)::{b}
687 switch(id) {
688 case 0:
689 return v - shiftX; // a
690 case 1:
691 return v + (vshift_[0] * shiftY - shiftX); // c
692 case 2:
693 return v + vshift_[0] * shiftY; // d
694 case 3:
695 return v + (vshift_[1] * shiftZ - shiftX); // e
696 case 4:
697 return v + vshift_[1] * shiftZ; // f
698 case 5:
699 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX); // g
700 case 6:
701 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // h
702 case 7:
703 return v - vshift_[0] * decimation; // V(d)::{b}
704 }
705 return -1;
706}
707
709 const SimplexId v,
710 const int id,
711 const SimplexId shiftX,
712 const SimplexId shiftY,
713 const SimplexId shiftZ,
714 const int decimation) const {
715 // V(eg)=V(g)+V(e)::{g}
716 switch(id) {
717 case 0:
718 return v - (vshift_[0] * decimation + vshift_[1] * shiftZ); // a
719 case 1:
720 return v + (shiftX - vshift_[0] * decimation - vshift_[1] * shiftZ); // b
721 case 2:
722 return v - vshift_[1] * shiftZ; // c
723 case 3:
724 return v + (shiftX - vshift_[1] * shiftZ); // d
725 case 4:
726 return v - vshift_[0] * decimation; // e
727 case 5:
728 return v + (shiftX - vshift_[0] * decimation); // f
729 case 6:
730 return v + shiftX; // h
731 case 7:
732 return v + vshift_[0] * shiftY; // V(e)::{g}
733 }
734 return -1;
735}
736
738 const SimplexId v,
739 const int id,
740 const SimplexId shiftX,
741 const SimplexId shiftY,
742 const SimplexId shiftZ,
743 const int decimation) const {
744 // V(fh)=V(f)+V(h)::{b,f}
745 switch(id) {
746 case 0:
747 return v - vshift_[1] * shiftZ; // b
748 case 1:
749 return v - shiftX; // e
750 case 2:
751 return v + (vshift_[0] * shiftY - shiftX); // g
752 case 3:
753 return v + vshift_[0] * shiftY; // h
754 case 4:
755 return v - (vshift_[0] * decimation + vshift_[1] * shiftZ); // V(h)::{b}
756 case 5:
757 return v - vshift_[0] * decimation; // V(h)::{f}
758 }
759 return -1;
760}
761
763 const SimplexId v,
764 const int id,
765 const SimplexId shiftX,
766 const SimplexId shiftY,
767 const SimplexId shiftZ,
768 const int decimation) const {
769 // V(ae)=V(a)+V(e)::{a,b}
770 switch(id) {
771 case 0:
772 return v + shiftX; // b
773 case 1:
774 return v + vshift_[0] * shiftY; // c
775 case 2:
776 return v + vshift_[1] * shiftZ; // e
777 case 3:
778 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // g
779 case 4:
780 return v - vshift_[1] * decimation; // V(e)::{a}
781 case 5:
782 return v + (shiftX - vshift_[1] * decimation); // V(e)::{b}
783 }
784 return -1;
785}
786
788 const SimplexId v,
789 const int id,
790 const SimplexId shiftX,
791 const SimplexId shiftY,
792 const SimplexId shiftZ,
793 const int decimation) const {
794 // V(bf)=V(b)+V(f)::{b}
795 switch(id) {
796 case 0:
797 return v - shiftX; // a
798 case 1:
799 return v + (vshift_[0] * shiftY - shiftX); // c
800 case 2:
801 return v + vshift_[0] * shiftY; // d
802 case 3:
803 return v + (vshift_[1] * shiftZ - shiftX); // e
804 case 4:
805 return v + vshift_[1] * shiftZ; // f
806 case 5:
807 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX); // g
808 case 6:
809 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // h
810 case 7:
811 return v - vshift_[1] * decimation; // V(f)::{b}
812 }
813 return -1;
814}
815
817 const SimplexId v,
818 const int id,
819 const SimplexId shiftX,
820 const SimplexId shiftY,
821 const SimplexId shiftZ,
822 const int decimation) const {
823 // V(cg)=V(g)+V(c)::{g}
824 switch(id) {
825 case 0:
826 return v - (vshift_[0] * shiftY + vshift_[1] * decimation); // a
827 case 1:
828 return v + (shiftX - vshift_[0] * shiftY - vshift_[1] * decimation); // b
829 case 2:
830 return v - vshift_[1] * decimation; // c
831 case 3:
832 return v + (shiftX - vshift_[1] * decimation); // d
833 case 4:
834 return v - vshift_[0] * shiftY; // e
835 case 5:
836 return v + (shiftX - vshift_[0] * shiftY); // f
837 case 6:
838 return v + shiftX; // h
839 case 7:
840 return v + vshift_[1] * shiftZ; // V(c)::{g}
841 }
842 return -1;
843}
844
846 const SimplexId v,
847 const int id,
848 const SimplexId shiftX,
849 const SimplexId shiftY,
850 const SimplexId shiftZ,
851 const int decimation) const {
852 // V(dh)=V(d)+V(h)::{b,d}
853 switch(id) {
854 case 0:
855 return v - vshift_[0] * shiftY; // b
856 case 1:
857 return v - shiftX; // c
858 case 2:
859 return v + (vshift_[1] * shiftZ - shiftX); // g
860 case 3:
861 return v + vshift_[1] * shiftZ; // h
862 case 4:
863 return v - (vshift_[0] * shiftY + vshift_[1] * decimation); // V(h)::{b}
864 case 5:
865 return v - vshift_[1] * decimation; // V(h)::{d}
866 }
867 return -1;
868}
869
871 const SimplexId v,
872 const int id,
873 const SimplexId shiftX,
874 const SimplexId shiftY,
875 const SimplexId shiftZ,
876 const int decimation) const {
877 // V(abdc)=V(b)+V(d)::{b}+V(c)::{b}+V(a)::{b}
878 switch(id) {
879 case 0:
880 return v - decimation; // a
881 case 1:
882 return v + (vshift_[0] * shiftY - decimation); // c
883 case 2:
884 return v + vshift_[0] * shiftY; // d
885 case 3:
886 return v + (vshift_[1] * shiftZ - decimation); // e
887 case 4:
888 return v + vshift_[1] * shiftZ; // f
889 case 5:
890 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation); // g
891 case 6:
892 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // h
893 case 7:
894 return v - vshift_[0] * decimation; // V(d)::{b}
895 case 8:
896 return v + (shiftX - vshift_[0] * decimation); // V(c)::{b}
897 case 9:
898 return v + shiftX; // V(a)::{b}
899 }
900 return -1;
901}
902
904 const SimplexId v,
905 const int id,
906 const SimplexId shiftX,
907 const SimplexId shiftY,
908 const SimplexId shiftZ,
909 const int decimation) const {
910 // V(efhg)=V(g)+V(h)::{g}+V(f)::{g,h}
911 switch(id) {
912 case 0:
913 return v - (vshift_[0] * decimation + vshift_[1] * shiftZ); // a
914 case 1:
915 return v + (shiftX - vshift_[0] * decimation - vshift_[1] * shiftZ); // b
916 case 2:
917 return v - vshift_[1] * shiftZ; // c
918 case 3:
919 return v + (shiftX - vshift_[1] * shiftZ); // d
920 case 4:
921 return v - vshift_[0] * decimation; // e
922 case 5:
923 return v + (shiftX - vshift_[0] * decimation); // f
924 case 6:
925 return v + shiftX; // h
926 case 7:
927 return v - decimation; // V(h)::{g}
928 case 8:
929 return v + (vshift_[0] * shiftY - decimation); // V(f)::{g}
930 case 9:
931 return v + vshift_[0] * shiftY; // V(f)::{h}
932 }
933 return -1;
934}
935
937 const SimplexId v,
938 const int id,
939 const SimplexId shiftX,
940 const SimplexId shiftY,
941 const SimplexId shiftZ,
942 const int decimation) const {
943 // V(aegc)=V(g)+V(a)::{c,g}+V(c)::{g}
944 switch(id) {
945 case 0:
946 return v - (vshift_[0] * decimation + vshift_[1] * decimation); // a
947 case 1:
948 return v
949 + (shiftX - vshift_[0] * decimation
950 - vshift_[1] * decimation); // b
951 case 2:
952 return v - vshift_[1] * decimation; // c
953 case 3:
954 return v + (shiftX - vshift_[1] * decimation); // d
955 case 4:
956 return v - vshift_[0] * decimation; // e
957 case 5:
958 return v + (shiftX - vshift_[0] * decimation); // f
959 case 6:
960 return v + shiftX; // h
961 case 7:
962 return v + vshift_[0] * shiftY; // V(a)::{c}
963 case 8:
964 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // V(a)::{g}
965 case 9:
966 return v + vshift_[1] * shiftZ; // V(c)::{g}
967 }
968 return -1;
969}
970
972 const SimplexId v,
973 const int id,
974 const SimplexId shiftX,
975 const SimplexId shiftY,
976 const SimplexId shiftZ,
977 const int decimation) const {
978 // V(bfhd)=V(b)+V(f)::{b}+V(h)::{b}+V(d)::{b}
979 switch(id) {
980 case 0:
981 return v - shiftX; // a
982 case 1:
983 return v + (vshift_[0] * shiftY - shiftX); // c
984 case 2:
985 return v + vshift_[0] * shiftY; // d
986 case 3:
987 return v + (vshift_[1] * shiftZ - shiftX); // e
988 case 4:
989 return v + vshift_[1] * shiftZ; // f
990 case 5:
991 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - shiftX); // g
992 case 6:
993 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // h
994 case 7:
995 return v - vshift_[1] * decimation; // V(f)::{b}
996 case 8:
997 return v
998 - (vshift_[0] * decimation + vshift_[1] * decimation); // V(h)::{b}
999 case 9:
1000 return v - vshift_[0] * decimation; // V(d)::{b}
1001 }
1002 return -1;
1003}
1004
1006 const SimplexId v,
1007 const int id,
1008 const SimplexId shiftX,
1009 const SimplexId shiftY,
1010 const SimplexId shiftZ,
1011 const int decimation) const {
1012 // V(aefb)=V(b)+V(a)::{b}+V(e)::{b}+V(f)::{b}
1013 switch(id) {
1014 case 0:
1015 return v - decimation; // a
1016 case 1:
1017 return v + (vshift_[0] * shiftY - decimation); // c
1018 case 2:
1019 return v + vshift_[0] * shiftY; // d
1020 case 3:
1021 return v + (vshift_[1] * shiftZ - decimation); // e
1022 case 4:
1023 return v + vshift_[1] * shiftZ; // f
1024 case 5:
1025 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ - decimation); // g
1026 case 6:
1027 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // h
1028 case 7:
1029 return v + shiftX; // V(a)::{b}
1030 case 8:
1031 return v + (shiftX - vshift_[1] * decimation); // V(e)::{b}
1032 case 9:
1033 return v - vshift_[1] * decimation; // V(f)::{b}
1034 }
1035 return -1;
1036}
1037
1039 const SimplexId v,
1040 const int id,
1041 const SimplexId shiftX,
1042 const SimplexId shiftY,
1043 const SimplexId shiftZ,
1044 const int decimation) const {
1045 // V(ghdc)=V(g)+V(h)::{g}+V(d)::{g,h}
1046 switch(id) {
1047 case 0:
1048 return v - (vshift_[0] * shiftY + vshift_[1] * decimation); // a
1049 case 1:
1050 return v + (shiftX - vshift_[0] * shiftY - vshift_[1] * decimation); // b
1051 case 2:
1052 return v - vshift_[1] * decimation; // c
1053 case 3:
1054 return v + (shiftX - vshift_[1] * decimation); // d
1055 case 4:
1056 return v - vshift_[0] * shiftY; // e
1057 case 5:
1058 return v + (shiftX - vshift_[0] * shiftY); // f
1059 case 6:
1060 return v + shiftX; // h
1061 case 7:
1062 return v - decimation; // V(h)::{g}
1063 case 8:
1064 return v + (vshift_[1] * shiftZ - decimation); // V(d)::{g}
1065 case 9:
1066 return v + vshift_[1] * shiftZ; // V(d)::{h}
1067 }
1068 return -1;
1069}
1070
1072 const SimplexId v,
1073 const int id,
1074 const SimplexId shiftX,
1075 const SimplexId shiftY,
1076 const SimplexId shiftZ,
1077 const int decimation) const {
1078 // V(abcdefgh)=V(g)+V(d)::{g,h}+V(h)::{g}+V(b)::{c,d,g,h}
1079 switch(id) {
1080 case 0:
1081 return v - (vshift_[0] * decimation + vshift_[1] * decimation); // a
1082 case 1:
1083 return v
1084 + (shiftX - vshift_[0] * decimation
1085 - vshift_[1] * decimation); // b
1086 case 2:
1087 return v - vshift_[1] * decimation; // c
1088 case 3:
1089 return v + (shiftX - vshift_[1] * decimation); // d
1090 case 4:
1091 return v - vshift_[0] * decimation; // e
1092 case 5:
1093 return v + (shiftX - vshift_[0] * decimation); // f
1094 case 6:
1095 return v + shiftX; // h
1096 case 7:
1097 return v + (vshift_[1] * shiftZ - decimation); // V(d)::{g}
1098 case 8:
1099 return v + vshift_[1] * shiftZ; // V(d)::{h}
1100 case 9:
1101 return v - decimation; // V(h)::{g}
1102 case 10:
1103 return v + (vshift_[0] * shiftY - decimation); // V(b)::{c}
1104 case 11:
1105 return v + vshift_[0] * shiftY; // V(b)::{d}
1106 case 12:
1107 return v
1108 + (vshift_[0] * shiftY + vshift_[1] * shiftZ
1109 - decimation); // V(b)::{g}
1110 case 13:
1111 return v + (vshift_[0] * shiftY + vshift_[1] * shiftZ); // V(b)::{h}
1112 }
1113 return -1;
1114}
#define ttkNotUsed(x)
Mark function/method parameters that are not used in the function body at all.
Definition BaseClass.h:47
SimplexId getVertexNeighborAtDecimationFH(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimation2dCD(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const int decimation) const
SimplexId getVertexNeighborAtDecimationABCDEFGH(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationBF(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationAEGC(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimation2dC(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const int decimation) const
SimplexId getVertexNeighborAtDecimation(const SimplexId &vertexId, const int &localNeighborId, SimplexId &neighborId, int decimation) const
SimplexId getVertexNeighborAtDecimationAEFB(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimation2dAC(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const int decimation) const
SimplexId getVertexNeighborAtDecimation2dBD(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const int decimation) const
SimplexId getVertexNeighborAtDecimation2dB(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const int decimation) const
SimplexId getVertexNeighborAtDecimationAB(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationBD(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationF(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationEG(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationGHDC(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationDH(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationCG(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationH(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationGH(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationE(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimation2dD(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const int decimation) const
SimplexId getVertexNeighborAtDecimationEFHG(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationCD(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimation2dA(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const int decimation) const
SimplexId getVertexNeighborAtDecimationB(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimation2dABCD(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const int decimation) const
SimplexId getVertexNeighborAtDecimationC(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationEF(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationBFHD(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationA(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimation2dAB(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const int decimation) const
SimplexId getVertexNeighborAtDecimationG(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
char localNeighborId(SimplexId neighborId, SimplexId vertexId)
SimplexId getVertexNeighborAtDecimationAC(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationD(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationABDC(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
SimplexId getVertexNeighborAtDecimationAE(const SimplexId v, const int id, const SimplexId shiftX, const SimplexId shiftY, const SimplexId shiftZ, const int decimation) const
int SimplexId
Identifier type for simplices of any dimension.
Definition DataTypes.h:22