@Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); PolygonAttributes polyAttr = (PolygonAttributes)node; polyAttr.setBackFaceNormalFlip( in.readBoolean() ); polyAttr.setCullFace( in.readInt() ); polyAttr.setPolygonMode( in.readInt() ); polyAttr.setPolygonOffset( in.readFloat() ); polyAttr.setPolygonOffsetFactor( in.readFloat() ); }
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; }
pa.setBackFaceNormalFlip(true); mesh.setColor(c3); pa.setBackFaceNormalFlip(true); extra.setColor(extra_triangle_colors);
polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true); app.setPolygonAttributes(polyAttrib);
pa.setBackFaceNormalFlip(true); textAppear.setPolygonAttributes(pa);
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; }
else polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_LINE); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true); appearance.setPolygonAttributes(polyAttrib);
else polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_LINE); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true); appearance.setPolygonAttributes(polyAttrib);
pattr.setPolygonMode(PolygonAttributes.POLYGON_LINE); pattr.setCullFace(PolygonAttributes.CULL_NONE); pattr.setBackFaceNormalFlip(true); app.setPolygonAttributes(pattr); BranchGroup bg = new BranchGroup();
polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); polyAttrib.setCullFace(PolygonAttributes.CULL_BACK); polyAttrib.setBackFaceNormalFlip(false); appearance.setPolygonAttributes(polyAttrib);
polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true); appearance.setPolygonAttributes(polyAttrib);