Package com.ardor3d.math

Examples of com.ardor3d.math.ColorRGBA


        water = new PlainWater(camera, reflectedNode, sky, FAR_PLANE, WATER_HEIGHT); //= new Water(camera, reflectedNode, sky, FAR_PLANE, WATER_HEIGHT, timer);
        root.attachChild(reflectedNode);   
        root.attachChild(water);

        // FOG
        ColorRGBA fogColor = new ColorRGBA(1.0f, 1.0f, 1.0f, 1.0f);
        fog = new Fog(FAR_PLANE, WATER_HEIGHT, fogColor, new ColorRGBA(0.1f, 0.1f, 0.9f, 1.0f));
        root.setRenderState(fog);

        // SHADOW
        shadow = new Shadow();
        shadow.registerPass(passManager);
View Full Code Here


    protected void updateTerrain(final ReadOnlyTimer timer, Camera camera ) {

        if (aboveWater && camera.getLocation().getY() < water.getWaterHeight()) {
            fogState.setStart(-1000f);
            fogState.setEnd(farPlane / 10f);
            fogState.setColor(new ColorRGBA(0.0f, 0.0f, 0.1f, 1.0f));
            aboveWater = false;
        } else if (!aboveWater && camera.getLocation().getY() >= water.getWaterHeight()) {
            fogState.setStart(farPlane / 2.0f);
            fogState.setEnd(farPlane);
            fogState.setColor(new ColorRGBA(0.96f, 0.97f, 1.0f, 1.0f));
            aboveWater = true;
        }
    }
View Full Code Here

    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

public class Layer {

    public Layer(String name, ReadOnlyColorRGBA color, double minimumZoneThickness, double maximumZoneThickness, double chanceOfMinimumZoneThickness, double chanceOfMaximumZoneThickness, double rise) {
        this.name = name;
        this.color = new ColorRGBA();
        this.color.set(color);
        this.minimumZoneThickness = minimumZoneThickness;
        this.maximumZoneThickness = maximumZoneThickness;
        this.chanceOfMinimumZoneThickness = chanceOfMinimumZoneThickness;
        this.chanceOfMaximumZoneThickness = chanceOfMaximumZoneThickness;
View Full Code Here

                    // pick a place to modify the terrain
                    final int x = MathUtils.nextRandomInt(0, side - 1);
                    final int y = MathUtils.nextRandomInt(0, side - 1);

                    // pick a color
                    final ColorRGBA paint = ColorRGBA.randomColor(null);

                    // pick a random radius 0 - tenth side
                    final int radius = MathUtils.nextRandomInt(0, side / 10);

                    // pick an offset amount
View Full Code Here

    public ProceduralTextureSource(final Function3D function) {
        this.function = function;

        terrainColors = new ReadOnlyColorRGBA[256];
        terrainColors[0] = new ColorRGBA(0, 0, .5f, 1);
        terrainColors[95] = new ColorRGBA(0, 0, 1, 1);
        terrainColors[127] = new ColorRGBA(0, .5f, 1, 1);
        terrainColors[137] = new ColorRGBA(240 / 255f, 240 / 255f, 64 / 255f, 1);
        terrainColors[143] = new ColorRGBA(32 / 255f, 160 / 255f, 0, 1);
        terrainColors[175] = new ColorRGBA(224 / 255f, 224 / 255f, 0, 1);
        terrainColors[223] = new ColorRGBA(128 / 255f, 128 / 255f, 128 / 255f, 1);
        terrainColors[255] = ColorRGBA.WHITE;
        GeneratedImageFactory.fillInColorTable(terrainColors);
    }
View Full Code Here

        cs.setEnabled(true);
        cs.setCullFace(CullState.Face.Back);
        setRenderState(cs);

        final MaterialState materialState = new MaterialState();
        materialState.setAmbient(MaterialFace.FrontAndBack, new ColorRGBA(1, 1, 1, 1));
        materialState.setDiffuse(MaterialFace.FrontAndBack, new ColorRGBA(1, 1, 1, 1));
        materialState.setSpecular(MaterialFace.FrontAndBack, new ColorRGBA(1, 1, 1, 1));
        materialState.setShininess(MaterialFace.FrontAndBack, 64.0f);
        setRenderState(materialState);

        blendState = new BlendState();
        blendState.setBlendEnabled(true);
View Full Code Here

    /**
     * Instantiates a new drawable camera.
     */
    public DrawableCamera() {
        this(null, new ColorRGBA(0, 1, 1, 1), (short) 0xF000);
    }
View Full Code Here

        _gHeight = height;
        // prepare our TextureRenderer
        _textureRenderer = TextureRendererFactory.INSTANCE.createTextureRenderer(width, height, renderer, caps);

        if (_textureRenderer != null) {
            _textureRenderer.setBackgroundColor(new ColorRGBA(ColorRGBA.BLACK));
        }
    }
View Full Code Here

        _horizontals = new Line("horiz", verts, null, null, null);
        _horizontals.getMeshData().setIndexMode(IndexMode.Lines);
        _horizontals.getSceneHints().setRenderBucketType(RenderBucketType.Ortho);

        _horizontals.setDefaultColor(getColorConfig(LineGrapher.Horizontal, ConfigKeys.Color.name(), new ColorRGBA(
                ColorRGBA.BLUE)));
        _horizontals.setLineWidth(getIntConfig(LineGrapher.Horizontal, ConfigKeys.Width.name(), 1));
        _horizontals
                .setStipplePattern(getShortConfig(LineGrapher.Horizontal, ConfigKeys.Stipple.name(), (short) 0xFF00));
        _horizontals.setAntialiased(getBooleanConfig(LineGrapher.Horizontal, ConfigKeys.Antialias.name(), true));
View Full Code Here

TOP

Related Classes of com.ardor3d.math.ColorRGBA

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.