if (tet!=null) { mark(tet); nabors.add(tet); Node n0 = tet._n0; Node n1 = tet._n1;
if (tet!=null) { mark(tet); nabors.add(tet); Node n0 = tet._n0; Node n1 = tet._n1;
/** * 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); }
private void addTet(double xp, double yp, double zp, TetMesh.Tet tet) { _mesh.mark(tet); _tetList.add(tet); addNode(tet.nodeA()); addNode(tet.nodeB()); addNode(tet.nodeC()); addNode(tet.nodeD()); TetMesh.Tet ta = tet.tetA(); TetMesh.Tet tb = tet.tetB(); TetMesh.Tet tc = tet.tetC(); TetMesh.Tet td = tet.tetD(); if (needTet(xp,yp,zp,ta)) addTet(xp,yp,zp,ta); if (needTet(xp,yp,zp,tb)) addTet(xp,yp,zp,tb); if (needTet(xp,yp,zp,tc)) addTet(xp,yp,zp,tc); if (needTet(xp,yp,zp,td)) addTet(xp,yp,zp,td); } private void addNode(TetMesh.Node node) {
/** * Kills a tet and, if there is room, buries it in the graveyard, * from where it may be resurrected later. * Never updates the root tet, even when the tet being killed is the * root tet. The caller is responsible for setting the root tet, as * necessary. */ private void killTet(Tet tet) { --_ntet; fireTetRemoved(tet); int ndead = _deadTets.ntet(); if (ndead<256) _deadTets.add(tet); // We assume that killTet is called only within contexts in // which _troot is updated to point to a live tet in the mesh. // Therefore, we do not update _troot here, when _troot==tet. }