#include <PrTriangle.h>
Public Member Functions | |
PrTriangle () | |
Default constructor. | |
PrTriangle (int n1, int n2, int n3, int t1, int t2, int t3) | |
Constructor. | |
PrTriangle (const PrTriangle &t) | |
Constructor. | |
~PrTriangle () | |
Empty destructor. | |
void | init (int n1, int n2, int n3, int t1, int t2, int t3) |
const int & | n1 () const |
const int & | n2 () const |
const int & | n3 () const |
const int & | t1 () const |
const int & | t2 () const |
const int & | t3 () const |
int & | n1 () |
int & | n2 () |
int & | n3 () |
int & | t1 () |
int & | t2 () |
int & | t3 () |
int | getOppositeTriangle (int node) const |
Return the neighbouring triangle which lies opposite to the given node. | |
int | getLeftTriangle (int node) const |
Return the neighbouring triangle which lies to the left of the given node. | |
int | getRightTriangle (int node) const |
Return the neighbouring triangle which lies to the right of the given node. | |
int | getAnticlockwiseNode (int node) const |
Return the node following "node" in an anticlockwise direction around the triangle. | |
int | getClockwiseNode (int node) const |
Return the node following "node" in a clockwise direction around the triangle. | |
bool | isVertex (int node) const |
Boolean routine: does "node" belong to the triangle? | |
void | replaceNode (int n1, int n2) |
If 'n1' is a node in the triangle, replace it with 'n2'. | |
void | replaceTriangle (int t1, int t2) |
If 't1' is a triangle linked to this triangle, replace it with 't2'. | |
int | getEdge (int triangle, int &n1, int &n2) const |
if 'triangle' share an edge with this triangle, return the nodes on the shared edge. | |
void | print (std::ostream &os) const |
print contents to stream | |
void | scan (std::istream &is) |
read contents from stream |
It has three indices of its three vertices in some anticlockwise order. Its three neighbouring triangles t1,t2,t3 are opposite to its vertices. Thus t1 is the triangle opposite n1, t2 is opposite n2 and t3 opposite n3. If any of the neighbouring triangles do not exist in the triangulation their index is -1 (which is out of range in the array of triangles in the triangulation).
Definition at line 50 of file PrTriangle.h.