/*
* 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);
}
}