[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Camera.java, 1.55, 1.56
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2008-01-07 15:24:16
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31808/src/net/sourceforge/bprocessor/model Modified Files: Camera.java Log Message: fixed zoomon to correspond to new focalwidth calculations Index: Camera.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Camera.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Camera.java 7 Jan 2008 14:52:06 -0000 1.55 --- Camera.java 7 Jan 2008 15:24:01 -0000 1.56 *************** *** 480,485 **** * @param aspect the acspect ratio of the view. * @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) { --- 480,486 ---- * @param aspect the acspect ratio of the view. * @param c the Collection of object to zoom on to. + * @param d adjust of focalwidth */ ! public void zoomOn(Collection<? extends Geometric> c, double aspect, double d) { Set<Vertex> allVertices = new HashSet<Vertex>(); for (Geometric g : c) { *************** *** 503,507 **** //Setting up camera ! double halfFocal = this.getFocalwidth() / 2.0; double halfFocalVerTan = Math.tan(Math.toRadians(halfFocal)); double halfFocalHorTan = halfFocalVerTan * aspect; --- 504,508 ---- //Setting up camera ! double halfFocal = d * getFocalwidth() / 2.0; double halfFocalVerTan = Math.tan(Math.toRadians(halfFocal)); double halfFocalHorTan = halfFocalVerTan * aspect; *************** *** 700,704 **** Collection<Surface> c = new LinkedList<Surface>(); c.add(s); ! currentCamera.zoomOn(c, 1.0); } --- 701,705 ---- Collection<Surface> c = new LinkedList<Surface>(); c.add(s); ! currentCamera.zoomOn(c, 1.0, 1.0); } |