Package javax.media.j3d

Examples of javax.media.j3d.TransparencyAttributes


/* 147 */           a.setTexCoordGeneration(tcg);
/*     */         }
/*     */       }
/*     */
/* 151 */       if (p.transparent) {
/* 152 */         a.setTransparencyAttributes(new TransparencyAttributes(1, 0.0F));
/*     */       }
/*     */     }
/* 155 */     a.setMaterial(m);
/*     */
/* 157 */     shape.setAppearance(a);
View Full Code Here


/* 54 */     super(symbol, control);
/*    */   }
/*    */
/*    */   public void writeObject(DataOutput out) throws IOException {
/* 58 */     super.writeObject(out);
/* 59 */     TransparencyAttributes attr = (TransparencyAttributes)this.node;
/* 60 */     out.writeInt(attr.getDstBlendFunction());
/* 61 */     out.writeInt(attr.getSrcBlendFunction());
/* 62 */     out.writeFloat(attr.getTransparency());
/* 63 */     out.writeInt(attr.getTransparencyMode());
/*    */   }
View Full Code Here

/* 63 */     out.writeInt(attr.getTransparencyMode());
/*    */   }
/*    */
/*    */   public void readObject(DataInput in) throws IOException {
/* 67 */     super.readObject(in);
/* 68 */     TransparencyAttributes attr = (TransparencyAttributes)this.node;
/* 69 */     attr.setDstBlendFunction(in.readInt());
/* 70 */     attr.setSrcBlendFunction(in.readInt());
/* 71 */     attr.setTransparency(in.readFloat());
/* 72 */     attr.setTransparencyMode(in.readInt());
/*    */   }
View Full Code Here

/* 71 */     attr.setTransparency(in.readFloat());
/* 72 */     attr.setTransparencyMode(in.readInt());
/*    */   }
/*    */
/*    */   protected SceneGraphObject createNode() {
/* 76 */     return new TransparencyAttributes();
/*    */   }
View Full Code Here

/* 249 */         Material material = new Material(surf.getColor(), surf.getEmissiveColor(), surf.getDiffuseColor(), surf.getSpecularColor(), surf.getShininess());
/*     */
/* 254 */         material.setLightingEnable(true);
/* 255 */         appearance.setMaterial(material);
/* 256 */         if (surf.getTransparency() != 0.0F) {
/* 257 */           TransparencyAttributes ta = new TransparencyAttributes();
/* 258 */           ta.setTransparency(surf.getTransparency());
/* 259 */           ta.setTransparencyMode(2);
/* 260 */           appearance.setTransparencyAttributes(ta);
/*     */         }
/* 262 */         if (texture != null) {
/* 263 */           debugOutputLn(8, "texture != null, enable texturing");
/* 264 */           Texture tex = texture.getTexture();
/* 265 */           tex.setEnable(true);
/* 266 */           appearance.setTexture(tex);
/* 267 */           TextureAttributes ta = new TextureAttributes();
/* 268 */           if (texture.getType().equals("DTEX"))
/* 269 */             ta.setTextureMode(2);
/* 270 */           else if (texture.getType().equals("CTEX"))
/* 271 */             ta.setTextureMode(3);
/* 272 */           appearance.setTextureAttributes(ta);
/*     */         }
/*     */         else {
/* 275 */           debugOutputLn(8, "texture == null, no texture to use");
/*     */         }
View Full Code Here

/* 302 */     return rect;
/*     */   }
/*     */
/*     */   private Appearance setupAppearance(Texture2D t2d)
/*     */   {
/* 313 */     TransparencyAttributes transp = new TransparencyAttributes();
/* 314 */     transp.setTransparencyMode(2);
/* 315 */     transp.setTransparency(0.0F);
/* 316 */     Appearance appearance = new Appearance();
/* 317 */     appearance.setTransparencyAttributes(transp);
/* 318 */     appearance.setTexture(t2d);
/*     */
/* 320 */     Material m = new Material();
View Full Code Here

/*  879 */       if (this.echoColor != null) {
/*  880 */         Material m = a.getMaterial();
/*  881 */         m.setDiffuseColor(this.echoColor);
/*      */       }
/*  883 */       if (this.echoTransparency != 0.0F) {
/*  884 */         TransparencyAttributes ta = a.getTransparencyAttributes();
/*  885 */         ta.setTransparencyMode(2);
/*  886 */         ta.setTransparency(this.echoTransparency);
/*      */
/*  888 */         if ((this.echoGeometry instanceof SensorGnomonEcho))
/*  889 */           ta.setDstBlendFunction(1);
/*      */       }
/*  891 */       this.echoTransformGroup = new TransformGroup();
/*  892 */       this.echoTransformGroup.setCapability(18);
/*      */
/*  894 */       this.echoTransformGroup.setCapability(12);
View Full Code Here

/*      */   {
/* 3755 */     this.echoTransparency = transparency;
/*      */
/* 3757 */     if (this.echoGeometry != null) {
/* 3758 */       Appearance a = this.echoGeometry.getAppearance();
/* 3759 */       TransparencyAttributes ta = a.getTransparencyAttributes();
/* 3760 */       if (this.echoTransparency == 0.0F) {
/* 3761 */         ta.setTransparencyMode(4);
/* 3762 */         ta.setTransparency(0.0F);
/*      */       }
/*      */       else {
/* 3765 */         ta.setTransparencyMode(2);
/* 3766 */         ta.setTransparency(this.echoTransparency);
/*      */
/* 3768 */         if ((this.echoGeometry instanceof SensorGnomonEcho))
/* 3769 */           ta.setDstBlendFunction(1);
/*      */       }
/*      */     }
/*      */   }
View Full Code Here

/* 201 */     Appearance a = new Appearance();
/* 202 */     a.setMaterial(m);
/* 203 */     a.setCapability(0);
/* 204 */     a.setCapability(1);
/*     */
/* 206 */     TransparencyAttributes ta = new TransparencyAttributes();
/* 207 */     ta.setCapability(0);
/* 208 */     ta.setCapability(1);
/* 209 */     ta.setCapability(2);
/* 210 */     ta.setCapability(3);
/* 211 */     ta.setCapability(4);
/*     */
/* 213 */     ta.setCapability(5);
/*     */
/* 216 */     a.setTransparencyAttributes(ta);
/* 217 */     a.setCapability(10);
/* 218 */     a.setCapability(11);
/*     */
View Full Code Here

/* 195 */     Appearance a = new Appearance();
/* 196 */     a.setMaterial(m);
/* 197 */     a.setCapability(0);
/* 198 */     a.setCapability(1);
/*     */
/* 200 */     TransparencyAttributes tra = new TransparencyAttributes();
/* 201 */     tra.setCapability(0);
/* 202 */     tra.setCapability(1);
/* 203 */     tra.setCapability(2);
/* 204 */     tra.setCapability(3);
/* 205 */     ta.setCapability(4);
/*     */
/* 207 */     ta.setCapability(5);
/*     */
/* 210 */     a.setTransparencyAttributes(tra);
View Full Code Here

TOP

Related Classes of javax.media.j3d.TransparencyAttributes

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.