File: linear_cell_complex_3_insert.cpp

package info (click to toggle)
cgal 6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144,912 kB
  • sloc: cpp: 810,858; ansic: 208,477; sh: 493; python: 411; makefile: 286; javascript: 174
file content (35 lines) | stat: -rw-r--r-- 980 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <CGAL/Linear_cell_complex_for_combinatorial_map.h>
#include <CGAL/Linear_cell_complex_for_generalized_map.h>
#include <CGAL/draw_linear_cell_complex.h>

typedef CGAL::Linear_cell_complex_for_combinatorial_map<3> LCC1;
typedef CGAL::Linear_cell_complex_for_generalized_map<3> LCC2;

template<typename LCC>
void test()
{
  LCC lcc;
  using Point=typename LCC::Point;

  typename LCC::Dart_descriptor d1=
    lcc.make_hexahedron(Point(0,0,0), Point(5,0,0),
                        Point(5,5,0), Point(0,5,0),
                        Point(0,5,4), Point(0,0,4),
                        Point(5,0,4), Point(5,5,4));
  typename LCC::Dart_descriptor d2=
    lcc.make_quadrangle(Point(5,2,2), Point(5,1,2),
                        Point(5,1,1), Point(5,2,1));

  lcc.insert_cell_1_between_two_cells_2
    (lcc.template opposite<2>(lcc.next(lcc.next(d1))),
     lcc.next(lcc.next(d2)));

  CGAL::draw(lcc);
}

int main()
{
  test<LCC1>();
  test<LCC2>();
  return EXIT_SUCCESS;
}