tet = face.tetLeft(); Node nodeBack = face.nodeLeft(); Tet tetBack = tet.tetNabor(node);
/** * Appends the tet nabors of the specified face to the specified list. * @param face the face for which to get nabors. * @param nabors the list to which nabors are appended. */ public synchronized void getTetNabors(Face face, TetList nabors) { Tet tetLeft = face.tetLeft(); Tet tetRight = face.tetRight(); if (tetLeft==null && tetRight==null) { Node na = face.nodeA(); Node nb = face.nodeB(); Node nc = face.nodeC(); face = findFace(na,nb,nc); tetLeft = face.tetLeft(); tetRight = face.tetRight(); } if (tetLeft!=null) nabors.add(tetLeft); if (tetRight!=null) nabors.add(tetRight); }
/** * Given a node referenced by one face of the hull, gets the next * face on the hull that is opposite that node. */ private Face getNextFaceOnHull(Node node, Face face) { Tet tet = face.tetLeft(); Node next = face.nodeLeft(); for (Tet tnext=tet.tetNabor(node); tnext!=null; tnext=tet.tetNabor(node)) { node = next; next = tet.nodeNabor(tnext); tet = tnext; } return new Face(tet,node); }
/** * Determines whether the specified face is an inner face. * @param face a face. * @return true, if inner; false, otherwise. */ public boolean isInner(Face face) { Tet tetLeft = face.tetLeft(); if (tetLeft!=null && isInner(tetLeft)) return true; Tet tetRight = face.tetRight(); return tetRight!=null && isInner(tetRight); }