Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24462/src/net/sourceforge/bprocessor/model
Modified Files:
Space.java
Log Message:
made the tilemodellor just a notch better and added a addAll method that just takes a surface to space
Index: Space.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v
retrieving revision 1.135
retrieving revision 1.136
diff -C2 -d -r1.135 -r1.136
*** Space.java 16 Apr 2007 15:55:22 -0000 1.135
--- Space.java 23 Apr 2007 15:55:41 -0000 1.136
***************
*** 2489,2513 ****
/**
! * Add surfaces to this space
* @param surfaces Collection of surfaces
*/
public void addAll(Collection<Surface> surfaces) {
for (Surface surface : surfaces) {
! for (Edge edge : surface.getEdges()) {
! Vertex from = edge.getFrom();
! if (from.getOwner() == null) {
! this.add(from);
! }
! Vertex to = edge.getTo();
! if (to.getOwner() == null) {
! this.add(to);
! }
! if (edge.getOwner() == null) {
! this.add(edge);
! }
}
! if (surface.getOwner() == null) {
! this.add(surface);
}
}
}
--- 2489,2521 ----
/**
! * Add surfaces and all of its geometry to this space
* @param surfaces Collection of surfaces
*/
public void addAll(Collection<Surface> surfaces) {
for (Surface surface : surfaces) {
! addAll(surface);
! }
! }
!
! /**
! * Add surface and all of its geometry to this space
! * @param surface the surface to add
! */
! public void addAll(Surface surface) {
! for (Edge edge : surface.getEdges()) {
! Vertex from = edge.getFrom();
! if (from.getOwner() == null) {
! this.add(from);
}
! Vertex to = edge.getTo();
! if (to.getOwner() == null) {
! this.add(to);
}
+ if (edge.getOwner() == null) {
+ this.add(edge);
+ }
+ }
+ if (surface.getOwner() == null) {
+ this.add(surface);
}
}
|