Package com.ardor3d.scenegraph.shape

Examples of com.ardor3d.scenegraph.shape.Sphere.updateModelBound()


     *            Index of the sphere
     */
    void randomSphere(final int i) {
        // Crate a sphere and position it.
        final Sphere sphere = new Sphere("sphere" + i, 18, 18, MathUtils.nextRandomDouble() * 1.75 + 1.25);
        sphere.updateModelBound();
        sphere.setTranslation(new Vector3(rand.nextDouble() * worldsize * 2 - worldsize, rand.nextDouble() * worldsize
                * 2 - worldsize, rand.nextDouble() * worldsize * 2 - worldsize));

        _root.attachChild(sphere);
    }
View Full Code Here


        _root.attachChild(n1);

        final Random rand = new Random(1337);

        final Sphere sphere = new Sphere("Sphere", 8, 8, 1);
        sphere.updateModelBound();

        for (int i = 0; i < 200; i++) {
            final Mesh sm = sphere.makeCopy(true);

            sm.setTranslation(new Vector3(rand.nextDouble() * 100.0 - 50.0, rand.nextDouble() * 100.0 - 50.0, rand
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.