[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Project.java,1.38,1.39 Selection.java
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2006-02-22 11:33:26
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20670/src/net/sourceforge/bprocessor/model Modified Files: Project.java Selection.java Log Message: Selection of a camera changes the camera used in GL. It is selection that detects that the selected object is a camera and tells project to use that cam as currentCam. Index: Selection.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Selection.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Selection.java 13 Jan 2006 13:22:53 -0000 1.6 --- Selection.java 22 Feb 2006 11:03:23 -0000 1.7 *************** *** 142,145 **** --- 142,148 ---- current.update(this); } + if (!selection.isEmpty() && this.selection.get(0) instanceof Camera) { + Project.getInstance().setCurrentCamera((Camera)this.selection.get(0)); + } } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** Project.java 14 Feb 2006 11:56:25 -0000 1.38 --- Project.java 22 Feb 2006 11:03:23 -0000 1.39 *************** *** 132,139 **** Camera cam0 = Camera.create(Camera.VIEW_3D); // The starting cam (copy of 3d cam) cam0.setId(new Long(cameraId++)); cameras.put(cam0.getId(), cam0); - Camera cam1 = Camera.create(Camera.VIEW_3D); // Reset to 3D position - cam1.setId(new Long(cameraId++)); - cameras.put(cam1.getId(), cam1); Camera cam2 = Camera.create(Camera.VIEW_XY); // Reset to 2D position XY with ortho cam2.setId(new Long(cameraId++)); --- 132,137 ---- Camera cam0 = Camera.create(Camera.VIEW_3D); // The starting cam (copy of 3d cam) cam0.setId(new Long(cameraId++)); + cam0.setName("default"); cameras.put(cam0.getId(), cam0); Camera cam2 = Camera.create(Camera.VIEW_XY); // Reset to 2D position XY with ortho cam2.setId(new Long(cameraId++)); |