private void tileTexture(Object3D obj, float tileFactor) { PolygonManager pm = obj.getPolygonManager(); int end = pm.getMaxPolygonID(); for (int i = 0; i < end; i++) { SimpleVector uv0 = pm.getTextureUV(i, 0); SimpleVector uv1 = pm.getTextureUV(i, 1); SimpleVector uv2 = pm.getTextureUV(i, 2); uv0.scalarMul(tileFactor); uv1.scalarMul(tileFactor); uv2.scalarMul(tileFactor); int id = pm.getPolygonTexture(i); TextureInfo ti = new TextureInfo(id, uv0.x, uv0.y, uv1.x, uv1.y, uv2.x, uv2.y); pm.setPolygonTexture(i, ti); } }
The remaining question is: Why would you want to? A tiled sky isn't a real sky anymore, isn't it?
skyBox = new SkyBox("stars", "stars", "stars", "stars","stars", "stars", 200);Object3D skybox3DObj = skyBox.getWorld().getObjects().nextElement();tileTexture(skybox3DObj, 2);
Maybe the SkyBox-class does something that prevents this from working...i'll look into it.
I'll most likely deprecate it and replace it with a setClamping(<boolean>)-method.
Awesome. Then I just can disable clamping once I setup the skybox instead of overriding?