Package com.ardor3d.renderer.state

Examples of com.ardor3d.renderer.state.TextureState


        } else {
            textureRenderer.getCamera().setLocation(new Vector3(-10, 0, 15));
            textureRenderer.setBackgroundColor(new ColorRGBA(0f, 0f, 0f, 1));
            fakeTex = new Texture2D();
            textureRenderer.setupTexture(fakeTex);
            final TextureState screen = new TextureState();
            screen.setTexture(fakeTex);
            screen.setEnabled(true);
            quad.setRenderState(screen);
        }
    }
View Full Code Here


        box.setRandomColors();
        // Attach the box to the scenegraph root.
        _root.attachChild(box);

        // Add a texture to the box.
        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear, true));
        box.setRenderState(ts);

        // Add a material to the box, to show both vertex color and lighting/shading.
        final MaterialState ms = new MaterialState();
        ms.setColorMaterial(ColorMaterial.Diffuse);
View Full Code Here

        final Box b3 = new Box("Box", min, max);
        b3.setModelBound(new BoundingBox());
        b3.setTranslation(new Vector3(0, -15, -15));
        opaques.attachChild(b3);

        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", MinificationFilter.Trilinear, true));
        opaques.setRenderState(ts);

        final LightState ls = new LightState();
        ls.setEnabled(true);
        final DirectionalLight dLight = new DirectionalLight();
View Full Code Here

                animateExternalCamera = !animateExternalCamera;
                updateText();
            }
        }));

        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));
        _root.setRenderState(ts);

        final MaterialState ms = new MaterialState();
        ms.setColorMaterial(ColorMaterial.Diffuse);
View Full Code Here

        box = new Box("Box", new Vector3(0, 0, 0), 5, 5, 5);
        box.setModelBound(new BoundingBox());
        box.setTranslation(new Vector3(0, 0, -15));
        _root.attachChild(box);

        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear, true));
        box.setRenderState(ts);

        final MaterialState ms = new MaterialState();
        ms.setColorMaterial(ColorMaterial.Diffuse);
        box.setRenderState(ms);
View Full Code Here

            }
            case 2: {
                final Image nextImage = AWTImageLoader.makeArdor3dImage(img, false);
                final Texture nextTexture = TextureManager.loadFromImage(nextImage,
                        Texture.MinificationFilter.Trilinear);
                final TextureState ts = (TextureState) _root.getLocalRenderState(RenderState.StateType.Texture);
                ts.setTexture(nextTexture);
                break;
            }
        }

        super.renderExample(renderer);
View Full Code Here

        t = new Box("Box", min, max);
        t.setModelBound(new BoundingBox());
        t.setTranslation(new Vector3(0, 0, -15));
        _root.attachChild(t);

        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear, false));

        final MaterialState ms = new MaterialState();
        ms.setColorMaterial(ColorMaterial.Diffuse);
        _root.setRenderState(ms);
View Full Code Here

    }

    private void addFloor() {
        final Box floor = new Box("floor", Vector3.ZERO, 100, 5, 100);
        floor.setTranslation(0, -5, 0);
        final TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("models/obj/pitcher.jpg", Texture.MinificationFilter.Trilinear, true));
        floor.setRenderState(ts);
        floor.getSceneHints().setPickingHint(PickingHint.Pickable, false);
        floor.setModelBound(new BoundingBox());
        _root.attachChild(floor);
    }
View Full Code Here

    }

    private void addObjects() {
        final Box box1 = new Box("box", Vector3.ZERO, 5, 15, 5);
        box1.setTranslation(0, box1.getYExtent(), 0);
        TextureState ts = new TextureState();
        ts.setTexture(TextureManager.load("images/skybox/1.jpg", Texture.MinificationFilter.Trilinear, true));
        box1.setRenderState(ts);
        box1.getSceneHints().setPickingHint(PickingHint.Pickable, true);
        box1.setModelBound(new BoundingBox());

        final Node base = new Node();
        base.setTranslation(0, 0, 0);
        base.attachChild(box1);
        _root.attachChild(base);

        final Sphere sphere = new Sphere("sphere", Vector3.ZERO, 16, 16, 8);
        ts = new TextureState();
        ts.setTexture(TextureManager.load("images/water/dudvmap.png", Texture.MinificationFilter.Trilinear, true));
        sphere.setRenderState(ts);
        sphere.getSceneHints().setPickingHint(PickingHint.Pickable, true);
        sphere.setModelBound(new BoundingSphere());

        final Node joint = new Node();
        joint.setTranslation(0, sphere.getRadius() + 2 * box1.getYExtent(), 0);
        joint.attachChild(sphere);
        base.attachChild(joint);

        final Box box2 = new Box("box", Vector3.ZERO, 5, 15, 5);
        box2.setTranslation(0, box2.getYExtent(), 0);
        ts = new TextureState();
        ts.setTexture(TextureManager.load("images/skybox/3.jpg", Texture.MinificationFilter.Trilinear, true));
        box2.setRenderState(ts);
        box2.getSceneHints().setPickingHint(PickingHint.Pickable, true);
        box2.setModelBound(new BoundingBox());

        final Node arm = new Node();
View Full Code Here

        final CullState cullFrontFace = new CullState();
        cullFrontFace.setEnabled(true);
        cullFrontFace.setCullFace(CullState.Face.Back);
        _root.setRenderState(cullFrontFace);

        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("images/ardor3d_white_256.jpg", Texture.MinificationFilter.Trilinear, true));
        _root.setRenderState(ts);

        final MaterialState ms = new MaterialState();
        ms.setColorMaterial(ColorMaterial.Diffuse);
        _root.setRenderState(ms);
View Full Code Here

TOP

Related Classes of com.ardor3d.renderer.state.TextureState

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.