I download the xith3d from svn,but I don't know how to begin with it.I built the project that like this :
import java.io.File;
import javax.vecmath.Vector3f;
import net.jtank.input.KeyCode;
import org.xith3d.geometry.Cube;
import org.xith3d.loaders.texture.TextureLoader;
import org.xith3d.loaders.texture.TextureStreamLocatorFile;
import org.xith3d.render.base.Xith3DEnvironment;
import org.xith3d.render.canvas.Canvas3DWrapper;
import org.xith3d.render.canvas.Canvas3DWrapper.Resolution;
import org.xith3d.render.loop.RenderLoop;
import org.xith3d.scenegraph.BranchGroup;
public class TestXith extends RenderLoop
{
public void onKeyReleased(int key)
{
switch (key)
{
case KeyCode.VK_ESCAPE:
this.end();
break;
}
}
private BranchGroup createScene()
{
Cube cube = new Cube( "stone.jpg", false, 3.0f ); BranchGroup bg = new BranchGroup();
bg.addChild( cube );
return( bg );
}
public XithTest()
{
super( 128L );
Xith3DEnvironment env = new Xith3DEnvironment( new Vector3f( 3f, 2f, 5f ),
new Vector3f( 0f, 0f, 0f ),
new Vector3f( 0f, 1f, 0f ),
this );
Canvas3DWrapper canvas = Canvas3DWrapper.createStandalone(
Resolution.RES_800X600,
"My empty scene" );
this.registerKeyboardAndMouse( canvas );
env.addCanvas( canvas );
TextureLoader.getInstance().addTextureStreamLocator(
new TextureStreamLocatorFile( new File( "demo/textures") ) );
env.addPerspectiveBranch( createScene() );
this.begin();
}
public static void main(String[] args)
{
new XithTest();
}
}
But there are lots problems,such as there are not exist the followed libs:
import net.jtank.input.KeyCode;
import org.xith3d.geometry.Cube;
please give me some suggestions!thanks vary much