.. | .. |
---|
177 | 177 | |
---|
178 | 178 | public void spawnRagdoll(boolean walk) // random) |
---|
179 | 179 | { |
---|
180 | | - RagDoll ragDoll = new RagDoll(null, new Vector3f(0f, 0f, 0f), 0.45f, walk); // Math.random() > 0.5/*true*/); // true); |
---|
| 180 | + // KIDS4 |
---|
| 181 | + RagDoll ragDoll = new RagDoll(null, new Vector3f(0f, 0f, 0f), 0.45f/2, walk, myzoffset = zoffset); // Math.random() > 0.5/*true*/); // true); |
---|
| 182 | + zoffset += 0.1f; |
---|
181 | 183 | ragdolls.add(ragDoll); |
---|
182 | 184 | |
---|
183 | 185 | bRep = null; |
---|
.. | .. |
---|
277 | 279 | // |
---|
278 | 280 | ObjectArrayList<Transform> initialmatrices; |
---|
279 | 281 | |
---|
| 282 | + float myzoffset; |
---|
| 283 | + |
---|
280 | 284 | void Reset() |
---|
281 | 285 | { |
---|
282 | 286 | // int numObjects = dynamicsWorld.getNumCollisionObjects(); |
---|
.. | .. |
---|
309 | 313 | walkdefined = true; |
---|
310 | 314 | } |
---|
311 | 315 | |
---|
312 | | - ragdolls.get(0).init(/*staticdynamicsWorld,*/ new Vector3f(0f, 0f, 0f), 0.45f, walk); |
---|
| 316 | + ragdolls.get(0).init(/*staticdynamicsWorld,*/ new Vector3f(0f, 0f, 0f), ragdolls.get(0).scale, walk, myzoffset); |
---|
313 | 317 | |
---|
314 | 318 | bRep = null; |
---|
315 | 319 | } |
---|
| 320 | + |
---|
| 321 | + static float zoffset = 0; |
---|
316 | 322 | |
---|
317 | 323 | void DrawNode(iCameraPane display, Object3D /*Composite*/ root, boolean selected) // ?? |
---|
318 | 324 | { |
---|
.. | .. |
---|
341 | 347 | |
---|
342 | 348 | // assert(bRep != null); |
---|
343 | 349 | |
---|
344 | | - if (Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK |
---|
| 350 | + if (Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // SHADOW |
---|
345 | 351 | { |
---|
346 | 352 | // float ms = getDeltaTimeMicroseconds(); |
---|
347 | 353 | // float minFPS = 1000000f / 60f; |
---|
.. | .. |
---|
381 | 387 | try |
---|
382 | 388 | { |
---|
383 | 389 | //font = FontRender.createFont("Dialog", 11, false, true); |
---|
384 | | - font = new FontRender.GLFont(gl, GrafreeD.class.getResourceAsStream("DejaVu_Sans_11.fnt")); |
---|
| 390 | + font = new FontRender.GLFont(gl, Grafreed.class.getResourceAsStream("DejaVu_Sans_11.fnt")); |
---|
385 | 391 | } catch (java.io.IOException e) |
---|
386 | 392 | { |
---|
387 | 393 | e.printStackTrace(); |
---|
.. | .. |
---|
486 | 492 | |
---|
487 | 493 | tc.getFrameOffsetB(trans); |
---|
488 | 494 | |
---|
489 | | - if (false) // c == 2) // DEBUG |
---|
| 495 | + if (false) //c == 8) // DEBUG |
---|
490 | 496 | { |
---|
491 | 497 | gl.glDisable(gl.GL_LIGHTING); |
---|
492 | 498 | |
---|
.. | .. |
---|
515 | 521 | |
---|
516 | 522 | gl.glPopMatrix(); |
---|
517 | 523 | |
---|
518 | | - tc.getFrameOffsetB(trans); |
---|
| 524 | + //tc.getFrameOffsetB(trans); |
---|
519 | 525 | |
---|
520 | 526 | gl.glColor3f(0, 1, 0); |
---|
521 | 527 | |
---|
.. | .. |
---|
557 | 563 | bRep.startvertices = new int[numObjects]; |
---|
558 | 564 | bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3]; |
---|
559 | 565 | bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3]; |
---|
560 | | - bRep.supportsizes = new float[(bRep.startvertices.length-1)]; |
---|
| 566 | + bRep.supportminsize = new float[(bRep.startvertices.length-1)]; |
---|
| 567 | + bRep.supportmaxsize = new float[(bRep.startvertices.length-1)]; |
---|
561 | 568 | buildrep = true; |
---|
562 | 569 | |
---|
563 | 570 | initialmatrices = new ObjectArrayList<Transform>(); |
---|
.. | .. |
---|
873 | 880 | |
---|
874 | 881 | if (shape.getShapeType() == BroadphaseNativeType.COMPOUND_SHAPE_PROXYTYPE) |
---|
875 | 882 | { |
---|
| 883 | + new Exception().printStackTrace(); |
---|
876 | 884 | System.exit(0); |
---|
877 | 885 | CompoundShape compoundShape = (CompoundShape) shape; |
---|
878 | 886 | Transform childTrans = transformsPool.get(); |
---|
.. | .. |
---|
903 | 911 | { |
---|
904 | 912 | case BOX_SHAPE_PROXYTYPE: |
---|
905 | 913 | { |
---|
| 914 | + new Exception().printStackTrace(); |
---|
906 | 915 | System.exit(0); |
---|
907 | 916 | BoxShape boxShape = (BoxShape) shape; |
---|
908 | 917 | Vector3f halfExtent = boxShape.getHalfExtentsWithMargin(vectorsPool.get()); |
---|
.. | .. |
---|
914 | 923 | } |
---|
915 | 924 | case SPHERE_SHAPE_PROXYTYPE: |
---|
916 | 925 | { |
---|
| 926 | + new Exception().printStackTrace(); |
---|
917 | 927 | System.exit(0); |
---|
918 | 928 | SphereShape sphereShape = (SphereShape) shape; |
---|
919 | 929 | float radius = sphereShape.getMargin(); // radius doesn't include the margin, so draw with margin |
---|
.. | .. |
---|
960 | 970 | |
---|
961 | 971 | case STATIC_PLANE_PROXYTYPE: |
---|
962 | 972 | { |
---|
| 973 | + new Exception().printStackTrace(); |
---|
963 | 974 | System.exit(0); |
---|
964 | 975 | StaticPlaneShape staticPlaneShape = (StaticPlaneShape) shape; |
---|
965 | 976 | float planeConst = staticPlaneShape.getPlaneConstant(); |
---|
.. | .. |
---|
1006 | 1017 | |
---|
1007 | 1018 | case CYLINDER_SHAPE_PROXYTYPE: |
---|
1008 | 1019 | { |
---|
| 1020 | + new Exception().printStackTrace(); |
---|
1009 | 1021 | System.exit(0); |
---|
1010 | 1022 | CylinderShape cylinder = (CylinderShape) shape; |
---|
1011 | 1023 | int upAxis = cylinder.getUpAxis(); |
---|
.. | .. |
---|
1220 | 1232 | } |
---|
1221 | 1233 | else |
---|
1222 | 1234 | { |
---|
1223 | | - if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportsizes == null) |
---|
| 1235 | + if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportminsize == null || bRep.supportmaxsize == null) |
---|
1224 | 1236 | { |
---|
1225 | 1237 | bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3]; |
---|
1226 | 1238 | bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3]; |
---|
1227 | | - bRep.supportsizes = new float[(bRep.startvertices.length-1)]; |
---|
| 1239 | + bRep.supportminsize = new float[(bRep.startvertices.length-1)]; |
---|
| 1240 | + bRep.supportmaxsize = new float[(bRep.startvertices.length-1)]; |
---|
1228 | 1241 | } |
---|
1229 | 1242 | |
---|
1230 | 1243 | float averagex = 0; |
---|
.. | .. |
---|
1294 | 1307 | } |
---|
1295 | 1308 | } |
---|
1296 | 1309 | |
---|
1297 | | - bRep.supportsizes[currentobject-1] = (float)Math.sqrt(mindist2); |
---|
| 1310 | + bRep.supportminsize[currentobject-1] = (float)Math.sqrt(mindist2); |
---|
| 1311 | + bRep.supportmaxsize[currentobject-1] = (float)Math.sqrt(maxdist2); |
---|
1298 | 1312 | } |
---|
1299 | 1313 | |
---|
1300 | 1314 | // if (hull.numTriangles() > 0) |
---|
.. | .. |
---|
1358 | 1372 | // for polyhedral shapes |
---|
1359 | 1373 | if (shape.isPolyhedral()) |
---|
1360 | 1374 | { |
---|
| 1375 | + new Exception().printStackTrace(); |
---|
1361 | 1376 | System.exit(0); |
---|
1362 | 1377 | PolyhedralConvexShape polyshape = (PolyhedralConvexShape) shape; |
---|
1363 | 1378 | |
---|
.. | .. |
---|
1427 | 1442 | if (shape.isConcave())//>getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE||shape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE) |
---|
1428 | 1443 | // if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE) |
---|
1429 | 1444 | { |
---|
| 1445 | + new Exception().printStackTrace(); |
---|
1430 | 1446 | System.exit(0); |
---|
1431 | 1447 | ConcaveShape concaveMesh = (ConcaveShape) shape; |
---|
1432 | 1448 | //btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); |
---|