Package com.xith3d.scenegraph

Examples of com.xith3d.scenegraph.BranchGroup


  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


    protected BranchGroup branchgroup;
   
    public BranchGroupNodeXith3D(ActiveNode parent) {
        super(parent);
        branchgroup = new BranchGroup();
        branchgroup.setName(name);
        branchgroup.setUserData(this);
        branchgroup.setPickable(true);
        if (parent.get3DObject() instanceof Group) {
            ((Group)parent.get3DObject()).addChild(branchgroup);
View Full Code Here

   
    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);
View Full Code Here

        locale.setName(name);
        //locale.setPickable(true);
        //locale.setUserData(this);
        universe.addLocale(locale);
       
        branchgroup = new BranchGroup();
        branchgroup.setName(name);
        branchgroup.setUserData(this);
        branchgroup.setPickable(true);

        rootGroup = new BranchGroup();
        rootGroup.setName(name);
        rootGroup.setUserData(this);
        rootGroup.setPickable(true);
       
        AmbientLight alight = new AmbientLight(true,new Color3f(0.5f,0.5f,0.5f));
View Full Code Here

TOP

Related Classes of com.xith3d.scenegraph.BranchGroup

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.