Examples of PolygonAttributes


Examples of javax.media.j3d.PolygonAttributes

    Appearance blackApp = new Appearance();
    setToMyDefaultAppearance(blackApp,new Color3f(0.0f,0.0f,0.0f));

    //The following lines change the display style of the Appearance blackApp
    //to wire frame instead of solid.
    PolygonAttributes polygAttr = new PolygonAttributes();
    polygAttr.setPolygonMode(PolygonAttributes.POLYGON_LINE);
    blackApp.setPolygonAttributes(polygAttr);



View Full Code Here

Examples of javax.media.j3d.PolygonAttributes

            mode = PolygonAttributes.POLYGON_LINE;
        }

        // Default culls back facing polygons, which is weird.
        // We disable that here.
        _polygonAttributes = new PolygonAttributes(mode,
                PolygonAttributes.CULL_NONE, 0.0f);
        _appearance.setPolygonAttributes(_polygonAttributes);

        // Turn on antialiasing.
        LineAttributes lineAttributes = new LineAttributes(1.0f,
View Full Code Here

Examples of javax.media.j3d.PolygonAttributes

        material.setSpecularColor(specularColor);
        appearance.setMaterial(material);
    }

    public static void setCullFace(Appearance appearance, int cullFace) {
        PolygonAttributes polygonAttributes = new PolygonAttributes();
        polygonAttributes.setCullFace(cullFace);
        if (cullFace == PolygonAttributes.CULL_NONE) {
            polygonAttributes.setBackFaceNormalFlip(true);
        }
        appearance.setPolygonAttributes(polygonAttributes);
    }
View Full Code Here

Examples of javax.media.j3d.PolygonAttributes

    final LineAttributes lineAttr = new LineAttributes();
    lineAttr.setLineAntialiasingEnable(true);
    appear.setLineAttributes(lineAttr);

    final PolygonAttributes polyAttr = new PolygonAttributes();
    polyAttr.setPolygonMode(PolygonAttributes.POLYGON_FILL);
    appear.setPolygonAttributes(polyAttr);

    final Color3f orange = new Color3f(1f, 0.5f, 0f);

    final ColoringAttributes colorAttr = new ColoringAttributes();
    colorAttr.setColor(orange);
    colorAttr.setShadeModel(ColoringAttributes.NICEST);
    appear.setColoringAttributes(colorAttr);

    final Material material = new Material();
    material.setAmbientColor(orange);
    material.setDiffuseColor(orange);
    material.setSpecularColor(orange);
    material.setEmissiveColor(orange);
    appear.setMaterial(material);

    final Box box = new Box();
    box.setAppearance(appear);

    final Appearance appear2 = new Appearance();

    final PointAttributes pointAttr2 = new PointAttributes();
    pointAttr2.setPointAntialiasingEnable(true);
    appear2.setPointAttributes(pointAttr2);

    final LineAttributes lineAttr2 = new LineAttributes();
    lineAttr2.setLineAntialiasingEnable(true);
    appear2.setLineAttributes(lineAttr2);

    final PolygonAttributes polyAttr2 = new PolygonAttributes();
    polyAttr2.setPolygonMode(PolygonAttributes.POLYGON_LINE);
    appear2.setPolygonAttributes(polyAttr2);

    final ColoringAttributes colorAttr2 = new ColoringAttributes();
    colorAttr2.setColor(new Color3f(1f, 0.5f, 0f));
    colorAttr2.setShadeModel(ColoringAttributes.NICEST);
View Full Code Here

Examples of javax.media.j3d.PolygonAttributes

    appearR.setRenderingAttributes(appear.getRenderingAttributes());
    final LineAttributes lineAttr2 = new LineAttributes();
    lineAttr2.setLineAntialiasingEnable(true);
    appearR.setLineAttributes(lineAttr2);

    final PolygonAttributes polyAttr2 = new PolygonAttributes();
    polyAttr2.setPolygonMode(PolygonAttributes.POLYGON_LINE);
    appearR.setPolygonAttributes(polyAttr2);

    this.rahmen.setAppearance(appearR);
  }
View Full Code Here

Examples of javax.media.j3d.PolygonAttributes

      strip.setTextureCoordinates(0, y * texcoords.length, texcoords);
    }
   
   
  // polygon mode
    polyAttr = new PolygonAttributes();
        polyAttr.setCullFace( PolygonAttributes.CULL_NONE );
        polyAttr.setPolygonMode(PolygonAttributes.POLYGON_LINE); //POLYGON_FILL);
   
  // textures
//        renderTextures();
View Full Code Here

Examples of javax.media.j3d.PolygonAttributes

/* 53 */     super(symbol, control);
/*    */   }
/*    */
/*    */   public void writeObject(DataOutput out) throws IOException {
/* 57 */     super.writeObject(out);
/* 58 */     PolygonAttributes polyAttr = (PolygonAttributes)this.node;
/* 59 */     out.writeBoolean(polyAttr.getBackFaceNormalFlip());
/* 60 */     out.writeInt(polyAttr.getCullFace());
/* 61 */     out.writeInt(polyAttr.getPolygonMode());
/* 62 */     out.writeFloat(polyAttr.getPolygonOffset());
/* 63 */     out.writeFloat(polyAttr.getPolygonOffsetFactor());
/*    */   }
View Full Code Here

Examples of javax.media.j3d.PolygonAttributes

/* 63 */     out.writeFloat(polyAttr.getPolygonOffsetFactor());
/*    */   }
/*    */
/*    */   public void readObject(DataInput in) throws IOException {
/* 67 */     super.readObject(in);
/* 68 */     PolygonAttributes polyAttr = (PolygonAttributes)this.node;
/* 69 */     polyAttr.setBackFaceNormalFlip(in.readBoolean());
/* 70 */     polyAttr.setCullFace(in.readInt());
/* 71 */     polyAttr.setPolygonMode(in.readInt());
/* 72 */     polyAttr.setPolygonOffset(in.readFloat());
/* 73 */     polyAttr.setPolygonOffsetFactor(in.readFloat());
/*    */   }
View Full Code Here

Examples of javax.media.j3d.PolygonAttributes

/* 72 */     polyAttr.setPolygonOffset(in.readFloat());
/* 73 */     polyAttr.setPolygonOffsetFactor(in.readFloat());
/*    */   }
/*    */
/*    */   protected SceneGraphObject createNode() {
/* 77 */     return new PolygonAttributes();
/*    */   }
View Full Code Here

Examples of javax.media.j3d.PolygonAttributes

      objTrans.addChild(mc);

  }

  public static Appearance createDefaultAppearance(){
      PolygonAttributes attr = new PolygonAttributes();
      attr.setCullFace(PolygonAttributes.CULL_NONE);
      Appearance ap = new Appearance();
      Material mat = new Material();
      mat.setLightingEnable(true);
      ap.setMaterial(mat);
      ap.setPolygonAttributes(attr);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.