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

« back to all changes in this revision

Viewing changes to engine/triangulation/ntetrahedron.h

  • Committer: Package Import Robot
  • Author(s): Ben Burton
  • Date: 2013-11-02 11:44:32 UTC
  • mfrom: (1.2.8)
  • Revision ID: package-import@ubuntu.com-20131102114432-acgci6b1pb2hjl8q
Tags: 4.95-1
* New upstream release.
* The python module is now installed in a standard location beneath
  /usr/lib/python2.7/dist-packages.
* Switched python packaging from python-support to dh_python2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
namespace regina {
51
51
 
52
 
class NFace;
 
52
class NTriangle;
53
53
class NEdge;
54
54
class NVertex;
55
55
class NComponent;
106
106
        NTetrahedron* tetrahedra[4];
107
107
            /**< Stores the tetrahedra glued to each face of this
108
108
                 tetrahedron.  Specifically, <tt>tetrahedra[f]</tt>
109
 
                 represents the tetrahedron joined to face \c f
 
109
                 represents the tetrahedron joined to triangular face \c f
110
110
                 of this tetrahedron, or is 0
111
111
                 if face \c f lies on the triangulation boundary.  Faces are
112
112
                 numbered from 0 to 3 inclusive, where face \c i is opposite
128
128
        NEdge* edges[6];
129
129
            /**< Edges in the triangulation skeleton that are
130
130
                 edges of this tetrahedron. */
131
 
        NFace* faces[4];
132
 
            /**< Faces in the triangulation skeleton that are
 
131
        NTriangle* triangles[4];
 
132
            /**< Triangles in the triangulation skeleton that are
133
133
                 faces of this tetrahedron. */
134
134
 
135
135
        int tmpOrientation[4];
136
136
            /**< Temporary array used to represent orientations
137
 
                 of faces and vertex link triangles when calculating
 
137
                 of triangles and vertex link triangles when calculating
138
138
                 orientability of boundary components and vertex links.
139
139
                 Each orientation will be +/-1.
140
140
                 The array should only be used within these
148
148
            /**< Maps (0,1) to the vertices of this tetrahedron that form
149
149
                 each edge whilst mapping (2,3) in a suitably "orientation-
150
150
                 preserving" way, as described in getEdgeMapping(). */
151
 
        NPerm4 faceMapping[4];
 
151
        NPerm4 triMapping[4];
152
152
            /**< Maps (0,1,2) to the vertices of this tetrahedron that form
153
 
                 each face, as described in getFaceMapping(). */
 
153
                 each triangular face, as described in getTriangleMapping(). */
154
154
        int tetOrientation;
155
155
            /**< The orientation of this tetrahedron in the triangulation.
156
156
                 This will either be 1 or -1. */
333
333
        int getAdjacentFace(int face) const;
334
334
        /**
335
335
         * Determines if this tetrahedron has any faces that are
336
 
         * boundary faces.
 
336
         * boundary triangles.
337
337
         *
338
338
         * @return \c true if and only if this tetrahedron has any
339
 
         * boundary faces.
 
339
         * boundary triangles.
340
340
         */
341
341
        bool hasBoundary() const;
342
342
 
467
467
         */
468
468
        NEdge* getEdge(int edge) const;
469
469
        /**
470
 
         * Returns the face in the triangulation skeleton
 
470
         * Returns the triangle in the triangulation skeleton
471
471
         * corresponding to the given face of this tetrahedron.
472
472
         *
473
473
         * As of Regina 4.90, if the skeletal information for the
482
482
         * @param face the face of this tetrahedron to examine.
483
483
         * This should be between 0 and 3 inclusive, where face \c i
484
484
         * lies opposite vertex \c i.
485
 
         * @return the face of the skeleton corresponding to the
486
 
         * requested tetrahedron face.
487
 
         */
488
 
