Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17795/src/net/sourceforge/bprocessor/model
Modified Files:
Camera.java
Log Message:
"optimized" the zoomOn method by only collecting vertices from the envelope for spaces on levels below project level
Index: Camera.java
===================================================================
RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Camera.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** Camera.java 16 Apr 2007 15:55:22 -0000 1.40
--- Camera.java 8 May 2007 11:11:02 -0000 1.41
***************
*** 471,476 ****
* @param c the Collection of object to zoom on to.
*/
! public void zoomOn(Collection c, double aspect) {
! Set<Vertex> allVertices = Geometry.collect(c);
if (!allVertices.isEmpty()) {
--- 471,487 ----
* @param c the Collection of object to zoom on to.
*/
! public void zoomOn(Collection<? extends Geometric> c, double aspect) {
! Set<Vertex> allVertices = new HashSet<Vertex>();
! for (Geometric g : c) {
! if (g instanceof Space) {
! if (((Space)g).getLevel() == Space.PROJECT_LEVEL) {
! allVertices.addAll(Geometry.collect(((Space)g).getSurfaces()));
! } else {
! allVertices.addAll(Geometry.collect(((Space)g).getEnvelope()));
! }
! } else {
! allVertices.addAll(g.collect());
! }
! }
if (!allVertices.isEmpty()) {
|