Package javax.media.j3d

Examples of javax.media.j3d.LineAttributes


        _polygonAttributes = new PolygonAttributes(mode,
                PolygonAttributes.CULL_NONE, 0.0f);
        _appearance.setPolygonAttributes(_polygonAttributes);

        // Turn on antialiasing.
        LineAttributes lineAttributes = new LineAttributes(1.0f,
                LineAttributes.PATTERN_SOLID, true);
        _appearance.setLineAttributes(lineAttributes);

        // If runtime changes are allowed, we need to set the
        // appropriate capabilities.
View Full Code Here


    final Appearance appear = this.primitive.getAppearance();
    final Appearance appearR = new Appearance();
    appearR.setMaterial(appear.getMaterial());
    appearR.setColoringAttributes(appear.getColoringAttributes());
    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);
View Full Code Here

    final PointAttributes pointAttr = new PointAttributes();
    pointAttr.setPointAntialiasingEnable(true);
    appear.setPointAttributes(pointAttr);

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

/* 53 */     super(symbol, control);
/*    */   }
/*    */
/*    */   public void writeObject(DataOutput out) throws IOException {
/* 57 */     super.writeObject(out);
/* 58 */     LineAttributes attr = (LineAttributes)this.node;
/* 59 */     out.writeBoolean(attr.getLineAntialiasingEnable());
/* 60 */     out.writeInt(attr.getLinePattern());
/* 61 */     out.writeFloat(attr.getLineWidth());
/* 62 */     out.writeInt(attr.getPatternMask());
/* 63 */     out.writeInt(attr.getPatternScaleFactor());
/*    */   }
View Full Code Here

/* 63 */     out.writeInt(attr.getPatternScaleFactor());
/*    */   }
/*    */
/*    */   public void readObject(DataInput in) throws IOException {
/* 67 */     super.readObject(in);
/* 68 */     LineAttributes attr = (LineAttributes)this.node;
/* 69 */     attr.setLineAntialiasingEnable(in.readBoolean());
/* 70 */     attr.setLinePattern(in.readInt());
/* 71 */     attr.setLineWidth(in.readFloat());
/* 72 */     attr.setPatternMask(in.readInt());
/* 73 */     attr.setPatternScaleFactor(in.readInt());
/*    */   }
View Full Code Here

/* 72 */     attr.setPatternMask(in.readInt());
/* 73 */     attr.setPatternScaleFactor(in.readInt());
/*    */   }
/*    */
/*    */   protected SceneGraphObject createNode() {
/* 77 */     return new LineAttributes();
/*    */   }
View Full Code Here

TOP

Related Classes of javax.media.j3d.LineAttributes

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.