        NFace* getFace(int face) const;
 
485
         * @return the triangle of the skeleton corresponding to the
 
486
         * requested tetrahedron face.
 
487
         */
 
488
        NTriangle* getTriangle(int face) const;
 
489
        /**
 
490
         * A deprecated alias for getTriangle().
 
491
         *
 
492
         * This routine returns the triangle in the triangulation
 
493
         * skeleton corresponding to the given face of this tetrahedron.
 
494
         * See getTriangle() for further details.
 
495
         *
 
496
         * \deprecated This routine will be removed in a future version
 
497
         * of Regina.  Please use getTriangle() instead.
 
498
         *
 
499
         * @param face the face of this tetrahedron to examine.
 
500
         * This should be between 0 and 3 inclusive, where face \c i
 
501
         * lies opposite vertex \c i.
 
502
         * @return the triangle of the skeleton corresponding to the
 
503
         * requested tetrahedron face.
 
504
         */
 
505
        NTriangle* getFace(int face) const;
489
506
        /**
490
507
         * Returns a permutation that maps 0 to the given vertex of this
491
508
         * tetrahedron, and that maps (1,2,3) to the three remaining vertices
578
595
        /**
579
596
         * Examines the given face of this tetrahedron, and returns a
580
597
         * mapping from the "canonical" vertices of the corresponding
581
 
         * face of the triangulation to the matching vertices of this
 
598
         * triangle of the triangulation to the matching vertices of this
582
599
         * tetrahedron.
583
600
         *
584
601
         * In detail:  Suppose two faces of two tetrahedra are identified
585
602
         * within the overall triangulation.  We call this a single
586
 
         * "face of the triangulation", and arbitrarily label its
 
603
         * "triangle of the triangulation", and arbitrarily label its
587
604
         * vertices (0,1,2).  This routine then maps the vertices
588
 
         * (0,1,2) of this face of the triangulation to the individual
 
605
         * (0,1,2) of this triangle of the triangulation to the individual
589
606
         * vertices of this tetrahedron that make up the given face.
590
607
         *
591
608
         * Because we are passing the argument \a face, we already know
593
610
         * routine tells us is the \a order in which they appear to form the
594
611
         * overall face of the triangulation.
595
612
         *
596
 
         * As a consequence:  Consider some pair of tetrahedron faces
597
 
         * that are identified together as a single face of the triangulation,
 
613
         * As a consequence:  Consider some pair of tetrahedron faces that are
 
614
         * identified together as a single triangle of the triangulation,
598
615
         * and choose some \a i from the set {0,1,2}.  Then the vertices
599
 
         * <tt>getFaceMapping(...)[i]</tt> of the individual tetrahedra
 
616
         * <tt>getTriangleMapping(...)[i]</tt> of the individual tetrahedra
600
617
         * are identified together, since they both become the same
601
 
         * vertex of the same face of the triangulation (assuming of
 
618
         * vertex of the same triangle of the triangulation (assuming of
602
619
         * course that we pass the correct face number in each case to
603
 
         * getFaceMapping()).
 
620
         * getTriangleMapping()).
604
621
         *
605
622
         * As of Regina 4.90, if the skeletal information for the
606
623
         * triangulation has not been computed then this will be done
613
630
         *
614
631
         * @param face the face of this tetrahedron to examine.
615
632
         * This should be between 0 and 3 inclusive.
616
 
         * @return a mapping from vertices (0,1,2) of the requested face
617
 
         * to the vertices of this tetrahedron.
 
633
         * @return a mapping from vertices (0,1,2) of the corresponding
 
634
         * triangle to the vertices of this tetrahedron.
 
635
         */
 
636
        NPerm4 getTriangleMapping(int face) const;
 
637
        /**
 
638
         * A deprecated alias for getTriangleMapping().
 
639
         *
 
640
         * This routine examines the given face of this tetrahedron, and
 
641
         * returns a mapping from the "canonical" vertices of the corresponding
 
642
         * triangle of the triangulation to the matching vertices of this
 
643
         * tetrahedron.  See getTriangleMapping() for further details.
 
644
         *
 
645
         * \deprecated This routine will be removed in a future version
 
646
         * of Regina.  Please use getTriangleMapping() instead.
 
647
         *
 
648
         * @param face the face of this tetrahedron to examine.
 
649
         * This should be between 0 and 3 inclusive.
 
650
         * @return a mapping from vertices (0,1,2) of the corresponding
 
651
         * triangle to the vertices of this tetrahedron.
618
652
         */
619
653
        NPerm4 getFaceMapping(int face) const;
620
654
        /**
643
677
        int orientation() const;
644
678
 
645
679
        void writeTextShort(std::ostream& out) const;
 
680
        void writeTextLong(std::ostream& out) const;
646
681
 
647
682
    friend class NTriangulation;
648
683
        /**< Allow access to private members. */
725
760
    return edges[edge];
726
761
}
727
762
 
728
 
inline NFace* NTetrahedron::getFace(int face) const {
 
763
inline NTriangle* NTetrahedron::getTriangle(int face) const {
729
764
    if (! tri->calculatedSkeleton)
730
765
        tri->calculateSkeleton();
731
 
    return faces[face];
 
766
    return triangles[face];
 
767
}
 
768
 
 
769
inline NTriangle* NTetrahedron::getFace(int face) const {
 
770
    return getTriangle(face);
732
771
}
733
772
 
734
773
inline NPerm4 NTetrahedron::getVertexMapping(int vertex) const {
743
782
    return edgeMapping[edge];
744
783
}
745
784
 
 
785
inline NPerm4 NTetrahedron::getTriangleMapping(int face) const {
 
786
    if (! tri->calculatedSkeleton)
 
787
        tri->calculateSkeleton();
 
788
    return triMapping[face];
 
789
}
 
790
 
746
791
inline NPerm4 NTetrahedron::getFaceMapping(int face) const {
747
 
    if (! tri->calculatedSkeleton)
748
 
        tri->calculateSkeleton();
749
 
    return faceMapping[face];
 
792
    return getTriangleMapping(face);
750
793
}
751
794
 
752
795
inline int NTetrahedron::orientation() const {
758
801
inline void NTetrahedron::writeTextShort(std::ostream& out) const {
759
802
    out << "Tetrahedron";
760
803
    if (description.length() > 0)
761
 
        out << " " << description;
 
804
        out << ": " << description;
762
805
}
763
806
 
764
807
} // namespace regina