Box.java | ●●●●● patch | view | raw | blame | history | |
CameraPane.java | ●●●●● patch | view | raw | blame | history | |
GroupEditor.java | ●●●●● patch | view | raw | blame | history | |
RagDoll.java | ●●●●● patch | view | raw | blame | history |
Box.java
.. .. @@ -1,6 +1,7 @@ 1 1 public class Box extends Object3D implements java.io.Serializable 2 2 { 3 - static final long serialVersionUID = -8881546880864755550L; // 0;3 + static final long serialVersionUID = //-8881546880864755550L; // old4 + 0; // new 20194 5 5 6 boolean open; 6 7 CameraPane.java
.. .. @@ -9688,7 +9688,7 @@ 9688 9688 { 9689 9689 options1[0] = 100; 9690 9690 options1[1] = 0.01f; // .025f; 9691 - options1[2] = 10f;9691 + options1[2] = 3f;9692 9692 options1[3] = 0; 9693 9693 options1[4] = 0; 9694 9694 .. .. @@ -15987,8 +15987,11 @@ 15987 15987 // kompactbit = 6; 15988 15988 // break; 15989 15989 case ' ': 15990 - capsLocked ^= true;15991 - repaint();15990 + if (manipCamera != lightCamera)15991 + {15992 + capsLocked ^= true;15993 + repaint();15994 + }15992 15995 break; 15993 15996 case 'l': 15994 15997 lightMode ^= true; .. .. @@ -16187,24 +16190,48 @@ 16187 16190 } 16188 16191 else 16189 16192 { 16190 - switch (e.getKeyCode())16193 + if (manipCamera == lightCamera)16191 16194 { 16192 - case DOWN_ARROW:16193 - GoDown(e.getModifiersEx());16194 - break;16195 - case UP_ARROW:16196 - GoUp(e.getModifiersEx());16197 - break;16198 - case LEFT_ARROW:16199 - GoLeft(e.getModifiersEx());16200 - break;16201 - case RIGHT_ARROW:16202 - GoRight(e.getModifiersEx());16203 - break;16204 - default:16205 - modifiers = e.getModifiersEx();16206 - keyPressed(e.getKeyChar(), modifiers);16207 - break;16195 + switch (e.getKeyCode())16196 + {16197 + case DOWN_ARROW:16198 + lightCamera.DECAL /= 2;16199 + break;16200 + case UP_ARROW:16201 + lightCamera.DECAL *= 2;16202 + break;16203 + case LEFT_ARROW:16204 + lightCamera.SCALE /= 2;16205 + break;16206 + case RIGHT_ARROW:16207 + lightCamera.SCALE *= 2;16208 + break;16209 + default:16210 + break;16211 + }16212 +16213 + System.out.println("DECAL = " + lightCamera.DECAL + "; SCALE = " + lightCamera.SCALE);16214 + } else16215 + {16216 + switch (e.getKeyCode())16217 + {16218 + case DOWN_ARROW:16219 + GoDown(e.getModifiersEx());16220 + break;16221 + case UP_ARROW:16222 + GoUp(e.getModifiersEx());16223 + break;16224 + case LEFT_ARROW:16225 + GoLeft(e.getModifiersEx());16226 + break;16227 + case RIGHT_ARROW:16228 + GoRight(e.getModifiersEx());16229 + break;16230 + default:16231 + modifiers = e.getModifiersEx();16232 + keyPressed(e.getKeyChar(), modifiers);16233 + break;16234 + }16208 16235 } 16209 16236 } 16210 16237 GroupEditor.java
.. .. @@ -2253,14 +2253,14 @@ 2253 2253 2254 2254 private void GenerateMaze() 2255 2255 { 2256 - if (group.selection.size() == 4)2256 + if (group.selection.size() == 1 && group.selection.get(0).size() == 16)2257 2257 { 2258 2258 final double scaleX = SelectionSizeX(); 2259 2259 final double scaleZ = SelectionSizeZ(); 2260 2260 2261 2261 final cGroup mazeGroup = new cGroup("Maze"); 2262 2262 2263 - final int dim = 15;2263 + final int dim = 9;2264 2264 2265 2265 Maze maze = new Maze(dim, dim); 2266 2266 .. .. @@ -2272,38 +2272,60 @@ 2272 2272 { 2273 2273 if ((i == 0 || i == dim-1) && j == dim/2) 2274 2274 { 2275 - return;2275 + //return;2276 2276 } 2277 2277 2278 2278 int v = 0; 2279 +// if (north)2280 +// {2281 +// cGroup n = new cGroup("" + i + "," + j);2282 +// n.Translate(-j * scaleX, 0, i * scaleZ);2283 +// n.add(group.selection.get(0));2284 +// mazeGroup.add(n);2285 +// }2286 +// if (east)2287 +// {2288 +// cGroup n = new cGroup("" + i + "," + j);2289 +// n.Translate(-j * scaleX, 0, i * scaleZ);2290 +// n.add(group.selection.get(1));2291 +// mazeGroup.add(n);2292 +// }2293 +// if (south)2294 +// {2295 +// cGroup n = new cGroup("" + i + "," + j);2296 +// n.Translate(-j * scaleX, 0, i * scaleZ);2297 +// n.add(group.selection.get(2));2298 +// mazeGroup.add(n);2299 +// }2300 +// if (west)2301 +// {2302 +// cGroup n = new cGroup("" + i + "," + j);2303 +// n.Translate(-j * scaleX, 0, i * scaleZ);2304 +// n.add(group.selection.get(3));2305 +// mazeGroup.add(n);2306 +// }2307 +2279 2308 if (north) 2280 2309 { 2281 - cGroup n = new cGroup("" + i + "," + j);2282 - n.Translate(-j * scaleX, 0, i * scaleZ);2283 - n.add(group.selection.get(0));2284 - mazeGroup.add(n);2310 + v += 1;2285 2311 } 2286 - if (east)2312 + if (east && (i != dim-1 || j != dim/2))2287 2313 { 2288 - cGroup n = new cGroup("" + i + "," + j);2289 - n.Translate(-j * scaleX, 0, i * scaleZ);2290 - n.add(group.selection.get(1));2291 - mazeGroup.add(n);2314 + v += 2;2292 2315 } 2293 2316 if (south) 2294 2317 { 2295 - cGroup n = new cGroup("" + i + "," + j);2296 - n.Translate(-j * scaleX, 0, i * scaleZ);2297 - n.add(group.selection.get(2));2298 - mazeGroup.add(n);2318 + v += 4;2299 2319 } 2300 - if (west)2320 + if (west && (i != 0 || j != dim/2))2301 2321 { 2302 - cGroup n = new cGroup("" + i + "," + j);2303 - n.Translate(-j * scaleX, 0, i * scaleZ);2304 - n.add(group.selection.get(3));2305 - mazeGroup.add(n);2322 + v += 8;2306 2323 } 2324 +2325 + cGroup n = new cGroup("" + i + "," + j);2326 + n.Translate(-j * scaleX, 0, i * scaleZ);2327 + n.add(group.selection.get(0).get(v));2328 + mazeGroup.add(n);2307 2329 } 2308 2330 } 2309 2331 ); .. .. @@ -2331,7 +2353,7 @@ 2331 2353 cVector bbmin = new cVector(); 2332 2354 cVector bbmax = new cVector(); 2333 2355 2334 - group.selection.getBounds(bbmin, bbmax, true);2356 + group.selection.get(0).get(0).getBounds(bbmin, bbmax, true);2335 2357 2336 2358 return bbmax.x - bbmin.x; 2337 2359 } .. .. @@ -2341,7 +2363,7 @@ 2341 2363 cVector bbmin = new cVector(); 2342 2364 cVector bbmax = new cVector(); 2343 2365 2344 - group.selection.getBounds(bbmin, bbmax, true);2366 + group.selection.get(0).get(0).getBounds(bbmin, bbmax, true);2345 2367 2346 2368 return bbmax.y - bbmin.y; 2347 2369 } .. .. @@ -2351,7 +2373,7 @@ 2351 2373 cVector bbmin = new cVector(); 2352 2374 cVector bbmax = new cVector(); 2353 2375 2354 - group.selection.getBounds(bbmin, bbmax, true);2376 + group.selection.get(0).get(0).getBounds(bbmin, bbmax, true);2355 2377 2356 2378 return bbmax.z - bbmin.z; 2357 2379 } RagDoll.java
.. .. @@ -321,8 +321,8 @@ 321 321 transform.setIdentity(); 322 322 if ((body = bodies[BodyPart.BODYPART_LEFT_LOWER_ARM.ordinal()]) == null) 323 323 body = bodies[BodyPart.BODYPART_LEFT_LOWER_ARM.ordinal()] = localCreateRigidBody(1f, 0, transform, shapes[BodyPart.BODYPART_LEFT_LOWER_ARM.ordinal()]); 324 - transform.origin.set(-(lowerarmlength/2 + upperarmlength + upperarmdist) * scale_ragdoll, 1.325f * scale_ragdoll, depth + zoffset);325 - MatrixUtil.setEulerZYX(transform.basis, 0, 0, BulletGlobals.SIMD_HALF_PI);324 + transform.origin.set(-(lowerarmlength/2 + upperarmlength + upperarmdist) * scale_ragdoll, 1.325f * scale_ragdoll, depth + zoffset + scale_ragdoll * lowerarmlength / 2 * 0.5f);325 + MatrixUtil.setEulerZYX(transform.basis, BulletGlobals.SIMD_HALF_PI/4, 0, BulletGlobals.SIMD_HALF_PI);326 326 tmpTrans.mul(offset, transform); 327 327 body.worldTransform.set(tmpTrans); 328 328 body.getMotionState().setWorldTransform(tmpTrans); .. .. @@ -351,8 +351,8 @@ 351 351 transform.setIdentity(); 352 352 if ((body = bodies[BodyPart.BODYPART_RIGHT_LOWER_ARM.ordinal()]) == null) 353 353 body = bodies[BodyPart.BODYPART_RIGHT_LOWER_ARM.ordinal()] = localCreateRigidBody(1f, 0, transform, shapes[BodyPart.BODYPART_RIGHT_LOWER_ARM.ordinal()]); 354 - transform.origin.set((lowerarmlength/2 + upperarmlength + upperarmdist) * scale_ragdoll, 1.325f * scale_ragdoll, depth + zoffset);355 - MatrixUtil.setEulerZYX(transform.basis, 0, 0, -BulletGlobals.SIMD_HALF_PI);354 + transform.origin.set((lowerarmlength/2 + upperarmlength + upperarmdist) * scale_ragdoll, 1.325f * scale_ragdoll, depth + zoffset + scale_ragdoll * lowerarmlength / 2 * 0.5f);355 + MatrixUtil.setEulerZYX(transform.basis, BulletGlobals.SIMD_HALF_PI/4, 0, -BulletGlobals.SIMD_HALF_PI);356 356 tmpTrans.mul(offset, transform); 357 357 body.worldTransform.set(tmpTrans); 358 358 body.getMotionState().setWorldTransform(tmpTrans);