Package javax.media.j3d

Examples of javax.media.j3d.Texture2D


/* 107 */     this.control.getSymbolTable().incNodeComponentRefCount(this.detailImage);
/*     */   }
/*     */
/*     */   public void buildGraph()
/*     */   {
/* 112 */     Texture2D t = (Texture2D)this.node;
/* 113 */     t.setDetailImage((ImageComponent2D)this.control.getSymbolTable().getJ3dNode(this.detailImage));
/* 114 */     super.buildGraph();
/*     */   }
View Full Code Here


/* 118 */     return createNode(j3dClass, new Class[] { Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE }, new Object[] { new Integer(this.mipMapMode), new Integer(this.format), new Integer(this.width), new Integer(this.height), new Integer(this.boundaryWidth) });
/*     */   }
/*     */
/*     */   protected SceneGraphObject createNode()
/*     */   {
/* 131 */     return new Texture2D(this.mipMapMode, this.format, this.width, this.height, this.boundaryWidth);
/*     */   }
View Full Code Here

/* 586 */         int newW = width;
/* 587 */         int newH = height;
/* 588 */         int level = Math.max(computeLog(width), computeLog(height)) + 1;
/* 589 */         scaledImageComponents = new ImageComponent2D[level];
/* 590 */         scaledBufferedImages = new BufferedImage[level];
/* 591 */         this.tex = new Texture2D(2, this.textureFormat, width, height);
/*     */
/* 594 */         for (int i = 0; i < level; i++) {
/* 595 */           scaledBufferedImages[i] = getScaledImage(origImage, newW, newH);
/* 596 */           scaledImageComponents[i] = new ImageComponent2D(this.imageComponentFormat, scaledBufferedImages[i], this.byRef, this.yUp);
/*     */
/* 600 */           this.tex.setImage(i, scaledImageComponents[i]);
/* 601 */           if (newW > 1) newW >>= 1;
/* 602 */           if (newH > 1) newH >>= 1;
/* 603 */           origImage = scaledBufferedImages[i];
/*     */         }
/*     */       }
/*     */       else {
/* 607 */         scaledImageComponents = new ImageComponent2D[1];
/* 608 */         scaledBufferedImages = new BufferedImage[1];
/*     */
/* 611 */         scaledBufferedImages[0] = getScaledImage(this.bufferedImage, width, height);
/*     */
/* 613 */         scaledImageComponents[0] = new ImageComponent2D(this.imageComponentFormat, scaledBufferedImages[0], this.byRef, this.yUp);
/*     */
/* 617 */         this.tex = new Texture2D(1, this.textureFormat, width, height);
/*     */
/* 619 */         this.tex.setImage(0, scaledImageComponents[0]);
/*     */       }
/* 621 */       this.tex.setMinFilter(3);
/* 622 */       this.tex.setMagFilter(3);
View Full Code Here

TOP

Related Classes of javax.media.j3d.Texture2D

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.