Package javax.media.j3d

Examples of javax.media.j3d.Locale


     * This timer is used to gather notify events and send them at a reasonable rate to 3D motors.
     */
    Timer _timer;
   
    Universe() {
        _rootLocale = new Locale(this);
        _viewers = new HashMap<Canvas3D, Viewer>();
        _listeners = new ArrayList<Listener>();
    }
View Full Code Here


    public ArrayList<Node> getNodes(Class<? extends Node> nodeClass){
        ArrayList<Node> res=new ArrayList<Node>();
        Enumeration<?> e=getAllLocales();
        while(e.hasMoreElements()){
            Locale l=(Locale)e.nextElement();
            Enumeration<?> el=l.getAllBranchGraphs();
            while(el.hasMoreElements()){
                BranchGroup bg=(BranchGroup)el.nextElement();
                if(nodeClass.isAssignableFrom(bg.getClass())){
                    res.add(bg);
                }
View Full Code Here

/*     */       else {
/* 282 */         this.locale = localeFactory.createLocale(this);
/*     */       }
/*     */     }
/* 285 */     else if (origin != null)
/* 286 */       this.locale = new Locale(this, origin);
/*     */     else
/* 288 */       this.locale = new Locale(this);
/*     */   }
View Full Code Here

/* 154 */     out.writeInt(this.universe.numLocales());
/* 155 */     this.localeBGs = new ArrayList(this.universe.numLocales());
/* 156 */     int currentLocale = 0;
/* 157 */     int graphID = 0;
/* 158 */     while (allLocales.hasMoreElements()) {
/* 159 */       Locale locale = (Locale)allLocales.nextElement();
/* 160 */       HiResCoord hiRes = new HiResCoord();
/* 161 */       writeHiResCoord(out, hiRes);
/*     */       int[] bgs;
/*     */       int[] bgs;
/* 163 */       if (currentLocale == 0)
/* 164 */         bgs = new int[locale.numBranchGraphs() - 1];
/*     */       else
/* 166 */         bgs = new int[locale.numBranchGraphs()];
/* 167 */       out.writeInt(bgs.length);
/* 168 */       int count = 0;
/* 169 */       Enumeration e = locale.getAllBranchGraphs();
/* 170 */       while (e.hasMoreElements()) {
/* 171 */         BranchGroup bg = (BranchGroup)e.nextElement();
/* 172 */         if (!(bg instanceof ViewingPlatform)) {
/* 173 */           this.control.getSymbolTable().addBranchGraphReference(bg, graphID);
/* 174 */           bgs[count] = (graphID++);
View Full Code Here

/* 185 */     int numLocales = in.readInt();
/* 186 */     this.localeBGs = new ArrayList(numLocales);
/*     */
/* 188 */     for (int i = 0; i < numLocales; i++) {
/* 189 */       HiResCoord hiRes = readHiResCoord(in);
/*     */       Locale locale;
/* 191 */       if (i == 0) {
/* 192 */         Locale locale = this.universe.getLocale();
/* 193 */         locale.setHiRes(hiRes);
/*     */       } else {
/* 195 */         locale = new Locale(this.universe, hiRes);
/*     */       }
/*     */
/* 198 */       int numBG = in.readInt();
/* 199 */       int[] bgs = new int[numBG];
/* 200 */       for (int n = 0; n < numBG; n++) {
View Full Code Here

/*     */
/*     */   public void buildGraph()
/*     */   {
/* 214 */     Enumeration e = this.universe.getAllLocales();
/* 215 */     for (int i = 0; i < this.localeBGs.size(); i++) {
/* 216 */       Locale locale = (Locale)e.nextElement();
/* 217 */       int[] bgs = (int[])this.localeBGs.get(i);
/* 218 */       for (int j = 0; j < bgs.length; j++) {
/* 219 */         SymbolTableData symbol = this.control.getSymbolTable().getBranchGraphRoot(bgs[j]);
/* 220 */         locale.addBranchGraph((BranchGroup)symbol.j3dNode);
/*     */       }
/*     */     }
/*     */
/* 224 */     if (this.viewerAvatar != null) {
/* 225 */       this.viewerAvatar.buildGraph();
View Full Code Here

/*     */   public void attachAllGraphs()
/*     */   {
/* 278 */     Enumeration e = this.universe.getAllLocales();
/*     */
/* 281 */     for (int i = 0; i < this.localeBGs.size(); i++) {
/* 282 */       Locale locale = (Locale)e.nextElement();
/* 283 */       int[] bgs = (int[])this.localeBGs.get(i);
/* 284 */       for (int j = 0; j < bgs.length; j++) {
/* 285 */         SymbolTableData symbol = this.control.getSymbolTable().getBranchGraphRoot(bgs[j]);
/* 286 */         locale.addBranchGraph((BranchGroup)symbol.j3dNode);
/*     */       }
/*     */     }
/*     */   }
View Full Code Here

        branchGroup.addChild(node);
        addToLocale(branchGroup);
    }

    public static void addToLocale(BranchGroup branchGroup) {
        Locale locale = new Locale(new VirtualUniverse());
        locale.addBranchGraph(branchGroup);
    }
View Full Code Here

        branchGroup.addChild(node);
        addToLocale(branchGroup);
    }

    public static void addToLocale(BranchGroup branchGroup) {
        Locale locale = new Locale(new VirtualUniverse());
        locale.addBranchGraph(branchGroup);
    }
View Full Code Here

TOP

Related Classes of javax.media.j3d.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.