Package net.anzix.fsz.proceduralterrain

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

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

package net.anzix.fsz.proceduralterrain;

import com.ardor3d.example.pipeline.SimpleObjExample;
import com.ardor3d.extension.model.obj.ObjGeometryStore;
import com.ardor3d.extension.model.obj.ObjImporter;
import com.ardor3d.renderer.state.BlendState;
import com.ardor3d.scenegraph.Node;
import com.ardor3d.util.resource.ResourceLocatorTool;
import com.ardor3d.util.resource.SimpleResourceLocator;
import java.net.URISyntaxException;

/**
*
* @author csiga
*/
public class ObjTree extends Node{

    public ObjTree() {

        final ObjImporter importer = new ObjImporter();
        try {
            importer.setTextureLocator(new SimpleResourceLocator(ResourceLocatorTool.getClassPathResource(
                    SimpleObjExample.class, "OBJ/")));
        } catch (final URISyntaxException ex) {
            ex.printStackTrace();
        }
        final ObjGeometryStore storage = importer.load("OBJ/tree1.obj");

        //attachChild(storage.getScenegraph());

        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.ObjTree

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.