Package com.ardor3d.bounding

Examples of com.ardor3d.bounding.BoundingBox


    @Override
    protected void initExample() {
        _canvas.setTitle("OrbitCam Example");

        // setup some basics on the teapot.
        targetMesh.setModelBound(new BoundingBox());
        targetMesh.setTranslation(new Vector3(0, 0, -15));
        _root.attachChild(targetMesh);

        // Add a texture to the mesh.
        final TextureState ts = new TextureState();
View Full Code Here


        // Make it a bit more colorful.
        _box.setRandomColors();

        // Setup a bounding box for it.
        _box.setModelBound(new BoundingBox());

        // Set its location in space.
        _box.setTranslation(new Vector3(0, 0, -15));

        // Add to root.
View Full Code Here

        // Make it a bit more colorful.
        _box.setRandomColors();

        // Setup a bounding box for it.
        _box.setModelBound(new BoundingBox());

        // Set its location in space.
        _box.setTranslation(new Vector3(0, 0, -15));

        // Add to root.
View Full Code Here

        _canvas.setTitle("RenderEffects Example");

        // Create a new sphere that rotates
        final Sphere sphere = new Sphere("Sphere", new Vector3(0, 0, 0), 32, 32, 5);
        sphere.setModelBound(new BoundingBox());
        sphere.setTranslation(new Vector3(0, 0, -15));
        sphere.addController(new SpatialController<Spatial>() {
            private final Vector3 _axis = new Vector3(1, 1, 0.5f).normalizeLocal();
            private final Matrix3 _rotate = new Matrix3();
            private double _angle = 0;
View Full Code Here

        Mesh mesh;
        for (int i = 0, max = edge * edge; i < max; i++) {
            mesh = new StripBox("stripbox" + i, new Vector3(), .5, .5, .5);
            mesh.setTranslation(new Vector3(i % edge, i / edge, 0));

            mesh.setModelBound(new BoundingBox());
            mesh.setSolidColor(ColorRGBA.randomColor(null));
            origNode.attachChild(mesh);
        }

        // Create a single Mesh from the origNode and its children.
View Full Code Here

    @Override
    protected void initExample() {
        _canvas.setTitle("TestSharedMesh");

        final Sphere sphere = new Sphere("Sphere", 8, 8, 1);
        sphere.setModelBound(new BoundingBox());
        sphere.getSceneHints().setDataMode(DataMode.VBO);

        final CullState cs = new CullState();
        cs.setCullFace(CullState.Face.Back);
        cs.setEnabled(true);
View Full Code Here

    }

    private Mesh createSphere(final Node parentNode, final String textureName, final WrapMode mode) {
        // Create sphere
        final Sphere sphere = new Sphere("Sphere", 10, 10, 1);
        sphere.setModelBound(new BoundingBox());
        sphere.setTranslation(new Vector3(MathUtils.rand.nextInt(40) - 20, MathUtils.rand.nextInt(40) - 20,
                MathUtils.rand.nextInt(40) - 100));
        parentNode.attachChild(sphere);

        setupStates(sphere, textureName, mode);
View Full Code Here

    }

    private Mesh createBox(final Node parentNode, final String textureName, final WrapMode mode) {
        // Create box
        final Box box = new Box("Box", new Vector3(0, 0, 0), 1, 1, 1);
        box.setModelBound(new BoundingBox());
        box.setTranslation(new Vector3(MathUtils.rand.nextInt(40) - 20, MathUtils.rand.nextInt(40) - 20, MathUtils.rand
                .nextInt(40) - 100));
        parentNode.attachChild(box);

        setupStates(box, textureName, mode);
View Full Code Here

        ts.setTexture(t0);

        box = new Box("box5", new Vector3(-50, -2, -50), new Vector3(50, 2, 50));
        box.setTranslation(new Vector3(0, -15, 0));
        box.setRenderState(ts);
        box.setModelBound(new BoundingBox());
        objects.attachChild(box);

        return objects;
    }
View Full Code Here

        // Make it a bit more colorful.
        box.setRandomColors();

        // Setup a bounding box for it.
        box.setModelBound(new BoundingBox());

        // Set its location in space.
        box.setTranslation(new Vector3(0, 0, -15));

        // Add to root.
View Full Code Here

TOP

Related Classes of com.ardor3d.bounding.BoundingBox

Copyright © 2018 www.massapicom. 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.