From 3966454055db8e04700e881a091c2d33dcfda232 Mon Sep 17 00:00:00 2001 From: Normand Briere <nbriere@noware.ca> Date: Mon, 30 Sep 2019 19:22:19 -0400 Subject: [PATCH] tab index --- GenericJoint.java | 36 ++++++++++++++++++++++++++---------- 1 files changed, 26 insertions(+), 10 deletions(-) diff --git a/GenericJoint.java b/GenericJoint.java index ab83012..0ea1429 100644 --- a/GenericJoint.java +++ b/GenericJoint.java @@ -177,7 +177,9 @@ public void spawnRagdoll(boolean walk) // random) { - RagDoll ragDoll = new RagDoll(null, new Vector3f(0f, 0f, 0f), 0.45f, walk); // Math.random() > 0.5/*true*/); // true); + // KIDS4 + RagDoll ragDoll = new RagDoll(null, new Vector3f(0f, 0f, 0f), 0.45f/2, walk, myzoffset = zoffset); // Math.random() > 0.5/*true*/); // true); + zoffset += 0.1f; ragdolls.add(ragDoll); bRep = null; @@ -277,6 +279,8 @@ // ObjectArrayList<Transform> initialmatrices; + float myzoffset; + void Reset() { // int numObjects = dynamicsWorld.getNumCollisionObjects(); @@ -309,10 +313,12 @@ walkdefined = true; } - ragdolls.get(0).init(/*staticdynamicsWorld,*/ new Vector3f(0f, 0f, 0f), 0.45f, walk); + ragdolls.get(0).init(/*staticdynamicsWorld,*/ new Vector3f(0f, 0f, 0f), ragdolls.get(0).scale, walk, myzoffset); bRep = null; } + + static float zoffset = 0; void DrawNode(iCameraPane display, Object3D /*Composite*/ root, boolean selected) // ?? { @@ -341,7 +347,7 @@ // assert(bRep != null); - if (Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // FUCK + if (Globals.isLIVE() && live && display.DrawMode() == display.SHADOW) // SHADOW { // float ms = getDeltaTimeMicroseconds(); // float minFPS = 1000000f / 60f; @@ -381,7 +387,7 @@ try { //font = FontRender.createFont("Dialog", 11, false, true); - font = new FontRender.GLFont(gl, GrafreeD.class.getResourceAsStream("DejaVu_Sans_11.fnt")); + font = new FontRender.GLFont(gl, Grafreed.class.getResourceAsStream("DejaVu_Sans_11.fnt")); } catch (java.io.IOException e) { e.printStackTrace(); @@ -486,7 +492,7 @@ tc.getFrameOffsetB(trans); - if (false) // c == 2) // DEBUG + if (false) //c == 8) // DEBUG { gl.glDisable(gl.GL_LIGHTING); @@ -515,7 +521,7 @@ gl.glPopMatrix(); - tc.getFrameOffsetB(trans); + //tc.getFrameOffsetB(trans); gl.glColor3f(0, 1, 0); @@ -557,7 +563,8 @@ bRep.startvertices = new int[numObjects]; bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3]; bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3]; - bRep.supportsizes = new float[(bRep.startvertices.length-1)]; + bRep.supportminsize = new float[(bRep.startvertices.length-1)]; + bRep.supportmaxsize = new float[(bRep.startvertices.length-1)]; buildrep = true; initialmatrices = new ObjectArrayList<Transform>(); @@ -873,6 +880,7 @@ if (shape.getShapeType() == BroadphaseNativeType.COMPOUND_SHAPE_PROXYTYPE) { + new Exception().printStackTrace(); System.exit(0); CompoundShape compoundShape = (CompoundShape) shape; Transform childTrans = transformsPool.get(); @@ -903,6 +911,7 @@ { case BOX_SHAPE_PROXYTYPE: { + new Exception().printStackTrace(); System.exit(0); BoxShape boxShape = (BoxShape) shape; Vector3f halfExtent = boxShape.getHalfExtentsWithMargin(vectorsPool.get()); @@ -914,6 +923,7 @@ } case SPHERE_SHAPE_PROXYTYPE: { + new Exception().printStackTrace(); System.exit(0); SphereShape sphereShape = (SphereShape) shape; float radius = sphereShape.getMargin(); // radius doesn't include the margin, so draw with margin @@ -960,6 +970,7 @@ case STATIC_PLANE_PROXYTYPE: { + new Exception().printStackTrace(); System.exit(0); StaticPlaneShape staticPlaneShape = (StaticPlaneShape) shape; float planeConst = staticPlaneShape.getPlaneConstant(); @@ -1006,6 +1017,7 @@ case CYLINDER_SHAPE_PROXYTYPE: { + new Exception().printStackTrace(); System.exit(0); CylinderShape cylinder = (CylinderShape) shape; int upAxis = cylinder.getUpAxis(); @@ -1220,11 +1232,12 @@ } else { - if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportsizes == null) + if (bRep.averagepoints == null || bRep.extremepoints == null || bRep.supportminsize == null || bRep.supportmaxsize == null) { bRep.averagepoints = new float[(bRep.startvertices.length-1) * 3]; bRep.extremepoints = new float[(bRep.startvertices.length-1) * 3]; - bRep.supportsizes = new float[(bRep.startvertices.length-1)]; + bRep.supportminsize = new float[(bRep.startvertices.length-1)]; + bRep.supportmaxsize = new float[(bRep.startvertices.length-1)]; } float averagex = 0; @@ -1294,7 +1307,8 @@ } } - bRep.supportsizes[currentobject-1] = (float)Math.sqrt(mindist2); + bRep.supportminsize[currentobject-1] = (float)Math.sqrt(mindist2); + bRep.supportmaxsize[currentobject-1] = (float)Math.sqrt(maxdist2); } // if (hull.numTriangles() > 0) @@ -1358,6 +1372,7 @@ // for polyhedral shapes if (shape.isPolyhedral()) { + new Exception().printStackTrace(); System.exit(0); PolyhedralConvexShape polyshape = (PolyhedralConvexShape) shape; @@ -1427,6 +1442,7 @@ if (shape.isConcave())//>getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE||shape->getShapeType() == GIMPACT_SHAPE_PROXYTYPE) // if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE) { + new Exception().printStackTrace(); System.exit(0); ConcaveShape concaveMesh = (ConcaveShape) shape; //btVector3 aabbMax(btScalar(1e30),btScalar(1e30),btScalar(1e30)); -- Gitblit v1.6.2