Changeset 14339
- Timestamp:
- 02/11/13 14:50:40 (12 years ago)
- Location:
- issm/trunk-jpl/src/android/ISSM
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/android/ISSM/.project
r13890 r14339 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <projectDescription> 3 <name>ISSM </name>3 <name>ISSM_Android</name> 4 4 <comment></comment> 5 5 <projects> -
issm/trunk-jpl/src/android/ISSM/src/com/example/issm/MyGLRenderer.java
r14249 r14339 138 138 { 139 139 // Set the background frame color 140 GLES20.glClearColor(0. 0f, 0.0f, 0.0f, 1.0f);140 GLES20.glClearColor(0.2f, 0.4f, 1.0f, 1.0f); 141 141 142 142 // Position the eye behind the origin. … … 274 274 mProjectionMatrix = new float[triangleVert.length][16]; 275 275 for (int i = 0; i < triangleVert.length; i++) 276 Matrix.frustumM(mProjectionMatrix[i], 0, -ratio*0.7f, ratio*1.0f, 0.0f, 1.0f, 1.0f, 14f); 276 Matrix.frustumM(mProjectionMatrix[i], 0, -ratio, ratio, -1, 1, 1f, 5); 277 277 278 } 278 279 -
issm/trunk-jpl/src/android/ISSM/src/com/example/issm/MyGLSurfaceView.java
r14249 r14339 96 96 } 97 97 98 /*scale coordinates: */98 99 99 xmin=0; ymin=0; xmax=0; ymax=0; 100 100 … … 106 106 if (f[i][1]>ymax) ymax=f[i][1]; 107 107 } 108 108 109 109 for (int i = 0; i < size; i++) { 110 f[i][0] = (f[i][0]-xmin)/(xmax-xmin)*XSCALE_FACTOR; 111 f[i][1] = (f[i][1]-ymin)/(ymax-ymin)*YSCALE_FACTOR; 112 f[i][7] = (f[i][7]-xmin)/(xmax-xmin)*XSCALE_FACTOR; 113 f[i][8] = (f[i][8]-ymin)/(ymax-ymin)*YSCALE_FACTOR; 114 f[i][14] = (f[i][14]-xmin)/(xmax-xmin)*XSCALE_FACTOR; 115 f[i][15] = (f[i][15]-ymin)/(ymax-ymin)*YSCALE_FACTOR; 116 } 117 118 //Random r = new Random(); 119 //float z1,z2,z3; 120 for(int i = 0 ; i <size; i++) 121 { 122 //r.nextFloat() will generate random from 0-1 123 124 System.out.println(f[i][2]); 125 System.out.println(f[i][9]); 126 System.out.println(f[i][16]); 127 128 //System.out.println("z = " + z1 + "," + z2 + "," + z3); 129 //System.out.println("x = " + f[i][1] + "," + f[i][7] + "," + f[i][14]); 130 } 131 110 f[i][0] = 2*(f[i][0]-xmin)/(xmax-xmin)-1; 111 f[i][1] = 2*(f[i][1]-ymin)/(ymax-ymin)-1; 112 f[i][7] = 2*(f[i][7]-xmin)/(xmax-xmin)-1; 113 f[i][8] = 2*(f[i][8]-ymin)/(ymax-ymin)-1; 114 f[i][14] = 2*(f[i][14]-xmin)/(xmax-xmin)-1; 115 f[i][15] = 2*(f[i][15]-ymin)/(ymax-ymin)-1; 116 } 117 132 118 mRend = new MyGLRenderer(f); 133 119 // Set the Renderer for drawing on the GLSurfaceView
Note:
See TracChangeset
for help on using the changeset viewer.