Package com.xith3d.scenegraph

Examples of com.xith3d.scenegraph.Locale


   * Main function to test navigation
   * @param args
   */
  public static void main(String[] args) {
    VirtualUniverse universe = new VirtualUniverse();
    Locale locale = new Locale();
    universe.addLocale(locale);

    BranchGroup objRoot = new BranchGroup();

    Appearance a = new Appearance();
    a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
    Shape3D sph = new Shape3D(TestUtils.createSphere(1.0f, 20), a);
    TransformGroup sphereTrans = new TransformGroup();
    sphereTrans.addChild(sph);

    objRoot.addChild(sphereTrans);

    AmbientLight aLgt = new AmbientLight(new Color3f(0.2f, 0.2f, 0.2f));
    objRoot.addChild(aLgt);

    locale.addBranchGraph(objRoot);
   
   
    PluginManager pluginManager = (PluginManager) new Java3DPluginManager();
    
   
View Full Code Here


   */
  public static void main(String[] args) {
    JFrame f=new JFrame("Universes");
   
    VirtualUniverse v=new VirtualUniverse();
    Locale l=new Locale();
    l.setName("loc1");
    v.addLocale(l);
    BranchGroup bg=new BranchGroup();
    bg.setName("bg1");
    l.addBranchGraph(bg);
   
    Appearance a = new Appearance();
    a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
    Shape3D sph = new Shape3D(TestUtils.createSphere(1.0f, 20), a);
    sph.setName("s1");
    TransformGroup sphereTrans = new TransformGroup();
    sphereTrans.addChild(sph);
    sphereTrans.setName("t1");

    bg.addChild(sphereTrans);

    AmbientLight aLgt = new AmbientLight(new Color3f(0.2f, 0.2f, 0.2f));
    aLgt.setName("l1");
    bg.addChild(aLgt);
   
    VirtualUniverse v2=new VirtualUniverse();
    Locale l2=new Locale();
    l2.setName("loc2");
    v2.addLocale(l2);
    BranchGroup bg2=new BranchGroup();
    bg2.setName("bg2");
    l2.addBranchGraph(bg2);

    SceneGraphModel tm=new SceneGraphModelXith3D();
    // TODO: use factories and test them by the same occasion
    //tm.insert(null, v, "v1", 0);
    //tm.insert(null, v2, "v2", 0);
View Full Code Here

   
    public SceneNodeXith3D(ActiveNode parent,  PluginManager pm) {
        super(parent);
        pluginManager = pm;
        universe = new VirtualUniverse();
        locale = new Locale();
        locale.setName(name);
        //locale.setPickable(true);
        //locale.setUserData(this);
        universe.addLocale(locale);
       
View Full Code Here

TOP

Related Classes of com.xith3d.scenegraph.Locale

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.