PolygonAttributes la=new PolygonAttributes(); la.setPolygonMode(PolygonAttributes.POLYGON_FILL); la.setCullFace(PolygonAttributes.CULL_NONE); app.setPolygonAttributes(la); Material matt=new Material();
PolygonAttributes pa=new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); pa.setCullFace(PolygonAttributes.CULL_NONE); Material mat=new Material(); mat.setEmissiveColor(new Color3f(0.5f,0.5f,0.5f));
PolygonAttributes pa=new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); pa.setCullFace(PolygonAttributes.CULL_NONE); Material mat=new Material(); mat.setEmissiveColor(new Color3f(0.5f,0.5f,0.5f));
@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() ); }
// 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);
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; }
polyAttrib.setCapability(PolygonAttributes.ALLOW_MODE_WRITE); polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true); app.setPolygonAttributes(polyAttrib);
polyAttr.setCullFace(PolygonAttributes.CULL_NONE);
pa.setCullFace(PolygonAttributes.CULL_NONE); pa.setBackFaceNormalFlip(true); textAppear.setPolygonAttributes(pa);
polyAttr.setCullFace(PolygonAttributes.CULL_NONE);
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);
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; }
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);
pa = new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_LINE); pa.setCullFace(PolygonAttributes.CULL_NONE); appearance.setPolygonAttributes(pa); ta = new TransparencyAttributes();
PolygonAttributes pattr = new PolygonAttributes(); pattr.setPolygonMode(PolygonAttributes.POLYGON_LINE); pattr.setCullFace(PolygonAttributes.CULL_NONE); pattr.setBackFaceNormalFlip(true); app.setPolygonAttributes(pattr);
polyAttrib.setCapability(PolygonAttributes.ALLOW_MODE_WRITE); polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); polyAttrib.setCullFace(PolygonAttributes.CULL_BACK); polyAttrib.setBackFaceNormalFlip(false); appearance.setPolygonAttributes(polyAttrib);
polyAttr.setCullFace(PolygonAttributes.CULL_NONE); appearance.setPolygonAttributes(polyAttr);
polyAttr.setCullFace(PolygonAttributes.CULL_NONE); appearance.setPolygonAttributes(polyAttr);
polyAttrib.setCapability(PolygonAttributes.ALLOW_MODE_WRITE); polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true); appearance.setPolygonAttributes(polyAttrib);