Package net.anzix.fsz.proceduralterrain

Source Code of net.anzix.fsz.proceduralterrain.Forest

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package net.anzix.fsz.proceduralterrain;

import com.ardor3d.image.Texture;
import com.ardor3d.image.TextureStoreFormat;
import com.ardor3d.renderer.state.BlendState;
import com.ardor3d.renderer.state.LightState;
import com.ardor3d.renderer.state.TextureState;
import com.ardor3d.scenegraph.Node;
import com.ardor3d.util.TextureManager;

/**
*
* @author kovacsandras
*/
public class Forest extends Node {

    public Forest() {
        final TextureState ts = new TextureState();
        ts.setEnabled(true);
        ts.setTexture(TextureManager.load("OBJ/Branch_Summer.png", Texture.MinificationFilter.Trilinear,
                TextureStoreFormat.GuessCompressedFormat, true));
        setRenderState(ts);

        final LightState lightState = new LightState();
        lightState.setEnabled(false);
        setRenderState(lightState);

        final BlendState blendState = new BlendState();
        blendState.setBlendEnabled(true);
        blendState.setReference(0.5f);
        blendState.setTestEnabled(true);
        setRenderState(blendState);

    }
}
TOP

Related Classes of net.anzix.fsz.proceduralterrain.Forest

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.