private void loadModels() { TextureManager manager = TextureManager.getInstance(); manager.addTexture("Girl", new Texture("Girl.jpg")); FilenameFilter filter = new FilenameFilter() { public boolean accept(File dir, String name) { return name.toLowerCase().endsWith("png"); } }; String[] textures = new File("./").list(filter); for (int i = 0; i < textures.length; i++) manager.addTexture(textures[i], new Texture(textures[i])); oneByOne = Object3D.mergeAll(Loader.loadOBJ("1x1.obj", "1x1.mtl", .01f)); twoByOne = Object3D.mergeAll(Loader.loadOBJ("2x1.obj", "2x1.mtl", .01f)); threeByOne = Object3D.mergeAll(Loader.loadOBJ("3x1.obj", "3x1.mtl", .01f)); oneByTwo = Object3D.mergeAll(Loader.loadOBJ("1x2.obj", "1x2.mtl", .01f)); twoByTwo = Object3D.mergeAll(Loader.loadOBJ("2x2.obj", "2x2.mtl", .01f)); threeByTwo = Object3D.mergeAll(Loader.loadOBJ("3x2.obj", "3x2.mtl", .01f)); oneByThree = Object3D.mergeAll(Loader.loadOBJ("1x3.obj", "1x3.mtl", .01f)); twoByThree = Object3D.mergeAll(Loader.loadOBJ("2x3.obj", "2x3.mtl", .01f)); threeByThree = Object3D.mergeAll(Loader.loadOBJ("3x3.obj", "3x3.mtl", .01f)); oneByOne.setCenter(SimpleVector.ORIGIN); twoByOne.setCenter(SimpleVector.ORIGIN); threeByOne.setCenter(SimpleVector.ORIGIN); oneByTwo.setCenter(SimpleVector.ORIGIN); twoByTwo.setCenter(SimpleVector.ORIGIN); threeByTwo.setCenter(SimpleVector.ORIGIN); oneByThree.setCenter(SimpleVector.ORIGIN); twoByThree.setCenter(SimpleVector.ORIGIN); threeByThree.setCenter(SimpleVector.ORIGIN); oneByOne.rotateX((float)Math.PI*-.5f); twoByOne.rotateX((float)Math.PI*-.5f); threeByOne.rotateX((float)Math.PI*-.5f); oneByTwo.rotateX((float)Math.PI*-.5f); twoByTwo.rotateX((float)Math.PI*-.5f); threeByTwo.rotateX((float)Math.PI*-.5f); oneByThree.rotateX((float)Math.PI*-.5f); twoByThree.rotateX((float)Math.PI*-.5f); threeByThree.rotateX((float)Math.PI*-.5f); final float sizeX = 11000f, sizeZ = -7200f;//CHUNKS ARE 1.6:1, BUT ON WHAT AXIS? oneByOne.translate(-sizeX, 0, 0); threeByOne.translate(sizeX, 0, 0); oneByTwo.translate(-sizeX, 0, sizeZ); twoByTwo.translate(0, 0, sizeZ); threeByTwo.translate(sizeX, 0, sizeZ); oneByThree.translate(-sizeX, 0, sizeZ*2f); twoByThree.translate(0, 0, sizeZ*2f); threeByThree.translate(sizeX, 0, sizeZ*2f); theWorld.addObject(oneByOne); theWorld.addObject(twoByOne); theWorld.addObject(threeByOne); theWorld.addObject(oneByTwo); theWorld.addObject(twoByTwo); theWorld.addObject(threeByTwo); theWorld.addObject(oneByThree); theWorld.addObject(twoByThree); theWorld.addObject(threeByThree); try {hero = BonesIO.loadGroup(new java.io.FileInputStream("Girl.bones"));} catch (java.io.FileNotFoundException e) {System.out.println("No such file: "+e.getMessage());} catch (Exception e) {System.out.println("IO: "+e.getMessage());} hero.get(0).setTexture("Girl"); hero.addToWorld(theWorld); theWorld.buildAllObjects(); identifyAnimations(); }