Package com.ardor3d.scenegraph.shape

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


        createDefaultHandle(extent);
    }

    protected void createDefaultHandle(final double extent) {
        final Box grip = new Box("grip", Vector3.ZERO, extent, extent, extent);
        grip.updateModelBound();
        _handle.attachChild(grip);

        // setup some colors, just at the corner of the primitives since we will use flat shading.
        grip.setSolidColor(ColorRGBA.WHITE);
        final FloatBuffer colors = grip.getMeshData().getColorBuffer();
View Full Code Here


        final Node node = new Node();

        final Random r = new Random(1337);
        for (int i = 0; i < 150; i++) {
            final Box box = new Box("b" + i, new Vector3(0, 0, 0), new Vector3(0.1f, 0.1f, 0.1f));
            box.updateModelBound();
            box.setRandomColors();
            final MaterialState ms = new MaterialState();
            ms.setDiffuse(MaterialFace.FrontAndBack, new ColorRGBA(r.nextFloat(), r.nextFloat(), r.nextFloat(), 1));
            box.setRenderState(ms);
            box.setTranslation(new Vector3(r.nextFloat(), r.nextFloat(), r.nextFloat()));
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.