Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv464/src/net/sourceforge/bprocessor/gl/view
Modified Files:
View.java
Log Message:
Removed camera from the gl module now it fetches it from the project
Index: View.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** View.java 9 Feb 2006 14:16:28 -0000 1.59
--- View.java 11 Feb 2006 18:00:00 -0000 1.60
***************
*** 272,278 ****
private Set tempVertices;
- /** The camera for the view */
- private Camera camera;
-
static {
setTransparency(100);
--- 272,275 ----
***************
*** 354,360 ****
* The constructor
* @param glv The glview
- * @param camera the Camera
*/
! public View(GLView glv, Camera camera) {
this.glv = glv;
clippingPlanes = new ArrayList();
--- 351,356 ----
* The constructor
* @param glv The glview
*/
! public View(GLView glv) {
this.glv = glv;
clippingPlanes = new ArrayList();
***************
*** 366,370 ****
tempSurfaces = new HashSet();
tempVertices = new HashSet();
- this.camera = camera;
Toolbar tb = Toolbar.getInstance();
--- 362,365 ----
***************
*** 2118,2122 ****
double aspect = width / height;
!
double[] eye = camera.getCamera();
double[] center = camera.getCenter();
--- 2113,2118 ----
double aspect = width / height;
! /** fetch the current camera */
! Camera camera = Project.getInstance().getCurrentCamera();
double[] eye = camera.getCamera();
double[] center = camera.getCenter();
***************
*** 2133,2137 ****
if (camera.getType() == Camera.ORTHOGRAPHIC) {
double tal = Math.tan(focalwidth) * length;
! gl.glOrtho(tal, -tal, tal, -tal, near, far); //TODO find the best pararms
} else if (camera.getType() == Camera.PERSPECTIVE) {
// fovy, aspect, near, far (relative to camera position)
--- 2129,2133 ----
if (camera.getType() == Camera.ORTHOGRAPHIC) {
double tal = Math.tan(focalwidth) * length;
! glu.gluOrtho2D(tal, -tal, tal, -tal); //TODO find the best pararms
} else if (camera.getType() == Camera.PERSPECTIVE) {
// fovy, aspect, near, far (relative to camera position)
***************
*** 2342,2360 ****
}
}
-
- /**
- * Getter for camera
- * @return the Camera
- */
- public Camera getCamera() {
- return camera;
- }
-
- /**
- * Setter for camera
- * @param camera the Camera
- */
- public void setCamera(Camera camera) {
- this.camera = camera;
- }
}
--- 2338,2340 ----
|