.. | .. |
---|
56 | 56 | static int CURRENTANTIALIAS = 0; // 1; |
---|
57 | 57 | /*static*/ boolean RENDERSHADOW = true; |
---|
58 | 58 | /*static*/ int RENDERPROGRAM = 2; // 0 == none, 1 == fast, 2 == normal |
---|
59 | | - static boolean ANIMATION = false; |
---|
60 | | - static String filename; |
---|
61 | 59 | |
---|
62 | 60 | boolean DISPLAYTEXT = false; |
---|
63 | 61 | //boolean REDUCETEXTURE = true; |
---|
.. | .. |
---|
92 | 90 | |
---|
93 | 91 | static int tickcount = 0; // slow pose issue |
---|
94 | 92 | |
---|
| 93 | +static boolean BUTTONLESSWHEEL = false; |
---|
| 94 | +static boolean ZOOMBOXMODE = false; |
---|
95 | 95 | static boolean BOXMODE = false; |
---|
96 | 96 | static boolean IMAGEFLIP = false; |
---|
97 | 97 | static boolean SMOOTHFOCUS = false; |
---|
.. | .. |
---|
106 | 106 | static boolean OEIL = true; |
---|
107 | 107 | static boolean OEILONCE = false; // do oeilon then oeiloff |
---|
108 | 108 | static boolean LOOKAT = true; |
---|
109 | | -static boolean RANDOM = true; // false; |
---|
| 109 | +static boolean SWITCH = true; // false; |
---|
110 | 110 | static boolean HANDLES = false; // selection doesn't work!! |
---|
111 | 111 | static boolean PAINTMODE = false; |
---|
112 | 112 | |
---|
.. | .. |
---|
150 | 150 | defaultcaps.setAccumAlphaBits(16); |
---|
151 | 151 | } |
---|
152 | 152 | |
---|
153 | | - static CameraPane theRenderer; |
---|
154 | | - |
---|
155 | 153 | void SetAsGLRenderer(boolean b) |
---|
156 | 154 | { |
---|
157 | 155 | isRenderer = b; |
---|
158 | | - theRenderer = this; |
---|
| 156 | + Globals.theRenderer = this; |
---|
159 | 157 | } |
---|
160 | 158 | |
---|
161 | 159 | CameraPane(Object3D o, Camera cam, boolean withcontext) |
---|
.. | .. |
---|
193 | 191 | |
---|
194 | 192 | /// INTERFACE |
---|
195 | 193 | |
---|
| 194 | + public javax.media.opengl.GL GetGL0() |
---|
| 195 | + { |
---|
| 196 | + return null; |
---|
| 197 | + } |
---|
| 198 | + |
---|
| 199 | + public int GenList() |
---|
| 200 | + { |
---|
| 201 | + javax.media.opengl.GL gl = GetGL(); |
---|
| 202 | + return gl.glGenLists(1); |
---|
| 203 | + } |
---|
| 204 | + |
---|
| 205 | + public void NewList(int id) |
---|
| 206 | + { |
---|
| 207 | + javax.media.opengl.GL gl = GetGL(); |
---|
| 208 | + gl.glNewList(id, gl.GL_COMPILE); //_AND_EXECUTE); |
---|
| 209 | + } |
---|
| 210 | + |
---|
| 211 | + public void CallList(int id) |
---|
| 212 | + { |
---|
| 213 | + javax.media.opengl.GL gl = GetGL(); |
---|
| 214 | + gl.glCallList(id); |
---|
| 215 | + } |
---|
| 216 | + |
---|
| 217 | + public void EndList() |
---|
| 218 | + { |
---|
| 219 | + javax.media.opengl.GL gl = GetGL(); |
---|
| 220 | + gl.glEndList(); |
---|
| 221 | + } |
---|
| 222 | + |
---|
196 | 223 | public boolean IsBoxMode() |
---|
197 | 224 | { |
---|
198 | 225 | return BOXMODE; |
---|
| 226 | + } |
---|
| 227 | + |
---|
| 228 | + public boolean IsZoomBoxMode() |
---|
| 229 | + { |
---|
| 230 | + return ZOOMBOXMODE; |
---|
199 | 231 | } |
---|
200 | 232 | |
---|
201 | 233 | public void ClearDepth() |
---|
.. | .. |
---|
816 | 848 | |
---|
817 | 849 | if ((i % 100) == 0 && i != 0) |
---|
818 | 850 | { |
---|
819 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 851 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
820 | 852 | //System.out.println("Color = " + cp.vertexOcclusion.r + ", " + cp.vertexOcclusion.g + ", " + cp.vertexOcclusion.b + "; " + (int)(100.0*i/(positions.length/3)) + "% done"); |
---|
821 | 853 | System.out.println((int) (100.0 * i / (br.positions.length / 3)) + "% (" + i + " of " + (br.positions.length / 3) + ")"); |
---|
822 | 854 | } |
---|
.. | .. |
---|
848 | 880 | |
---|
849 | 881 | if ((i % 100) == 0 && i != 0) |
---|
850 | 882 | { |
---|
851 | | - CameraPane.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
| 883 | + Globals.theRenderer.setCursor(java.awt.Cursor.getPredefinedCursor(java.awt.Cursor.WAIT_CURSOR)); |
---|
852 | 884 | //System.out.println("Color = " + cp.vertexOcclusion.r + ", " + cp.vertexOcclusion.g + ", " + cp.vertexOcclusion.b + "; " + (int)(100.0*i/(positions.length/3)) + "% done"); |
---|
853 | 885 | System.out.println((int) (100.0 * i / br.VertexCount()) + "% (" + i + " of " + br.VertexCount() + ")"); |
---|
854 | 886 | } |
---|
.. | .. |
---|
1061 | 1093 | gl.glMatrixMode(gl.GL_MODELVIEW); |
---|
1062 | 1094 | } |
---|
1063 | 1095 | |
---|
| 1096 | + public void DrawBox(cVector min, cVector max) |
---|
| 1097 | + { |
---|
| 1098 | + javax.media.opengl.GL gl = GetGL(); |
---|
| 1099 | + gl.glBegin(gl.GL_LINES); |
---|
| 1100 | + |
---|
| 1101 | + gl.glVertex3d(min.x, min.y, min.z); |
---|
| 1102 | + gl.glVertex3d(min.x, min.y, max.z); |
---|
| 1103 | + gl.glVertex3d(min.x, min.y, min.z); |
---|
| 1104 | + gl.glVertex3d(min.x, max.y, min.z); |
---|
| 1105 | + gl.glVertex3d(min.x, min.y, min.z); |
---|
| 1106 | + gl.glVertex3d(max.x, min.y, min.z); |
---|
| 1107 | + |
---|
| 1108 | + gl.glVertex3d(max.x, max.y, max.z); |
---|
| 1109 | + gl.glVertex3d(min.x, max.y, max.z); |
---|
| 1110 | + gl.glVertex3d(max.x, max.y, max.z); |
---|
| 1111 | + gl.glVertex3d(max.x, min.y, max.z); |
---|
| 1112 | + gl.glVertex3d(max.x, max.y, max.z); |
---|
| 1113 | + gl.glVertex3d(max.x, max.y, min.z); |
---|
| 1114 | + |
---|
| 1115 | + gl.glEnd(); |
---|
| 1116 | + } |
---|
| 1117 | + |
---|
| 1118 | + public void DrawGeometry(BoundaryRep bRep, boolean flipV, boolean selectmode) |
---|
| 1119 | + { |
---|
| 1120 | + int[] strips = bRep.getRawIndices(); |
---|
| 1121 | + |
---|
| 1122 | + javax.media.opengl.GL gl = GetGL(); |
---|
| 1123 | + |
---|
| 1124 | + // TRIANGLE STRIP ARRAY |
---|
| 1125 | + if (bRep.trimmed) |
---|
| 1126 | + { |
---|
| 1127 | + float[] v = bRep.getRawVertices(); |
---|
| 1128 | + float[] n = bRep.getRawNormals(); |
---|
| 1129 | + float[] c = bRep.getRawColors(); |
---|
| 1130 | + float[] uv = bRep.getRawUVMap(); |
---|
| 1131 | + |
---|
| 1132 | + int count2 = 0; |
---|
| 1133 | + int count3 = 0; |
---|
| 1134 | + |
---|
| 1135 | + if (n.length > 0) |
---|
| 1136 | + { |
---|
| 1137 | + for (int i = 0; i < strips.length; i++) |
---|
| 1138 | + { |
---|
| 1139 | + gl.glBegin(gl.GL_TRIANGLE_STRIP); |
---|
| 1140 | + |
---|
| 1141 | + /* |
---|
| 1142 | + boolean locked = false; |
---|
| 1143 | + float eps = 0.1f; |
---|
| 1144 | + boolean wrap = CameraPane.UVWRAP; // true; // UV WRAP TEXTURE ISSUE: true = artifacts, false = nice |
---|
| 1145 | + |
---|
| 1146 | + int dot = 0; |
---|
| 1147 | + |
---|
| 1148 | + if ((dot&1) == 0) |
---|
| 1149 | + dot |= (Math.abs(qv.s - pv.s) < eps && Math.abs(qv.t - pv.t) < eps) ? 3 : 1; |
---|
| 1150 | + |
---|
| 1151 | + if (wrap || (dot&2) != 0) // Math.abs(qv.s - pv.s) < eps && Math.abs(qv.t - pv.t) < eps) |
---|
| 1152 | + gl.glTexCoord2f((float) qv.s, (float) qv.t); |
---|
| 1153 | + else |
---|
| 1154 | + { |
---|
| 1155 | + locked = true; |
---|
| 1156 | + gl.glTexCoord2f((float) pv.s, (float) pv.t); |
---|
| 1157 | + } |
---|
| 1158 | + //System.out.println("vertexq = " + qv.x + ", " + qv.y + ", " + qv.z); |
---|
| 1159 | + gl.glVertex3f((float) qv.x, (float) qv.y, (float) qv.z); |
---|
| 1160 | + if (hasnorm) |
---|
| 1161 | + { |
---|
| 1162 | + //System.out.println("normalr = " + rv.norm.x + ", " + rv.norm.y + ", " + rv.norm.z); |
---|
| 1163 | + gl.glNormal3f((float) rv.norm.x, (float) rv.norm.y, (float) rv.norm.z); |
---|
| 1164 | + } |
---|
| 1165 | + |
---|
| 1166 | + if ((dot&4) == 0) |
---|
| 1167 | + dot |= (Math.abs(rv.s - pv.s) < eps && Math.abs(rv.t - pv.t) < eps) ? 12 : 4; |
---|
| 1168 | + |
---|
| 1169 | + if (wrap || !locked && (dot&8) != 0) |
---|
| 1170 | + gl.glTexCoord2f((float) rv.s, (float) rv.t); |
---|
| 1171 | + else |
---|
| 1172 | + gl.glTexCoord2f((float) pv.s, (float) pv.t); |
---|
| 1173 | + |
---|
| 1174 | + f.dot = dot; |
---|
| 1175 | + */ |
---|
| 1176 | + |
---|
| 1177 | + if (!selectmode) |
---|
| 1178 | + { |
---|
| 1179 | + if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0) |
---|
| 1180 | + { |
---|
| 1181 | + gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]); |
---|
| 1182 | + } else |
---|
| 1183 | + { |
---|
| 1184 | + gl.glNormal3f(0, 0, 1); |
---|
| 1185 | + } |
---|
| 1186 | + |
---|
| 1187 | + if (c != null) |
---|
| 1188 | + //System.out.println("glcolor = " + c[count3] + ", " + c[count3+1] + ", " + c[count3+2]); |
---|
| 1189 | + { |
---|
| 1190 | + gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1); |
---|
| 1191 | + } |
---|
| 1192 | + } |
---|
| 1193 | + if (flipV) |
---|
| 1194 | + gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]); |
---|
| 1195 | + else |
---|
| 1196 | + gl.glTexCoord2f(uv[count2], uv[count2 + 1]); |
---|
| 1197 | + //System.out.println("vertex1 = " + v[count3] + ", " + v[count3+1] + ", " + v[count3+2]); |
---|
| 1198 | + gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]); |
---|
| 1199 | + |
---|
| 1200 | + count2 += 2; |
---|
| 1201 | + count3 += 3; |
---|
| 1202 | + if (!selectmode) |
---|
| 1203 | + { |
---|
| 1204 | + if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0) |
---|
| 1205 | + { |
---|
| 1206 | + gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]); |
---|
| 1207 | + } else |
---|
| 1208 | + { |
---|
| 1209 | + gl.glNormal3f(0, 0, 1); |
---|
| 1210 | + } |
---|
| 1211 | + if (c != null) |
---|
| 1212 | + { |
---|
| 1213 | + gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1); |
---|
| 1214 | + } |
---|
| 1215 | + } |
---|
| 1216 | + if (flipV) |
---|
| 1217 | + gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]); |
---|
| 1218 | + else |
---|
| 1219 | + gl.glTexCoord2f(uv[count2], uv[count2 + 1]); |
---|
| 1220 | + //System.out.println("vertex2 = " + v[count3] + ", " + v[count3+1] + ", " + v[count3+2]); |
---|
| 1221 | + gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]); |
---|
| 1222 | + |
---|
| 1223 | + count2 += 2; |
---|
| 1224 | + count3 += 3; |
---|
| 1225 | + for (int j = 0; j < strips[i] - 2; j++) |
---|
| 1226 | + { |
---|
| 1227 | + //gl.glTexCoord2d(...); |
---|
| 1228 | + if (!selectmode) |
---|
| 1229 | + { |
---|
| 1230 | + if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0) |
---|
| 1231 | + { |
---|
| 1232 | + gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]); |
---|
| 1233 | + } else |
---|
| 1234 | + { |
---|
| 1235 | + gl.glNormal3f(0, 0, 1); |
---|
| 1236 | + } |
---|
| 1237 | + if (c != null) |
---|
| 1238 | + { |
---|
| 1239 | + gl.glColor4f(c[count3/3], c[count3/3 /* + 1*/], c[count3/3 /* + 2*/], 1); |
---|
| 1240 | + } |
---|
| 1241 | + } |
---|
| 1242 | + |
---|
| 1243 | + if (flipV) |
---|
| 1244 | + gl.glTexCoord2f(uv[count2], 1-uv[count2 + 1]); |
---|
| 1245 | + else |
---|
| 1246 | + gl.glTexCoord2f(uv[count2], uv[count2 + 1]); |
---|
| 1247 | + //System.out.println("coord3 = " + uv[count2] + ", " + uv[count2+1]); |
---|
| 1248 | + gl.glVertex3f(v[count3], v[count3 + 1], v[count3 + 2]); |
---|
| 1249 | + count2 += 2; |
---|
| 1250 | + count3 += 3; |
---|
| 1251 | + } |
---|
| 1252 | + |
---|
| 1253 | + gl.glEnd(); |
---|
| 1254 | + } |
---|
| 1255 | + } |
---|
| 1256 | + |
---|
| 1257 | + assert count3 == v.length; |
---|
| 1258 | + } |
---|
| 1259 | + else // !trimmed |
---|
| 1260 | + { |
---|
| 1261 | + int count = 0; |
---|
| 1262 | + for (int i = 0; i < strips.length; i++) |
---|
| 1263 | + { |
---|
| 1264 | + gl.glBegin(gl.GL_TRIANGLE_STRIP); |
---|
| 1265 | + |
---|
| 1266 | + Vertex p = bRep.GetVertex(bRep.indices[count++]); |
---|
| 1267 | + Vertex q = bRep.GetVertex(bRep.indices[count++]); |
---|
| 1268 | + |
---|
| 1269 | + drawVertex(gl, p, flipV, selectmode); |
---|
| 1270 | + drawVertex(gl, q, flipV, selectmode); |
---|
| 1271 | + |
---|
| 1272 | + for (int j = 0; j < strips[i] - 2; j++) |
---|
| 1273 | + { |
---|
| 1274 | + Vertex r = bRep.GetVertex(bRep.indices[count++]); |
---|
| 1275 | + |
---|
| 1276 | + // if (j%2 == 0) |
---|
| 1277 | + // drawFace(p, q, r, display, null); |
---|
| 1278 | + // else |
---|
| 1279 | + // drawFace(p, r, q, display, null); |
---|
| 1280 | + |
---|
| 1281 | + // p = q; |
---|
| 1282 | + // q = r; |
---|
| 1283 | + drawVertex(gl, r, flipV, selectmode); |
---|
| 1284 | + } |
---|
| 1285 | + |
---|
| 1286 | + gl.glEnd(); |
---|
| 1287 | + } |
---|
| 1288 | + } |
---|
| 1289 | + } |
---|
| 1290 | + |
---|
| 1291 | + static cSpring.Point3D temp = new cSpring.Point3D(); |
---|
| 1292 | + static cSpring.Point3D temp2 = new cSpring.Point3D(); |
---|
| 1293 | + static cSpring.Point3D temp3 = new cSpring.Point3D(); |
---|
| 1294 | + |
---|
| 1295 | + public void DrawDynamicMesh(cMesh mesh) |
---|
| 1296 | + { |
---|
| 1297 | + GL gl = GetGL(); // getGL(); |
---|
| 1298 | + |
---|
| 1299 | + cSpring.PhysicsController3D Phys = mesh.Phys; |
---|
| 1300 | + |
---|
| 1301 | + gl.glDisable(gl.GL_LIGHTING); |
---|
| 1302 | + |
---|
| 1303 | + gl.glLineWidth(1); |
---|
| 1304 | + gl.glColor3f(1,1,1); |
---|
| 1305 | + gl.glBegin(gl.GL_LINES); |
---|
| 1306 | + double scale = 0; |
---|
| 1307 | + int count = 0; |
---|
| 1308 | + for (int s=0; s<Phys.allSprings.size(); s++) |
---|
| 1309 | + { |
---|
| 1310 | + cSpring.Spring spring = Phys.allSprings.get(s); |
---|
| 1311 | + if(s == 0) |
---|
| 1312 | + { |
---|
| 1313 | + //System.out.println(" spring : " + spring.a.position + "; " + spring.b.position); |
---|
| 1314 | + } |
---|
| 1315 | + if (mesh.showsprings) |
---|
| 1316 | + { |
---|
| 1317 | + temp.set(spring.a.position); |
---|
| 1318 | + temp.add(spring.b.position); |
---|
| 1319 | + temp.mul(0.5); |
---|
| 1320 | + temp2.set(spring.a.position); |
---|
| 1321 | + temp2.sub(spring.b.position); |
---|
| 1322 | + temp2.mul(spring.restLength/2); |
---|
| 1323 | + temp.sub(temp2); |
---|
| 1324 | + gl.glVertex3f((float)temp.x, (float)temp.y, (float)temp.z); |
---|
| 1325 | + temp.add(temp2); |
---|
| 1326 | + temp.add(temp2); |
---|
| 1327 | + gl.glVertex3f((float)temp.x, (float)temp.y, (float)temp.z); |
---|
| 1328 | + } |
---|
| 1329 | + |
---|
| 1330 | + if (spring.isHandle) |
---|
| 1331 | + continue; |
---|
| 1332 | + |
---|
| 1333 | + //if (scale < spring.restLength) |
---|
| 1334 | + scale += spring.restLength; |
---|
| 1335 | + count++; |
---|
| 1336 | + } |
---|
| 1337 | + gl.glEnd(); |
---|
| 1338 | + |
---|
| 1339 | + if (count == 0) |
---|
| 1340 | + scale = 0.01; |
---|
| 1341 | + else |
---|
| 1342 | + scale /= count * 3; |
---|
| 1343 | + |
---|
| 1344 | + //scale = 0.25; |
---|
| 1345 | + |
---|
| 1346 | + if (mesh.ShowInfo()) |
---|
| 1347 | + { |
---|
| 1348 | + gl.glLineWidth(4); |
---|
| 1349 | + for (int s=0; s<Phys.allNodes.size(); s++) |
---|
| 1350 | + { |
---|
| 1351 | + cSpring.DynamicNode node = Phys.allNodes.get(s); |
---|
| 1352 | + if (node.mass == 0) |
---|
| 1353 | + continue; |
---|
| 1354 | + |
---|
| 1355 | + int i = node.springs==null?-1:node.springs.size(); |
---|
| 1356 | + gl.glColor3f((i>>2)&1,(i>>1)&1,i&1); |
---|
| 1357 | + //temp.set(node.springForce.x, node.springForce.y, node.springForce.z); |
---|
| 1358 | + //temp.normalize(); |
---|
| 1359 | + //gl.glColor3d((temp.x+1)/2, (temp.y+1)/2, (temp.z+1)/2); |
---|
| 1360 | + gl.glBegin(gl.GL_LINES); |
---|
| 1361 | + gl.glVertex3d(node.position.x, node.position.y, node.position.z); |
---|
| 1362 | + //gl.glVertex3d(node.position.x + node.normal.x*scale, node.position.y + node.normal.y*scale, node.position.z + node.normal.z*scale); |
---|
| 1363 | + gl.glVertex3d(node.position.x + mesh.bRep.GetVertex(s).norm.x*scale, |
---|
| 1364 | + node.position.y + mesh.bRep.GetVertex(s).norm.y*scale, |
---|
| 1365 | + node.position.z + mesh.bRep.GetVertex(s).norm.z*scale); |
---|
| 1366 | + gl.glEnd(); |
---|
| 1367 | + } |
---|
| 1368 | + |
---|
| 1369 | + gl.glLineWidth(8); |
---|
| 1370 | + for (int s=0; s<Phys.allNodes.size(); s++) |
---|
| 1371 | + { |
---|
| 1372 | + cSpring.DynamicNode node = Phys.allNodes.get(s); |
---|
| 1373 | + |
---|
| 1374 | + if (node.springs != null) |
---|
| 1375 | + { |
---|
| 1376 | + for (int i=0; i<node.springs.size(); i+=1) |
---|
| 1377 | + { |
---|
| 1378 | + cSpring.DynamicNode f = node.springs.get(i).GetOther(node); |
---|
| 1379 | + |
---|
| 1380 | + int c = i+1; |
---|
| 1381 | + // c = node.springs.get(i).nbcopies; |
---|
| 1382 | + |
---|
| 1383 | + gl.glColor3f((c>>2)&1,(c>>1)&1,c&1); |
---|
| 1384 | + gl.glBegin(gl.GL_LINES); |
---|
| 1385 | + gl.glVertex3d(node.position.x, node.position.y, node.position.z); |
---|
| 1386 | + gl.glVertex3d(f.position.x/3+node.position.x*2/3, f.position.y/3+node.position.y*2/3, f.position.z/3+node.position.z*2/3); |
---|
| 1387 | + gl.glEnd(); |
---|
| 1388 | + } |
---|
| 1389 | + } |
---|
| 1390 | + } |
---|
| 1391 | + |
---|
| 1392 | + gl.glLineWidth(1); |
---|
| 1393 | + } |
---|
| 1394 | + |
---|
| 1395 | + gl.glEnable(gl.GL_LIGHTING); |
---|
| 1396 | + } |
---|
| 1397 | + |
---|
1064 | 1398 | /// INTERFACE |
---|
| 1399 | + |
---|
| 1400 | + public void StartTriangles() |
---|
| 1401 | + { |
---|
| 1402 | + javax.media.opengl.GL gl = GetGL(); |
---|
| 1403 | + gl.glBegin(gl.GL_TRIANGLES); |
---|
| 1404 | + } |
---|
| 1405 | + |
---|
| 1406 | + public void EndTriangles() |
---|
| 1407 | + { |
---|
| 1408 | + GetGL().glEnd(); |
---|
| 1409 | + } |
---|
| 1410 | + |
---|
| 1411 | + void drawVertex(javax.media.opengl.GL gl, Vertex pv, boolean flipV, boolean selectmode) |
---|
| 1412 | + { |
---|
| 1413 | + if (!selectmode) |
---|
| 1414 | + { |
---|
| 1415 | + gl.glNormal3f((float) pv.norm.x, (float) pv.norm.y, (float) pv.norm.z); |
---|
| 1416 | + gl.glColor4f(pv.AO, pv.AO, pv.AO, 1); |
---|
| 1417 | + |
---|
| 1418 | + if (flipV) |
---|
| 1419 | + gl.glTexCoord2f((float) pv.s, 1-(float) pv.t); |
---|
| 1420 | + else |
---|
| 1421 | + gl.glTexCoord2f((float) pv.s, (float) pv.t); |
---|
| 1422 | + } |
---|
| 1423 | + |
---|
| 1424 | + gl.glVertex3f((float) pv.x, (float) pv.y, (float) pv.z); |
---|
| 1425 | + } |
---|
1065 | 1426 | |
---|
1066 | 1427 | void SetColor(Object3D obj, Vertex p0) |
---|
1067 | 1428 | { |
---|
.. | .. |
---|
1256 | 1617 | //col.getColorComponents(ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), CameraPane.modelParams0); |
---|
1257 | 1618 | if (!material.multiply) |
---|
1258 | 1619 | { |
---|
1259 | | - display.color = color; |
---|
| 1620 | + display.color = material.color; |
---|
1260 | 1621 | display.saturation = material.modulation; |
---|
1261 | 1622 | } |
---|
1262 | 1623 | else |
---|
1263 | 1624 | { |
---|
1264 | | - display.color *= color*2; |
---|
| 1625 | + display.color *= material.color*2; |
---|
1265 | 1626 | display.saturation *= material.modulation*2; |
---|
1266 | 1627 | } |
---|
1267 | 1628 | |
---|
1268 | 1629 | cColor.HSBtoRGB(display.color, display.saturation, 1, display.modelParams0); |
---|
1269 | 1630 | |
---|
1270 | | - float[] colorV = GrafreeD.colorV; |
---|
| 1631 | + float[] colorV = Grafreed.colorV; |
---|
1271 | 1632 | |
---|
1272 | 1633 | /**/ |
---|
1273 | 1634 | if (display.DrawMode() == display.DEFAULT) // && display.RENDERPROGRAM == 0) |
---|
.. | .. |
---|
1624 | 1985 | |
---|
1625 | 1986 | static int camerachangeframe; |
---|
1626 | 1987 | |
---|
1627 | | - boolean SetCamera(Camera cam) |
---|
| 1988 | + public boolean SetCamera(Camera cam) |
---|
1628 | 1989 | { |
---|
1629 | 1990 | // may 2014 if (cam == cameras[0] || cam == cameras[1]) |
---|
1630 | 1991 | // return false; |
---|
.. | .. |
---|
1752 | 2113 | mainDL ^= true; |
---|
1753 | 2114 | } |
---|
1754 | 2115 | |
---|
1755 | | - void ToggleTexture() |
---|
1756 | | - { |
---|
1757 | | - textureon ^= true; |
---|
1758 | | - } |
---|
1759 | | - |
---|
1760 | | - void ToggleLive() |
---|
1761 | | - { |
---|
1762 | | - Globals.setLIVE(Globals.isLIVE() ^ true); |
---|
1763 | | - |
---|
1764 | | - System.err.println("LIVE = " + Globals.isLIVE()); |
---|
1765 | | - |
---|
1766 | | - if (!Globals.isLIVE()) // save sound |
---|
1767 | | - GrafreeD.savesound = true; // wav.save(); |
---|
1768 | | - // else |
---|
1769 | | - repaint(); // start loop // may 2013 |
---|
1770 | | - } |
---|
1771 | | - |
---|
1772 | | - void ToggleSupport() |
---|
1773 | | - { |
---|
1774 | | - SUPPORT ^= true; |
---|
1775 | | - } |
---|
1776 | | - |
---|
1777 | | - void ToggleAbort() |
---|
1778 | | - { |
---|
1779 | | - ABORTMODE ^= true; |
---|
1780 | | - } |
---|
1781 | | - |
---|
1782 | 2116 | void ToggleFullScreen() |
---|
1783 | 2117 | { |
---|
1784 | 2118 | FULLSCREEN ^= true; |
---|
.. | .. |
---|
1789 | 2123 | Globals.CROWD ^= true; |
---|
1790 | 2124 | } |
---|
1791 | 2125 | |
---|
1792 | | - void ToggleInertia() |
---|
1793 | | - { |
---|
1794 | | - INERTIA ^= true; |
---|
1795 | | - } |
---|
1796 | | - |
---|
1797 | 2126 | void ToggleLocal() |
---|
1798 | 2127 | { |
---|
1799 | 2128 | LOCALTRANSFORM ^= true; |
---|
1800 | 2129 | } |
---|
1801 | 2130 | |
---|
1802 | | - void ToggleFast() |
---|
| 2131 | + public void ToggleTexture() |
---|
| 2132 | + { |
---|
| 2133 | + textureon ^= true; |
---|
| 2134 | + } |
---|
| 2135 | + |
---|
| 2136 | + public void ToggleLive() |
---|
| 2137 | + { |
---|
| 2138 | + Globals.setLIVE(Globals.isLIVE() ^ true); |
---|
| 2139 | + |
---|
| 2140 | + System.err.println("LIVE = " + Globals.isLIVE()); |
---|
| 2141 | + |
---|
| 2142 | + if (!Globals.isLIVE()) // save sound |
---|
| 2143 | + Grafreed.savesound = true; // wav.save(); |
---|
| 2144 | + // else |
---|
| 2145 | + repaint(); // start loop // may 2013 |
---|
| 2146 | + } |
---|
| 2147 | + |
---|
| 2148 | + public void ToggleSupport() |
---|
| 2149 | + { |
---|
| 2150 | + SUPPORT ^= true; |
---|
| 2151 | + } |
---|
| 2152 | + |
---|
| 2153 | + public void ToggleAbort() |
---|
| 2154 | + { |
---|
| 2155 | + ABORTMODE ^= true; |
---|
| 2156 | + } |
---|
| 2157 | + |
---|
| 2158 | + public void ToggleInertia() |
---|
| 2159 | + { |
---|
| 2160 | + INERTIA ^= true; |
---|
| 2161 | + } |
---|
| 2162 | + |
---|
| 2163 | + public void ToggleFast() |
---|
1803 | 2164 | { |
---|
1804 | 2165 | FAST ^= true; |
---|
1805 | 2166 | } |
---|
1806 | 2167 | |
---|
1807 | | - void ToggleSlowPose() |
---|
| 2168 | + public void ToggleSlowPose() |
---|
1808 | 2169 | { |
---|
1809 | 2170 | SLOWPOSE ^= true; |
---|
1810 | 2171 | } |
---|
1811 | 2172 | |
---|
1812 | | - void ToggleFootContact() |
---|
1813 | | - { |
---|
1814 | | - FOOTCONTACT ^= true; |
---|
1815 | | - } |
---|
1816 | | - |
---|
1817 | | - void ToggleBoxMode() |
---|
| 2173 | + public void ToggleBoxMode() |
---|
1818 | 2174 | { |
---|
1819 | 2175 | BOXMODE ^= true; |
---|
1820 | 2176 | } |
---|
1821 | 2177 | |
---|
1822 | | - void ToggleSmoothFocus() |
---|
| 2178 | + public void ToggleZoomBoxMode() |
---|
| 2179 | + { |
---|
| 2180 | + ZOOMBOXMODE ^= true; |
---|
| 2181 | + } |
---|
| 2182 | + |
---|
| 2183 | + public void ToggleSmoothFocus() |
---|
1823 | 2184 | { |
---|
1824 | 2185 | SMOOTHFOCUS ^= true; |
---|
1825 | 2186 | } |
---|
1826 | 2187 | |
---|
1827 | | - void ToggleImageFlip() |
---|
| 2188 | + public void ToggleImageFlip() |
---|
1828 | 2189 | { |
---|
1829 | 2190 | IMAGEFLIP ^= true; |
---|
1830 | 2191 | } |
---|
1831 | 2192 | |
---|
1832 | | - void ToggleSpeakerMocap() |
---|
| 2193 | + public void ToggleSpeakerMocap() |
---|
1833 | 2194 | { |
---|
1834 | 2195 | SPEAKERMOCAP ^= true; |
---|
1835 | 2196 | } |
---|
1836 | 2197 | |
---|
1837 | | - void ToggleSpeakerCamera() |
---|
| 2198 | + public void ToggleSpeakerCamera() |
---|
1838 | 2199 | { |
---|
1839 | 2200 | SPEAKERCAMERA ^= true; |
---|
1840 | 2201 | } |
---|
1841 | 2202 | |
---|
1842 | | - void ToggleSpeakerFocus() |
---|
| 2203 | + public void ToggleSpeakerFocus() |
---|
1843 | 2204 | { |
---|
1844 | 2205 | SPEAKERFOCUS ^= true; |
---|
1845 | 2206 | } |
---|
1846 | 2207 | |
---|
1847 | | - void ToggleDebug() |
---|
1848 | | - { |
---|
1849 | | - DEBUG ^= true; |
---|
1850 | | - } |
---|
1851 | | - |
---|
1852 | | - void ToggleFrustum() |
---|
| 2208 | + public void ToggleFrustum() |
---|
1853 | 2209 | { |
---|
1854 | 2210 | FRUSTUM ^= true; |
---|
1855 | 2211 | } |
---|
1856 | 2212 | |
---|
1857 | | - void ToggleTrack() |
---|
| 2213 | + public void ToggleTrack() |
---|
1858 | 2214 | { |
---|
1859 | 2215 | TRACK ^= true; |
---|
1860 | 2216 | if (TRACK) |
---|
.. | .. |
---|
1873 | 2229 | repaint(); |
---|
1874 | 2230 | } |
---|
1875 | 2231 | |
---|
1876 | | - void ToggleTrackOnce() |
---|
| 2232 | + public void ToggleTrackOnce() |
---|
1877 | 2233 | { |
---|
1878 | 2234 | TRACKONCE ^= true; |
---|
1879 | 2235 | } |
---|
1880 | 2236 | |
---|
1881 | | - void ToggleShadowTrack() |
---|
| 2237 | + public void ToggleShadowTrack() |
---|
1882 | 2238 | { |
---|
1883 | 2239 | SHADOWTRACK ^= true; |
---|
1884 | 2240 | repaint(); |
---|
1885 | 2241 | } |
---|
1886 | 2242 | |
---|
1887 | | - void ToggleOeil() |
---|
| 2243 | + public void ToggleOeil() |
---|
1888 | 2244 | { |
---|
1889 | 2245 | OEIL ^= true; |
---|
1890 | 2246 | } |
---|
1891 | 2247 | |
---|
1892 | | - void ToggleOeilOnce() |
---|
| 2248 | + public void ToggleOeilOnce() |
---|
1893 | 2249 | { |
---|
1894 | 2250 | OEILONCE ^= true; |
---|
| 2251 | + } |
---|
| 2252 | + |
---|
| 2253 | + void ToggleFootContact() |
---|
| 2254 | + { |
---|
| 2255 | + FOOTCONTACT ^= true; |
---|
| 2256 | + } |
---|
| 2257 | + |
---|
| 2258 | + void ToggleDebug() |
---|
| 2259 | + { |
---|
| 2260 | + DEBUG ^= true; |
---|
1895 | 2261 | } |
---|
1896 | 2262 | |
---|
1897 | 2263 | void ToggleLookAt() |
---|
.. | .. |
---|
1901 | 2267 | |
---|
1902 | 2268 | void ToggleRandom() |
---|
1903 | 2269 | { |
---|
1904 | | - RANDOM ^= true; |
---|
| 2270 | + SWITCH ^= true; |
---|
1905 | 2271 | } |
---|
1906 | 2272 | |
---|
1907 | 2273 | void ToggleHandles() |
---|
.. | .. |
---|
3840 | 4206 | |
---|
3841 | 4207 | com.sun.opengl.util.texture.Texture CompressTexture2(String name) |
---|
3842 | 4208 | { |
---|
| 4209 | + new Exception().printStackTrace(); |
---|
3843 | 4210 | System.exit(0); |
---|
3844 | 4211 | com.sun.opengl.util.texture.Texture texture = null; |
---|
3845 | 4212 | |
---|
.. | .. |
---|
7655 | 8022 | } |
---|
7656 | 8023 | } |
---|
7657 | 8024 | |
---|
7658 | | - /*boolean*/ public void BindTextures(cTexture tex, int resolution) // INTERFACE |
---|
| 8025 | + /*boolean*/ public void BindTextures(cTexture tex, int resolution) throws Exception // INTERFACE |
---|
7659 | 8026 | { |
---|
7660 | 8027 | if (// DrawMode() != 0 || /*tex == null ||*/ |
---|
7661 | 8028 | ambientOcclusion ) // || !textureon) |
---|
.. | .. |
---|
7700 | 8067 | return; // true; |
---|
7701 | 8068 | } |
---|
7702 | 8069 | |
---|
7703 | | - CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) |
---|
| 8070 | + CacheTexture GetCacheTexture(String tex, boolean bump, int resolution) throws Exception |
---|
7704 | 8071 | { |
---|
7705 | 8072 | CacheTexture/*com.sun.opengl.util.texture.Texture*/ texture = null; |
---|
7706 | 8073 | |
---|
.. | .. |
---|
7708 | 8075 | { |
---|
7709 | 8076 | String texname = tex; |
---|
7710 | 8077 | |
---|
7711 | | - String[] split = tex.split("Textures"); |
---|
7712 | | - if (split.length > 1) |
---|
7713 | | - texname = "/Users/nbriere/Textures" + split[split.length-1]; |
---|
7714 | | - else |
---|
7715 | | - if (!texname.startsWith("/")) |
---|
7716 | | - texname = "/Users/nbriere/Textures/" + texname; |
---|
| 8078 | +// String[] split = tex.split("Textures"); |
---|
| 8079 | +// if (split.length > 1) |
---|
| 8080 | +// texname = "/Users/nbriere/Textures" + split[split.length-1]; |
---|
| 8081 | +// else |
---|
| 8082 | +// if (!texname.startsWith("/")) |
---|
| 8083 | +// texname = "/Users/nbriere/Textures/" + texname; |
---|
| 8084 | + if (!new File(tex).exists()) |
---|
| 8085 | + { |
---|
| 8086 | + texname = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory() + "/Textures/" + texname; |
---|
| 8087 | + } |
---|
7717 | 8088 | |
---|
7718 | 8089 | if (CACHETEXTURE) |
---|
7719 | 8090 | texture = textures.get(texname); // TEXTURE CACHE |
---|
.. | .. |
---|
7813 | 8184 | texturedata = GetFileTexture(cachename, processbump, resolution); |
---|
7814 | 8185 | |
---|
7815 | 8186 | |
---|
7816 | | - if (texturedata != null) |
---|
| 8187 | + if (texturedata == null) |
---|
| 8188 | + throw new Exception(); |
---|
| 8189 | + |
---|
7817 | 8190 | texture = new CacheTexture(com.sun.opengl.util.texture.TextureIO.newTexture(texturedata),resolution); |
---|
7818 | 8191 | //texture = GetTexture(tex, bump); |
---|
7819 | 8192 | } |
---|
.. | .. |
---|
7935 | 8308 | return texture; |
---|
7936 | 8309 | } |
---|
7937 | 8310 | |
---|
7938 | | - com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) |
---|
| 8311 | + com.sun.opengl.util.texture.Texture GetTexture(String tex, boolean bump, int resolution) throws Exception |
---|
7939 | 8312 | { |
---|
7940 | 8313 | CacheTexture texture = GetCacheTexture(tex, bump, resolution); |
---|
7941 | 8314 | |
---|
.. | .. |
---|
7953 | 8326 | return texture!=null?texture.texture:null; |
---|
7954 | 8327 | } |
---|
7955 | 8328 | |
---|
7956 | | - com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution) |
---|
| 8329 | + public com.sun.opengl.util.texture.TextureData GetTextureData(String tex, boolean bump, int resolution) throws Exception |
---|
7957 | 8330 | { |
---|
7958 | 8331 | CacheTexture texture = GetCacheTexture(tex, bump, resolution); |
---|
7959 | 8332 | |
---|
7960 | 8333 | return texture!=null?texture.texturedata:null; |
---|
7961 | 8334 | } |
---|
7962 | 8335 | |
---|
7963 | | - boolean BindTexture(String tex, boolean bump, int resolution) |
---|
| 8336 | + boolean BindTexture(String tex, boolean bump, int resolution) throws Exception |
---|
7964 | 8337 | { |
---|
7965 | 8338 | if (/*tex == null ||*/ ambientOcclusion ) // || !textureon) |
---|
7966 | 8339 | { |
---|
.. | .. |
---|
9026 | 9399 | //gl.glFlush(); |
---|
9027 | 9400 | gl.glAccum(gl.GL_ACCUM, 1.0f / ACSIZE); |
---|
9028 | 9401 | |
---|
9029 | | - if (ANIMATION && ABORTED) |
---|
| 9402 | + if (Globals.ANIMATION && ABORTED) |
---|
9030 | 9403 | { |
---|
9031 | 9404 | System.err.println(" ABORTED FRAME"); |
---|
9032 | 9405 | break; |
---|
.. | .. |
---|
9056 | 9429 | setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); |
---|
9057 | 9430 | |
---|
9058 | 9431 | // save image |
---|
9059 | | - if (ANIMATION && !ABORTED) |
---|
| 9432 | + if (Globals.ANIMATION && !ABORTED) |
---|
9060 | 9433 | { |
---|
9061 | 9434 | VPwidth = viewport[2]; |
---|
9062 | 9435 | VPheight = viewport[3]; |
---|
.. | .. |
---|
9167 | 9540 | |
---|
9168 | 9541 | // imagecount++; |
---|
9169 | 9542 | |
---|
9170 | | - String fullname = filename + (i%100000)/10000 + "" + (i%10000)/1000 + "" + (i%1000)/100 + "" + (i%100)/10 + "" + (i%10) + "." + ext; |
---|
| 9543 | + String fullname = Globals.filename + (i%100000)/10000 + "" + (i%10000)/1000 + "" + (i%1000)/100 + "" + (i%100)/10 + "" + (i%10) + "." + ext; |
---|
9171 | 9544 | |
---|
9172 | 9545 | if (!BOXMODE) |
---|
9173 | 9546 | { |
---|
9174 | | - System.out.println("image: " + fullname + " (wav cursor=" + (GrafreeD.wav.cursor / 735 / 4) + ")"); |
---|
| 9547 | + System.out.println("image: " + fullname + " (wav cursor=" + (Grafreed.wav.cursor / 735 / 4) + ")"); |
---|
9175 | 9548 | } |
---|
9176 | 9549 | |
---|
9177 | 9550 | if (!BOXMODE) |
---|
.. | .. |
---|
9209 | 9582 | ABORTED = false; |
---|
9210 | 9583 | } |
---|
9211 | 9584 | else |
---|
9212 | | - GrafreeD.wav.cursor += 735 * ACSIZE; |
---|
| 9585 | + Grafreed.wav.cursor += 735 * ACSIZE; |
---|
9213 | 9586 | |
---|
9214 | 9587 | if (false) |
---|
9215 | 9588 | { |
---|
.. | .. |
---|
9872 | 10245 | |
---|
9873 | 10246 | public void display(GLAutoDrawable drawable) |
---|
9874 | 10247 | { |
---|
9875 | | - if (GrafreeD.savesound && GrafreeD.hassound) |
---|
| 10248 | + if (Grafreed.savesound && Grafreed.hassound) |
---|
9876 | 10249 | { |
---|
9877 | | - GrafreeD.wav.save(); |
---|
9878 | | - GrafreeD.savesound = false; |
---|
9879 | | - GrafreeD.hassound = false; |
---|
| 10250 | + Grafreed.wav.save(); |
---|
| 10251 | + Grafreed.savesound = false; |
---|
| 10252 | + Grafreed.hassound = false; |
---|
9880 | 10253 | } |
---|
9881 | 10254 | // if (DEBUG_SELECTION) |
---|
9882 | 10255 | // { |
---|
.. | .. |
---|
10006 | 10379 | Object3D theobject = object; |
---|
10007 | 10380 | Object3D theparent = object.parent; |
---|
10008 | 10381 | object.parent = null; |
---|
10009 | | - object = (Object3D)GrafreeD.clone(object); |
---|
| 10382 | + object = (Object3D)Grafreed.clone(object); |
---|
10010 | 10383 | object.Stripify(); |
---|
10011 | 10384 | if (theobject.selection == null || theobject.selection.Size() == 0) |
---|
10012 | 10385 | theobject.PreprocessOcclusion(this); |
---|
.. | .. |
---|
10427 | 10800 | // Bump noise |
---|
10428 | 10801 | gl.glActiveTexture(GL.GL_TEXTURE6); |
---|
10429 | 10802 | //gl.glBindTexture(GL.GL_TEXTURE_2D, bump_noise); |
---|
10430 | | - BindTexture(NOISE_TEXTURE, false, 2); |
---|
| 10803 | + |
---|
| 10804 | + try |
---|
| 10805 | + { |
---|
| 10806 | + BindTexture(NOISE_TEXTURE, false, 2); |
---|
| 10807 | + } |
---|
| 10808 | + catch (Exception e) |
---|
| 10809 | + { |
---|
| 10810 | + System.err.println("FAILED: " + NOISE_TEXTURE); |
---|
| 10811 | + } |
---|
| 10812 | + |
---|
10431 | 10813 | |
---|
10432 | 10814 | gl.glActiveTexture(GL.GL_TEXTURE0); |
---|
10433 | 10815 | gl.glEnable(GL.GL_TEXTURE_2D); |
---|
.. | .. |
---|
10891 | 11273 | { |
---|
10892 | 11274 | renderpass++; |
---|
10893 | 11275 | // System.out.println("Draw object... "); |
---|
| 11276 | + STEP = 1; |
---|
10894 | 11277 | if (FAST) // in case there is no script |
---|
10895 | | - STEP = 16; |
---|
| 11278 | + STEP = 8; |
---|
| 11279 | + |
---|
| 11280 | + if (CURRENTANTIALIAS == 0 || ACSIZE == 1) |
---|
| 11281 | + { |
---|
| 11282 | + STEP *= 4; |
---|
| 11283 | + } |
---|
10896 | 11284 | |
---|
10897 | 11285 | //object.FullInvariants(); |
---|
10898 | 11286 | |
---|
.. | .. |
---|
10906 | 11294 | e.printStackTrace(); |
---|
10907 | 11295 | } |
---|
10908 | 11296 | |
---|
10909 | | - if (GrafreeD.RENDERME > 0) |
---|
10910 | | - GrafreeD.RENDERME--; // mechante magouille |
---|
| 11297 | + if (Grafreed.RENDERME > 0) |
---|
| 11298 | + Grafreed.RENDERME--; // mechante magouille |
---|
10911 | 11299 | |
---|
10912 | 11300 | Globals.ONESTEP = false; |
---|
10913 | 11301 | } |
---|
.. | .. |
---|
10977 | 11365 | |
---|
10978 | 11366 | usedtextures.clear(); |
---|
10979 | 11367 | |
---|
10980 | | - BindTextures(DEFAULT_TEXTURES, 2); |
---|
| 11368 | + try |
---|
| 11369 | + { |
---|
| 11370 | + BindTextures(DEFAULT_TEXTURES, 2); |
---|
| 11371 | + } |
---|
| 11372 | + catch (Exception e) |
---|
| 11373 | + { |
---|
| 11374 | + System.err.println("FAILED: " + DEFAULT_TEXTURES); |
---|
| 11375 | + } |
---|
10981 | 11376 | } |
---|
10982 | 11377 | //System.out.println("--> " + stackdepth); |
---|
10983 | 11378 | // GrafreeD.traceon(); |
---|
.. | .. |
---|
11068 | 11463 | if (checker != null && DrawMode() == DEFAULT) |
---|
11069 | 11464 | { |
---|
11070 | 11465 | //BindTexture(IMMORTAL_TEXTURE); |
---|
11071 | | - BindTextures(checker.GetTextures(), checker.texres); |
---|
| 11466 | + try |
---|
| 11467 | + { |
---|
| 11468 | + BindTextures(checker.GetTextures(), checker.texres); |
---|
| 11469 | + } |
---|
| 11470 | + catch (Exception e) |
---|
| 11471 | + { |
---|
| 11472 | + System.err.println("FAILED: " + checker.GetTextures()); |
---|
| 11473 | + } |
---|
11072 | 11474 | // NEAREST |
---|
11073 | 11475 | GetGL().glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_NEAREST); // GL.GL_LINEAR); |
---|
11074 | 11476 | DrawChecker(gl); |
---|
.. | .. |
---|
12230 | 12632 | "MAX ndotl.x, ndotl.x, -ndotl.x;" + |
---|
12231 | 12633 | |
---|
12232 | 12634 | "SUB temp.x, one.x, ndotl.x;" + |
---|
12233 | | - "ADD temp.x, temp.x, options2.z;" + // lightsheen |
---|
12234 | | - "ADD temp.y, one.y, options2.y;" + // sursurface |
---|
| 12635 | + // Tuning for default skin |
---|
| 12636 | + //"ADD temp.x, temp.x, options2.z;" + // lightsheen |
---|
| 12637 | + "MAD temp.x, options2.z, half.y, temp.x;" + // lightsheen |
---|
| 12638 | + "ADD temp.y, one.y, options2.y;" + // subsurface |
---|
12235 | 12639 | "MUL temp.x, temp.x, temp.y;" + |
---|
12236 | 12640 | |
---|
12237 | 12641 | "MUL saturation, saturation, temp.xxxx;" + |
---|
.. | .. |
---|
13140 | 13544 | public void mousePressed(MouseEvent e) |
---|
13141 | 13545 | { |
---|
13142 | 13546 | //System.out.println("mousePressed: " + e); |
---|
13143 | | - clickStart(e.getX(), e.getY(), e.getModifiersEx()); |
---|
| 13547 | + clickStart(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx()); |
---|
13144 | 13548 | } |
---|
13145 | 13549 | |
---|
13146 | 13550 | static long prevtime = 0; |
---|
.. | .. |
---|
13167 | 13571 | |
---|
13168 | 13572 | //System.err.println("Dtime = " + Dtime + "; units = " + e.getUnitsToScroll() + "; ratio (units/ms) = " + ratio); |
---|
13169 | 13573 | |
---|
| 13574 | + if (BUTTONLESSWHEEL) |
---|
13170 | 13575 | if (Math.abs(ratio) < 0.1 || Math.abs(Dtime) == 0) // < 30) |
---|
13171 | 13576 | { |
---|
13172 | 13577 | return; |
---|
.. | .. |
---|
13175 | 13580 | boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); |
---|
13176 | 13581 | |
---|
13177 | 13582 | // TIMER |
---|
13178 | | - if (!wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR |
---|
| 13583 | + if (ZOOMBOXMODE && !wheeltimer.isRunning() && e.getModifiersEx() == 0 && !capsLocked) // VR |
---|
13179 | 13584 | { |
---|
13180 | 13585 | keepboxmode = BOXMODE; |
---|
13181 | 13586 | keepsupport = SUPPORT; |
---|
.. | .. |
---|
13215 | 13620 | // mode |= META; |
---|
13216 | 13621 | //} |
---|
13217 | 13622 | |
---|
13218 | | - SetMouseMode(WHEEL | e.getModifiersEx()); |
---|
13219 | | - drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0); |
---|
| 13623 | + SetMouseMode(e.getModifiers(), WHEEL | e.getModifiersEx()); |
---|
| 13624 | + drag(anchorX, anchorY + e.getUnitsToScroll()*8, 0, 0); |
---|
13220 | 13625 | anchorX = ax; |
---|
13221 | 13626 | anchorY = ay; |
---|
13222 | 13627 | prevX = px; |
---|
.. | .. |
---|
13276 | 13681 | // wasliveok = true; |
---|
13277 | 13682 | // waslive = false; |
---|
13278 | 13683 | |
---|
| 13684 | + // May 2019 Forget it: |
---|
| 13685 | + if (true) |
---|
| 13686 | + return; |
---|
| 13687 | + |
---|
13279 | 13688 | // source == timer |
---|
13280 | 13689 | if (mouseDown) |
---|
13281 | 13690 | { |
---|
.. | .. |
---|
13314 | 13723 | |
---|
13315 | 13724 | javax.swing.Timer timer = new javax.swing.Timer(350, this); |
---|
13316 | 13725 | |
---|
13317 | | - void clickStart(int x, int y, int modifiers) |
---|
| 13726 | + void clickStart(int x, int y, int modifiers, int modifiersex) |
---|
13318 | 13727 | { |
---|
13319 | 13728 | if (!wasliveok) |
---|
13320 | 13729 | return; |
---|
.. | .. |
---|
13331 | 13740 | // touched = true; // main DL |
---|
13332 | 13741 | if (isRenderer) |
---|
13333 | 13742 | { |
---|
13334 | | - SetMouseMode(modifiers); |
---|
| 13743 | + SetMouseMode(modifiers, modifiersex); |
---|
13335 | 13744 | } |
---|
13336 | 13745 | |
---|
13337 | 13746 | selectX = anchorX = x; |
---|
.. | .. |
---|
13344 | 13753 | clicked = true; |
---|
13345 | 13754 | hold = false; |
---|
13346 | 13755 | |
---|
13347 | | - if (((modifiers & ~1024) & ~0) == 0) // Single or multiple selection |
---|
| 13756 | + if (((modifiersex & ~1024) & ~0) == 0) // Single or multiple selection |
---|
13348 | 13757 | // june 2013 means CTRL_CLICK: if (((modifiers & ~1024) & ~128) == 0) // Single or multiple selection |
---|
13349 | 13758 | { |
---|
13350 | 13759 | // System.out.println("RESTART II " + modifiers); |
---|
.. | .. |
---|
13375 | 13784 | info.camera = renderCamera; |
---|
13376 | 13785 | info.x = x; |
---|
13377 | 13786 | info.y = y; |
---|
13378 | | - info.modifiers = modifiers; |
---|
| 13787 | + info.modifiers = modifiersex; |
---|
13379 | 13788 | editObj = object.doEditClick(info, 0); |
---|
13380 | 13789 | if (!editObj) |
---|
13381 | 13790 | { |
---|
.. | .. |
---|
13392 | 13801 | |
---|
13393 | 13802 | public void mouseDragged(MouseEvent e) |
---|
13394 | 13803 | { |
---|
| 13804 | + //System.out.println("mouseDragged: " + e); |
---|
13395 | 13805 | if (isRenderer) |
---|
13396 | 13806 | movingcamera = true; |
---|
13397 | 13807 | //if (drawing) |
---|
13398 | 13808 | //return; |
---|
13399 | | - //System.out.println("mouseDragged: " + e); |
---|
13400 | 13809 | if ((e.getModifiersEx() & CTRL) != 0 |
---|
13401 | 13810 | || (e.getModifiersEx() & COMMAND) != 0) // || IsFrozen()) |
---|
13402 | 13811 | { |
---|
.. | .. |
---|
13404 | 13813 | clickEnd(e.getX(), e.getY(), e.getModifiersEx()); |
---|
13405 | 13814 | } |
---|
13406 | 13815 | else |
---|
13407 | | - drag(e.getX(), e.getY(), e.getModifiersEx()); |
---|
| 13816 | + drag(e.getX(), e.getY(), e.getModifiers(), e.getModifiersEx()); |
---|
13408 | 13817 | |
---|
13409 | 13818 | //try { Thread.sleep(1); } catch (Exception ex) {} |
---|
13410 | 13819 | } |
---|
.. | .. |
---|
13577 | 13986 | |
---|
13578 | 13987 | public void run() |
---|
13579 | 13988 | { |
---|
| 13989 | + new Exception().printStackTrace(); |
---|
13580 | 13990 | System.exit(0); |
---|
13581 | 13991 | for (;;) |
---|
13582 | 13992 | { |
---|
.. | .. |
---|
13640 | 14050 | { |
---|
13641 | 14051 | Globals.lighttouched = true; |
---|
13642 | 14052 | } |
---|
13643 | | - drag(X, (mouseMode != 0) ? Y : anchorY, MODIFIERS); |
---|
| 14053 | + drag(X, (mouseMode != 0) ? Y : anchorY, 0, MODIFIERS); |
---|
13644 | 14054 | } |
---|
13645 | 14055 | //else |
---|
13646 | 14056 | } |
---|
.. | .. |
---|
13740 | 14150 | int X, Y; |
---|
13741 | 14151 | boolean SX, SY; |
---|
13742 | 14152 | |
---|
13743 | | - void drag(int x, int y, int modifiers) |
---|
| 14153 | + void drag(int x, int y, int modifiers, int modifiersex) |
---|
13744 | 14154 | { |
---|
13745 | 14155 | if (IsFrozen()) |
---|
13746 | 14156 | { |
---|
.. | .. |
---|
13749 | 14159 | |
---|
13750 | 14160 | drag = true; // NEW |
---|
13751 | 14161 | |
---|
13752 | | - boolean continuous = (modifiers & COMMAND) == COMMAND; |
---|
| 14162 | + boolean continuous = (modifiersex & COMMAND) == COMMAND; |
---|
13753 | 14163 | |
---|
13754 | 14164 | X = x; |
---|
13755 | 14165 | Y = y; |
---|
13756 | 14166 | // floating state for animation |
---|
13757 | | - MODIFIERS = modifiers; |
---|
13758 | | - modifiers &= ~1024; |
---|
| 14167 | + MODIFIERS = modifiersex; |
---|
| 14168 | + modifiersex &= ~1024; |
---|
13759 | 14169 | if (false) // modifiers != 0) |
---|
13760 | 14170 | { |
---|
13761 | 14171 | //new Exception().printStackTrace(); |
---|
13762 | | - System.out.println("mouseDragged: " + modifiers); |
---|
| 14172 | + System.out.println("mouseDragged: " + modifiersex); |
---|
13763 | 14173 | System.out.println("SHIFT = " + SHIFT); |
---|
13764 | 14174 | System.out.println("CONTROL = " + COMMAND); |
---|
13765 | 14175 | System.out.println("META = " + META); |
---|
.. | .. |
---|
13779 | 14189 | info.camera = renderCamera; |
---|
13780 | 14190 | info.x = x; |
---|
13781 | 14191 | info.y = y; |
---|
13782 | | - object.editWindow.copy.doEditDrag(info); |
---|
| 14192 | + object.editWindow.copy.doEditDrag(info, (modifiers & MouseEvent.BUTTON3_MASK) != 0); |
---|
13783 | 14193 | } else |
---|
13784 | 14194 | { |
---|
13785 | 14195 | if (x < startX) |
---|
.. | .. |
---|
13931 | 14341 | public void mouseMoved(MouseEvent e) |
---|
13932 | 14342 | { |
---|
13933 | 14343 | //System.out.println("mouseMoved: " + e); |
---|
13934 | | - |
---|
13935 | 14344 | if (isRenderer) |
---|
13936 | 14345 | return; |
---|
13937 | 14346 | |
---|
.. | .. |
---|
13979 | 14388 | boolean control = ((modifiers & CTRL) != 0); // june 2013: for point selection |
---|
13980 | 14389 | boolean command = ((modifiers & COMMAND) != 0); // june 2013: for multiple selection |
---|
13981 | 14390 | |
---|
13982 | | - if (control || command || IsFrozen()) |
---|
| 14391 | +// No delay if (control || command || IsFrozen()) |
---|
13983 | 14392 | timeout = true; |
---|
13984 | | - else |
---|
| 14393 | +// ?? May 2019 else |
---|
13985 | 14394 | // timer.setDelay((modifiers & 128) != 0?0:350); |
---|
13986 | 14395 | mouseDown = false; |
---|
13987 | 14396 | if (!control && !command) // june 2013 |
---|
.. | .. |
---|
14091 | 14500 | System.out.println("keyReleased: " + e); |
---|
14092 | 14501 | } |
---|
14093 | 14502 | |
---|
14094 | | - void SetMouseMode(int modifiers) |
---|
| 14503 | + void SetMouseMode(int modifiers, int modifiersex) |
---|
14095 | 14504 | { |
---|
14096 | 14505 | //System.out.println("SetMouseMode = " + modifiers); |
---|
14097 | 14506 | //modifiers &= ~1024; |
---|
.. | .. |
---|
14103 | 14512 | //if (modifiers == 0) // || (modifiers == (1024 | CONTROL))) |
---|
14104 | 14513 | // return; |
---|
14105 | 14514 | //System.out.println("SetMode = " + modifiers); |
---|
14106 | | - if ((modifiers & WHEEL) == WHEEL) |
---|
| 14515 | + if ((modifiersex & WHEEL) == WHEEL) |
---|
14107 | 14516 | { |
---|
14108 | 14517 | mouseMode |= ZOOM; |
---|
14109 | 14518 | } |
---|
14110 | 14519 | |
---|
14111 | 14520 | boolean capsLocked = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK); |
---|
14112 | | - if (capsLocked || (modifiers & META) == META) |
---|
| 14521 | + if (capsLocked) // || (modifiers & META) == META) |
---|
14113 | 14522 | { |
---|
14114 | 14523 | mouseMode |= VR; // BACKFORTH; |
---|
14115 | 14524 | } |
---|
14116 | | - if ((modifiers & CTRLCLICK) == CTRLCLICK) |
---|
| 14525 | + if ((modifiersex & CTRLCLICK) == CTRLCLICK) |
---|
14117 | 14526 | { |
---|
14118 | 14527 | mouseMode |= SELECT; |
---|
14119 | 14528 | } |
---|
14120 | | - if ((modifiers & COMMAND) == COMMAND) |
---|
| 14529 | + if ((modifiersex & COMMAND) == COMMAND) |
---|
14121 | 14530 | { |
---|
14122 | 14531 | mouseMode |= SELECT; |
---|
14123 | 14532 | } |
---|
14124 | | - if ((modifiers & SHIFT) == SHIFT || forcetranslate) |
---|
| 14533 | + if ((modifiersex & SHIFT) == SHIFT || forcetranslate || (modifiers & MouseEvent.BUTTON3_MASK) != 0) |
---|
14125 | 14534 | { |
---|
14126 | 14535 | mouseMode &= ~VR; |
---|
14127 | 14536 | mouseMode |= TRANSLATE; |
---|
.. | .. |
---|
14150 | 14559 | |
---|
14151 | 14560 | if (isRenderer) // |
---|
14152 | 14561 | { |
---|
14153 | | - SetMouseMode(modifiers); |
---|
| 14562 | + SetMouseMode(0, modifiers); |
---|
14154 | 14563 | } |
---|
14155 | 14564 | |
---|
14156 | | - theRenderer.keyPressed(key); |
---|
| 14565 | + Globals.theRenderer.keyPressed(key); |
---|
14157 | 14566 | } |
---|
14158 | 14567 | |
---|
14159 | 14568 | int kompactbit = 4; // power bit |
---|
.. | .. |
---|
14165 | 14574 | float SATPOW = 1; // 2; // 0.5f; |
---|
14166 | 14575 | float BRIPOW = 1; // 0.5f; // 0.5f; |
---|
14167 | 14576 | |
---|
14168 | | - void keyPressed(int key) |
---|
| 14577 | + public void keyPressed(int key) |
---|
14169 | 14578 | { |
---|
14170 | 14579 | if (key >= '0' && key <= '5') |
---|
14171 | 14580 | clampbit = (key-'0'); |
---|
.. | .. |
---|
14486 | 14895 | //RESIZETEXTURE ^= true; |
---|
14487 | 14896 | //break; |
---|
14488 | 14897 | case 'z': |
---|
14489 | | - RENDERSHADOW ^= true; |
---|
| 14898 | + Globals.RENDERSHADOW ^= true; |
---|
14490 | 14899 | Globals.lighttouched = true; |
---|
14491 | 14900 | repaint(); |
---|
14492 | 14901 | break; |
---|
.. | .. |
---|
14602 | 15011 | } |
---|
14603 | 15012 | //System.out.println("shaper_fovy = " + manipCamera.shaper_fovy); |
---|
14604 | 15013 | } |
---|
| 15014 | + |
---|
14605 | 15015 | static double OCCLUSIONBOOST = 1; // 0.5; |
---|
14606 | 15016 | |
---|
14607 | 15017 | void keyReleased(int key, int modifiers) |
---|
.. | .. |
---|
14609 | 15019 | //mode = ROTATE; |
---|
14610 | 15020 | if ((MODIFIERS & COMMAND) == 0) // VR?? |
---|
14611 | 15021 | { |
---|
14612 | | - SetMouseMode(modifiers); |
---|
| 15022 | + SetMouseMode(0, modifiers); |
---|
14613 | 15023 | } |
---|
14614 | 15024 | } |
---|
14615 | 15025 | |
---|
14616 | | - protected void processKeyEvent(KeyEvent e) |
---|
| 15026 | + public void processKeyEvent(KeyEvent e) |
---|
14617 | 15027 | { |
---|
14618 | 15028 | switch (e.getID()) |
---|
14619 | 15029 | { |
---|
.. | .. |
---|
14743 | 15153 | |
---|
14744 | 15154 | protected void processMouseMotionEvent(MouseEvent e) |
---|
14745 | 15155 | { |
---|
14746 | | - //System.out.println("processMouseMotionEvent: " + mouseMode); |
---|
14747 | | - if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0) |
---|
| 15156 | + //System.out.println("processMouseMotionEvent: " + mouseMode + " " + e.getModifiers() + " " + e.getModifiersEx() + " " + e.getButton()); |
---|
| 15157 | + //if (e.getButton() == MouseEvent.NOBUTTON && (mouseMode & SELECT) == 0) |
---|
| 15158 | + if ((e.getModifiers() & MouseEvent.BUTTON1_MASK) == 0 && (e.getModifiers() & MouseEvent.BUTTON3_MASK) == 0 && (mouseMode & SELECT) == 0) |
---|
14748 | 15159 | { |
---|
14749 | 15160 | mouseMoved(e); |
---|
14750 | 15161 | } else |
---|
.. | .. |
---|
14774 | 15185 | |
---|
14775 | 15186 | void SelectParent() |
---|
14776 | 15187 | { |
---|
| 15188 | + new Exception().printStackTrace(); |
---|
14777 | 15189 | System.exit(0); |
---|
14778 | 15190 | Composite group = (Composite) object; |
---|
14779 | 15191 | java.util.Vector selectees = new java.util.Vector(group.selection); |
---|
.. | .. |
---|
14797 | 15209 | |
---|
14798 | 15210 | void SelectChildren() |
---|
14799 | 15211 | { |
---|
| 15212 | + new Exception().printStackTrace(); |
---|
14800 | 15213 | System.exit(0); |
---|
14801 | 15214 | /* |
---|
14802 | 15215 | Composite group = (Composite) object; |
---|
.. | .. |
---|
15179 | 15592 | public boolean mouseDown(Event evt, int x, int y) |
---|
15180 | 15593 | { |
---|
15181 | 15594 | System.out.println("mouseDown: " + evt); |
---|
| 15595 | + System.exit(0); |
---|
15182 | 15596 | /* |
---|
15183 | 15597 | locked = true; |
---|
15184 | 15598 | drag = false; |
---|
.. | .. |
---|
15222 | 15636 | { |
---|
15223 | 15637 | keyPressed(0, modifiers); |
---|
15224 | 15638 | } |
---|
15225 | | - clickStart(x, y, modifiers); |
---|
| 15639 | + // clickStart(x, y, modifiers); |
---|
15226 | 15640 | return true; |
---|
15227 | 15641 | } |
---|
15228 | 15642 | |
---|
.. | .. |
---|
15340 | 15754 | { |
---|
15341 | 15755 | keyReleased(0, 0); |
---|
15342 | 15756 | } |
---|
15343 | | - drag(x, y, modifiers); |
---|
| 15757 | + drag(x, y, 0, modifiers); |
---|
15344 | 15758 | return true; |
---|
15345 | 15759 | } |
---|
15346 | 15760 | |
---|
.. | .. |
---|
15910 | 16324 | { |
---|
15911 | 16325 | if (!selection) |
---|
15912 | 16326 | { |
---|
| 16327 | + new Exception().printStackTrace(); |
---|
15913 | 16328 | System.exit(0); |
---|
15914 | 16329 | return; |
---|
15915 | 16330 | } |
---|
.. | .. |
---|
16037 | 16452 | System.out.println("; fromto " + sel + " " + Trunk(previousselectedpoint.toParent[3][0]) + " " + Trunk(previousselectedpoint.toParent[3][2]) + " " + Trunk(selectedpoint.toParent[3][0]) + " " + Trunk(selectedpoint.toParent[3][2])); |
---|
16038 | 16453 | } |
---|
16039 | 16454 | |
---|
16040 | | - previousselectedpoint = (Sphere) GrafreeD.clone(selectedpoint); |
---|
| 16455 | + previousselectedpoint = (Sphere) Grafreed.clone(selectedpoint); |
---|
16041 | 16456 | } |
---|
16042 | 16457 | } |
---|
16043 | 16458 | |
---|
16044 | 16459 | if (!movingcamera && !PAINTMODE) |
---|
16045 | 16460 | object.editWindow.ScreenFitPoint(); // fev 2014 |
---|
16046 | 16461 | |
---|
16047 | | - if (PAINTMODE && GrafreeD.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
| 16462 | + if (PAINTMODE && Grafreed.clipboard.size() == 1) // object.editWindow.copy.selection.Size() > 0) |
---|
16048 | 16463 | { |
---|
16049 | | - Object3D paintobj = GrafreeD.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); |
---|
| 16464 | + Object3D paintobj = Grafreed.clipboard.get(0); // object.editWindow.copy.selection.elementAt(0); |
---|
16050 | 16465 | |
---|
16051 | 16466 | Object3D group = new Object3D("inst" + paintcount++); |
---|
16052 | 16467 | |
---|
.. | .. |
---|
16202 | 16617 | gl.glDisable(gl.GL_CULL_FACE); |
---|
16203 | 16618 | } |
---|
16204 | 16619 | |
---|
16205 | | - if (!RENDERSHADOW) |
---|
| 16620 | + if (!Globals.RENDERSHADOW) |
---|
16206 | 16621 | gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); |
---|
16207 | 16622 | |
---|
16208 | 16623 | // SB gl.glPolygonOffset(2.5f, 10); |
---|
.. | .. |
---|
16212 | 16627 | //gl.glColorMask(false, false, false, false); |
---|
16213 | 16628 | |
---|
16214 | 16629 | //render_scene_from_light_view(gl, drawable, 0, 0); |
---|
16215 | | - if (RENDERSHADOW && Globals.lighttouched && !movingcamera) // && !parent.IsFreezed()) |
---|
| 16630 | + if (Globals.RENDERSHADOW && Globals.lighttouched && (!movingcamera || !Globals.FREEZEONMOVE)) // && !parent.IsFreezed()) |
---|
16216 | 16631 | { |
---|
16217 | 16632 | gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); |
---|
16218 | 16633 | |
---|
.. | .. |
---|
16696 | 17111 | static IntBuffer textbuffer = null; // IntBuffer.allocate(TEXT_WIDTH*8*8 * TEXT_HEIGHT); |
---|
16697 | 17112 | // Depth buffer format |
---|
16698 | 17113 | //private int depth_format; |
---|
16699 | | - static public void NextIndex(Object3D o, GL gl) |
---|
| 17114 | + |
---|
| 17115 | + public void NextIndex() |
---|
16700 | 17116 | { |
---|
16701 | 17117 | indexcount+=16; |
---|
16702 | | - gl.glColor3d(((indexcount >>> 16) & 255) / 255.0, ((indexcount >>> 8) & 255) / 255.0, ((indexcount) & 255) / 255.0); |
---|
| 17118 | + GetGL().glColor3d(((indexcount >>> 16) & 255) / 255.0, ((indexcount >>> 8) & 255) / 255.0, ((indexcount) & 255) / 255.0); |
---|
16703 | 17119 | //objects[indexcount] = o; |
---|
16704 | 17120 | //System.out.println("indexcount = " + indexcount); |
---|
16705 | 17121 | } |
---|