Exemplo n.º 1
0
//  ---------- Create a bridge segment between all segment:side and all adjacent segment:side ----------
int CreateAdjacentJointsAll()
{
	int		adj_side;

	med_combine_duplicate_vertices(Vertex_active);

	range_for (const auto &&segp, vsegptridx)
	{
		for (int s=0; s<MAX_SIDES_PER_SEGMENT; s++)
		{
			segptridx_t adj_sp = segment_none;
			if (med_find_adjacent_segment_side(segp, s, adj_sp, &adj_side))
				if (segp->children[s] != adj_sp)
						med_form_joint(segp,s,adj_sp,adj_side);
		}
	}

	Update_flags |= UF_WORLD_CHANGED;
	mine_changed = 1;
   autosave_mine(mine_filename);
   diagnostic_message("All Adjacent Joint segments formed.");
	undo_status[Autosave_count] = "All Adjacent Joint segments UNDONE.";
 	warn_if_concave_segments();
   return 1;
}
Exemplo n.º 2
0
//  ---------- Create a bridge segment between all segment:side and all adjacent segment:side ----------
int CreateAdjacentJointsAll()
{
    int		adj_side,seg,s;
    segment	*adj_sp;

    med_combine_duplicate_vertices(Vertex_active);

    for (seg=0; seg<=Highest_segment_index; seg++)
        for (s=0; s<MAX_SIDES_PER_SEGMENT; s++)
            if (med_find_adjacent_segment_side(&Segments[seg], s, &adj_sp, &adj_side))
                if (Segments[seg].children[s] != adj_sp-Segments)
                    med_form_joint(&Segments[seg],s,adj_sp,adj_side);

    Update_flags |= UF_WORLD_CHANGED;
    mine_changed = 1;
    autosave_mine(mine_filename);
    diagnostic_message("All Adjacent Joint segments formed.");
    strcpy(undo_status[Autosave_count], "All Adjacent Joint segments UNDONE.");
    warn_if_concave_segments();
    return 1;
}
Exemplo n.º 3
0
//  ---------- Create a bridge segment between current segment:side adjacent segment:side ----------
int CreateAdjacentJoint()
{
    int		adj_side;
    segment	*adj_sp;

    if (med_find_adjacent_segment_side(Cursegp, Curside, &adj_sp, &adj_side)) {
        if (Cursegp->children[Curside] != adj_sp-Segments) {
            med_form_joint(Cursegp,Curside,adj_sp,adj_side);
            Update_flags |= UF_WORLD_CHANGED;
            mine_changed = 1;
            autosave_mine(mine_filename);
            diagnostic_message("Joint segment formed.");
            strcpy(undo_status[Autosave_count], "Joint segment undone.");
            warn_if_concave_segments();
        } else
            editor_status("Attempted to form joint through connected side -- joint segment not formed (you bozo).");
    } else
        editor_status("Could not find adjacent segment -- joint segment not formed.");

    return 1;
}
Exemplo n.º 4
0
//  ---------- Create a bridge segment between current segment and all adjacent segment:side ----------
int CreateAdjacentJointsSegment()
{
    int		adj_side,s;
    segment	*adj_sp;

    med_combine_duplicate_vertices(Vertex_active);

    for (s=0; s<MAX_SIDES_PER_SEGMENT; s++) {
        if (med_find_adjacent_segment_side(Cursegp, s, &adj_sp, &adj_side))
            if (Cursegp->children[s] != adj_sp-Segments)
            {
                med_form_joint(Cursegp,s,adj_sp,adj_side);
                Update_flags |= UF_WORLD_CHANGED;
                mine_changed = 1;
                autosave_mine(mine_filename);
                diagnostic_message("Adjacent Joint segment formed.");
                strcpy(undo_status[Autosave_count], "Adjacent Joint segment UNDONE.");
                warn_if_concave_segments();
            }
    }

    return 1;
}