[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool ControlledMoveStrategy.java,1.3,1.4
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2006-04-13 13:36:18
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28074 Modified Files: ControlledMoveStrategy.java Log Message: now controlled move works when a surface has holes aswell Index: ControlledMoveStrategy.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ControlledMoveStrategy.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ControlledMoveStrategy.java 5 Apr 2006 10:24:56 -0000 1.3 --- ControlledMoveStrategy.java 13 Apr 2006 13:36:10 -0000 1.4 *************** *** 242,246 **** private Map createSlideMap(Surface surface) { Collection verts = surface.getVertices(); ! Iterator it = vertices.iterator(); boolean bound = false; Map map = new HashMap(); --- 242,246 ---- private Map createSlideMap(Surface surface) { Collection verts = surface.getVertices(); ! Iterator it = verts.iterator(); boolean bound = false; Map map = new HashMap(); *************** *** 259,267 **** bound = otherEdges > 1; } } if (!bound) { return map; } - return null; } --- 259,281 ---- bound = otherEdges > 1; } + bound = otherEdges > 1; + } + + Collection holes = surface.getHoles(); + it = holes.iterator(); + while (it.hasNext() && !bound) { + Map holeMap = createSlideMap((Surface)it.next()); + if (holeMap != null) { + map.putAll(holeMap); + } else { + bound = true; + } } + if (!bound) { return map; + } else { + return null; } } *************** *** 307,311 **** } } ! } } --- 321,325 ---- } } ! } } |