| | |
| | | blist->bond[blist->n - 1]->vtx2=vtx2; |
| | | blist->bond[blist->n - 1]->tainted=0; |
| | | //Should we calculate bond length NOW? |
| | | |
| | | |
| | | |
| | | |
| | | return blist->bond[blist->n-1]; |
| | | } |
| | | |
| | | |
| | | /* Two triangles are assigned to the bond. Bond must already be initialized. */ |
| | | ts_bool bond_assign_triangles(ts_bond *bond){ |
| | | ts_vertex *vtx1=bond->vtx1, *vtx2=bond->vtx2; |
| | | ts_uint i,j,k; |
| | | |
| | | for(i=0,k=0;i<vtx1->tristar_no;i++){ |
| | | for(j=0;j<3;j++){ |
| | | if(vtx1->tristar[i]->vertex[j]==vtx2){ |
| | | //triangle found; |
| | | bond->tria[k]=vtx1->tristar[i]; |
| | | k++; |
| | | } |
| | | } |
| | | } |
| | | if(k<2) return TS_FAIL; |
| | | else return TS_SUCCESS; |
| | | } |
| | | |
| | | ts_bool bond_list_free(ts_bond_list *blist){ |
| | | ts_uint i; |
| | | for(i=0;i<blist->n;i++){ |