~ubuntu-branches/ubuntu/vivid/regina-normal/vivid-proposed

« back to all changes in this revision

Viewing changes to engine/triangulation/cover.cpp

  • Committer: Package Import Robot
  • Author(s): Ben Burton
  • Date: 2011-09-10 07:17:25 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: package-import@ubuntu.com-20110910071725-97n90tywdq60w2cr
Tags: 4.90-1
* New upstream release!
* The user interface has been ported from KDE3 to KDE4 (closes: #556318).
  Re-enabled the GUI as a result.
* The build system has been ported from autotools to cmake.
* The new upstream release builds fine on amd64 (closes: #624882).
* Moved the users' handbook into regina-normal-doc.
* Upgraded several suggests/recommends.  Upgraded regina-normal-mpi to
  depend on mpi-default-bin, and regina-normal to depend on both graphviz
  and regina-normal-doc (which the GUI expends to be present).  Upgraded
  regina-normal to recommend gap.
* Bumped standards-version to 3.9.2.0 (no changes required).

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 *  Regina - A Normal Surface Theory Calculator                           *
5
5
 *  Computational Engine                                                  *
6
6
 *                                                                        *
7
 
 *  Copyright (c) 1999-2009, Ben Burton                                   *
 
7
 *  Copyright (c) 1999-2011, Ben Burton                                   *
8
8
 *  For further details contact Ben Burton (bab@debian.org).              *
9
9
 *                                                                        *
10
10
 *  This program is free software; you can redistribute it and/or         *
36
36
    if (sheetSize == 0)
37
37
        return;
38
38
 
39
 
    ChangeEventBlock block(this);
 
39
    ChangeEventSpan span(this);
40
40
 
41
41
    // Create a second sheet of tetrahedra.
42
42
    NTetrahedron** upper = new NTetrahedron*[sheetSize];
43
43
    unsigned long i;
 
44
    for (i = 0; i < sheetSize; i++)
 
45
        upper[i] = newTetrahedron(tetrahedra[i]->getDescription());
 
46
 
 
47
    // Reset each tetrahedron orientation.
44
48
    TetrahedronIterator tit = tetrahedra.begin();
45
49
    for (i = 0; i < sheetSize; i++) {
46
 
        upper[i] = new NTetrahedron((*tit)->getDescription());
47
 
        tit++;
48
 
    }
49
 
 
50
 
    // Reset each tetrahedron orientation.
51
 
    tit = tetrahedra.begin();
52
 
    for (i = 0; i < sheetSize; i++) {
53
 
        (*tit)->tetOrientation = 0;
 
50
        (*tit++)->tetOrientation = 0;
54
51
        upper[i]->tetOrientation = 0;
55
 
        tit++;
56
52
    }
57
53
 
58
54
    // Run through the upper sheet and recreate the gluings as we
65
61
    unsigned long upperAdj;
66
62
    NTetrahedron* lowerAdj;
67
63
    int lowerAdjOrientation;
68
 
    NPerm gluing;
 
64
    NPerm4 gluing;
69
65
    for (i = 0; i < sheetSize; i++)
70
66
        if (upper[i]->tetOrientation == 0) {
71
67
            // We've found a new component.
122
118
            }
123
119
        }
124
120
 
125
 
    // Add the new tetrahedra to the triangulation.
126
 
    for (i = 0; i < sheetSize; i++)
127
 
        tetrahedra.push_back(upper[i]);
128
 
 
129
121
    // Tidy up.
130
122
    delete[] upper;
131
 
    gluingsHaveChanged();
132
123
}
133
124
 
134
125
} // namespace regina