a_point_just_bigger.setPointAntialiasingEnable(true);//now points are sphere-like(not a cube) app.setPointAttributes(a_point_just_bigger); PolygonAttributes la=new PolygonAttributes(); la.setPolygonMode(PolygonAttributes.POLYGON_FILL); la.setCullFace(PolygonAttributes.CULL_NONE);
lsa.setCoordinates(0, pts); Shape3D sh=new Shape3D(); PolygonAttributes pa=new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); pa.setCullFace(PolygonAttributes.CULL_NONE);
normals[20].y=1;normals[21].y=1;normals[22].y=1;normals[23].y=1; Shape3D sh=new Shape3D(); PolygonAttributes pa=new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); pa.setCullFace(PolygonAttributes.CULL_NONE);
@Override protected org.scijava.java3d.SceneGraphObject createNode() { return new PolygonAttributes(); }
/** * @deprecated replaced with cloneNodeComponent(boolean forceDuplicate) */ @Override public NodeComponent cloneNodeComponent() { PolygonAttributes pga = new PolygonAttributes(); pga.duplicateNodeComponent(this); return pga; }
// Because we're about to spin this triangle, be sure to draw // backfaces. If we don't, the back side of the triangle is invisible. Appearance ap = new Appearance(); PolygonAttributes pa = new PolygonAttributes(); pa.setCullFace(PolygonAttributes.CULL_NONE); ap.setPolygonAttributes(pa); shape.setAppearance(ap);
BranchGroup group = new BranchGroup(); //Content branch. PolygonAttributes p = new PolygonAttributes(); //Not sure how to make it transparent/try code above. Appearance planeAppearance = new Appearance(); planeAppearance.setPolygonAttributes (p); Color3f planeColor = new Color3f (1.0f, 1.0f, 1.0f); //This makes it white. ColoringAttributes planeCA = new ColoringAttributes (planeColor, 1); planeAppearance.setColoringAttributes(planeCA); QuadArray plane = new QuadArray (4, QuadArray.COORDINATES); //This makes the plane. plane.setCoordinate(0, new Point3f(-5f, -5f, -15f)); //You specify your own cornerpoints... plane.setCoordinate(1, new Point3f(5f, -5f, -15f)); plane.setCoordinate(2, new Point3f(5f, 5f, -15f)); plane.setCoordinate(3, new Point3f(-5f, 5f, -15f)); group.addChild(new Shape3D(plane, planeAppearance)); //Add plane to content branch.
private Appearance createAppearance(final Color3f color) { final Appearance a = new Appearance(); final PolygonAttributes pa = new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); pa.setCullFace(PolygonAttributes.CULL_NONE); a.setPolygonAttributes(pa); final ColoringAttributes ca = new ColoringAttributes(); ca.setColor(color); a.setColoringAttributes(ca); return a; }
public Appearance createTextAppearance() { final Appearance textAppear = new Appearance(); final ColoringAttributes textColor = new ColoringAttributes(); textColor.setColor(color); textAppear.setColoringAttributes(textColor); final PolygonAttributes pa = new PolygonAttributes(); pa.setCullFace(PolygonAttributes.CULL_NONE); pa.setBackFaceNormalFlip(true); textAppear.setPolygonAttributes(pa); return textAppear; }
app.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ); final PolygonAttributes polyAttrib = new PolygonAttributes(); polyAttrib.setCapability(PolygonAttributes.ALLOW_MODE_WRITE); polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL);
transAttr.setTransparency(transparency); polyAttr = new PolygonAttributes(); polyAttr.setCullFace(PolygonAttributes.CULL_NONE);
textAppear.setColoringAttributes(textColor); final PolygonAttributes pa = new PolygonAttributes(); pa.setCullFace(PolygonAttributes.CULL_NONE); pa.setBackFaceNormalFlip(true);
appearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ); final PolygonAttributes polyAttrib = new PolygonAttributes(); polyAttrib.setCapability(PolygonAttributes.ALLOW_MODE_WRITE); if (this.shaded) polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL);
protected Appearance createAppearance() { final Appearance appearance = new Appearance(); appearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ); final PolygonAttributes polyAttrib = new PolygonAttributes(); polyAttrib.setCapability(PolygonAttributes.ALLOW_MODE_WRITE); if (this.shaded) polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); else polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_LINE); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true); appearance.setPolygonAttributes(polyAttrib); final ColoringAttributes colorAttrib = new ColoringAttributes(); colorAttrib.setShadeModel(ColoringAttributes.SHADE_GOURAUD); if (null != color) // is null when colors are vertex-wise colorAttrib.setColor(color); appearance.setColoringAttributes(colorAttrib); final TransparencyAttributes tr = new TransparencyAttributes(); final int mode = TransparencyAttributes.FASTEST; tr.setCapability(TransparencyAttributes.ALLOW_VALUE_WRITE); tr.setCapability(TransparencyAttributes.ALLOW_MODE_WRITE); tr.setTransparencyMode(mode); tr.setTransparency(transparency); appearance.setTransparencyAttributes(tr); final Material material = new Material(); material.setCapability(Material.ALLOW_COMPONENT_WRITE); material.setAmbientColor(0.1f, 0.1f, 0.1f); material.setSpecularColor(0.1f, 0.1f, 0.1f); material.setDiffuseColor(0.1f, 0.1f, 0.1f); appearance.setMaterial(material); return appearance; }
appearance.setCapability(Appearance.ALLOW_TRANSPARENCY_ATTRIBUTES_READ); final PolygonAttributes polyAttrib = new PolygonAttributes(); polyAttrib.setCapability(PolygonAttributes.ALLOW_MODE_WRITE); if (this.shaded) polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL);
cattr.setColor(RED); app.setColoringAttributes(cattr); PolygonAttributes pattr = new PolygonAttributes(); pattr.setPolygonMode(PolygonAttributes.POLYGON_LINE); pattr.setCullFace(PolygonAttributes.CULL_NONE);
pa = new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_LINE); pa.setCullFace(PolygonAttributes.CULL_NONE);
appearance.setPointAttributes(pointAttrib); final PolygonAttributes polyAttrib = new PolygonAttributes(); polyAttrib.setCapability(PolygonAttributes.ALLOW_MODE_WRITE); polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL);
appearance.setTransparencyAttributes(transAttr); PolygonAttributes polyAttr = new PolygonAttributes(); polyAttr.setCullFace(PolygonAttributes.CULL_NONE); appearance.setPolygonAttributes(polyAttr);
appearance.setTransparencyAttributes(transAttr); PolygonAttributes polyAttr = new PolygonAttributes(); polyAttr.setCullFace(PolygonAttributes.CULL_NONE); appearance.setPolygonAttributes(polyAttr);