Package com.ardor3d.renderer.state

Examples of com.ardor3d.renderer.state.FogState


        camera.lookAt(new Vector3(1, 1, 1), Vector3.UNIT_Y);
        camera.setFrustumPerspective(70.0, (float) camera.getWidth() / camera.getHeight(), 1.0f, farPlane);
    }

    protected void initFog( Node root) {
        fogState = new FogState();
        fogState.setStart(farPlane / 2.0f);
        fogState.setEnd(farPlane);
        fogState.setColor(new ColorRGBA(0.96f, 0.97f, 1.0f, 1.0f));
        fogState.setDensityFunction(DensityFunction.Linear);
        root.setRenderState(fogState);
View Full Code Here


        final ZBufferState zbuff = new ZBufferState();
        zbuff.setEnabled(false);
        setRenderState(zbuff);

        final FogState fs = new FogState();
        fs.setEnabled(false);
        setRenderState(fs);

        // We don't want it making our skybox disapear, so force view
        getSceneHints().setCullHint(CullHint.Never);
View Full Code Here

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

        final FogState fs = new FogState();
        fs.setStart(farPlane / 2.0f);
        fs.setEnd(farPlane);
        fs.setColor(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
        fs.setDensityFunction(DensityFunction.Linear);
        _root.setRenderState(fs);
    }
View Full Code Here

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

        final FogState fs = new FogState();
        fs.setStart(farPlane / 2.0f);
        fs.setEnd(farPlane);
        fs.setColor(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
        fs.setDensityFunction(DensityFunction.Linear);
        _root.setRenderState(fs);
    }
View Full Code Here

    /**
     * Setup fog.
     */
    private void setupFog() {
        final FogState fogState = new FogState();
        fogState.setDensity(1.0f);
        fogState.setEnabled(true);
        fogState.setColor(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
        fogState.setEnd((float) farPlane);
        fogState.setStart((float) farPlane / 10.0f);
        fogState.setDensityFunction(FogState.DensityFunction.Linear);
        fogState.setQuality(FogState.Quality.PerVertex);
        _root.setRenderState(fogState);
    }
View Full Code Here

    /**
     * Setup fog.
     */
    private void setupFog() {
        final FogState fogState = new FogState();
        fogState.setDensity(1.0f);
        fogState.setEnabled(true);
        fogState.setColor(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
        fogState.setEnd((float) farPlane);
        fogState.setStart((float) farPlane / 10.0f);
        fogState.setDensityFunction(FogState.DensityFunction.Linear);
        fogState.setQuality(FogState.Quality.PerVertex);
        _root.setRenderState(fogState);
    }
View Full Code Here

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

        final FogState fs = new FogState();
        fs.setStart(farPlane / 2.0f);
        fs.setEnd(farPlane);
        fs.setColor(ColorRGBA.GRAY);
        fs.setDensityFunction(DensityFunction.Linear);
        _root.setRenderState(fs);
    }
View Full Code Here

        light.setSpecular(new ColorRGBA(0.3f, 0.3f, 0.2f, 1));
        light.setDirection(new Vector3(-1, -1, -1).normalizeLocal());
        _lightState.attach(light);
        _lightState.setEnabled(true);

        final FogState fs = new FogState();
        fs.setStart(farPlane / 2.0f);
        fs.setEnd(farPlane);
        fs.setColor(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
        fs.setDensityFunction(DensityFunction.Linear);
        terrainNode.setRenderState(fs);
    }
View Full Code Here

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

        final FogState fs = new FogState();
        fs.setStart(farPlane / 2.0f);
        fs.setEnd(farPlane);
        fs.setColor(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
        fs.setDensityFunction(DensityFunction.Linear);
        _root.setRenderState(fs);
    }
View Full Code Here

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

        final FogState fs = new FogState();
        fs.setStart(farPlane / 2.0f);
        fs.setEnd(farPlane);
        fs.setColor(new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f));
        fs.setDensityFunction(DensityFunction.Linear);
        _root.setRenderState(fs);
    }
View Full Code Here

TOP

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

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.