/** * @name any_shared_split_points * * Return true if any of the splits share a point with this one. */ int any_shared_split_points(const GenericVector<SEAM*>& seams, SEAM *seam) { int length; int index; length = seams.size(); for (index = 0; index < length; index++) if (shared_split_points(seams[index], seam)) return TRUE; return FALSE; }
/********************************************************************** * any_shared_split_points * * Return true if any of the splits share a point with this one. **********************************************************************/ int any_shared_split_points(SEAMS seam_list, SEAM *seam) { int length; int index; length = array_count (seam_list); for (index = 0; index < length; index++) if (shared_split_points ((SEAM *) array_value (seam_list, index), seam)) return TRUE; return FALSE; }
/** * @name join_two_seams * * Merge these two seams into a new seam. Duplicate the split records * in both of the input seams. Return the resultant seam. */ SEAM *join_two_seams(const SEAM *seam1, const SEAM *seam2) { SEAM *result = NULL; SEAM *temp; assert(seam1 &&seam2); if (((seam1->split3 == NULL && seam2->split2 == NULL) || (seam1->split2 == NULL && seam2->split3 == NULL) || seam1->split1 == NULL || seam2->split1 == NULL) && (!shared_split_points(seam1, seam2))) { result = new SEAM(*seam1); temp = new SEAM(*seam2); combine_seams(result, temp); } return (result); }
/** * @name join_two_seams * * Merge these two seams into a new seam. Duplicate the split records * in both of the input seams. Return the resultant seam. */ SEAM *join_two_seams(SEAM *seam1, SEAM *seam2) { SEAM *result = NULL; SEAM *temp; assert(seam1 &&seam2); if (((seam1->split3 == NULL && seam2->split2 == NULL) || (seam1->split2 == NULL && seam2->split3 == NULL) || seam1->split1 == NULL || seam2->split1 == NULL) && (!shared_split_points(seam1, seam2))) { clone_seam(result, seam1); clone_seam(temp, seam2); combine_seams(result, temp); } return (result); }