Positioning of 3d boxes in JavaFx
<p>I'm a beginner in JavaFx 3d modelling. I'm trying to create a 3d-model of boxes in a room. I have the dimensions of the boxes and the coords from the front-left-bottom corner of every box. I've tried to set the coords with setTranslateX(), but the result isn't correct. Here is the pice of my code where I try to set the coords:</p>

<pre><code>for (int i = 0; i &lt; Main.load.size(); i++) {
        Load l=Main.load.get(i);
        Box sphere = new Box(l.getLength()*10, l.getWidth()*10, l.getHeight()*10);
        sphere.setTranslateX(l.getX()*10);
        sphere.setTranslateY(l.getY()*10);
        sphere.setTranslateZ(l.getZ()*10);
        PhongMaterial m = new PhongMaterial();
        m.setDiffuseColor(new Color(Math.random(),Math.random(),Math.random(),1));
        m.setSpecularColor(Color.BLACK);
        sphere.setMaterial(m);
        root.getChildren().add(sphere);
    }
</code></pre>

<p>I hope someone can help me.</p>

<p>Here is an example:</p>

<p>Sizes:
blue (30,50,50)
pink (10,10,20)</p>

<p>Position:
blue (0,0,0)
pink (30,0,0)</p>

<p><a href="http://i.stack.imgur.com/CdiEx.png" rel="nofollow">And this is what I get</a></p>