app.setPointAttributes(a_point_just_bigger); PolygonAttributes la=new PolygonAttributes(); la.setPolygonMode(PolygonAttributes.POLYGON_FILL); la.setCullFace(PolygonAttributes.CULL_NONE); app.setPolygonAttributes(la);
Shape3D sh=new Shape3D(); PolygonAttributes pa=new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); pa.setCullFace(PolygonAttributes.CULL_NONE); Material mat=new Material();
Shape3D sh=new Shape3D(); PolygonAttributes pa=new PolygonAttributes(); pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); pa.setCullFace(PolygonAttributes.CULL_NONE); Material mat=new Material();
/** * Shade the surface or not. * * @param b */ public void setShaded(final boolean b) { final PolygonAttributes pa = appearance.getPolygonAttributes(); if (b) pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); else pa.setPolygonMode(PolygonAttributes.POLYGON_LINE); }
public void setShaded(final boolean b) { this.shaded = b; final PolygonAttributes pa = getAppearance().getPolygonAttributes(); if (b) pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); else pa.setPolygonMode(PolygonAttributes.POLYGON_LINE); }
@Override public void setShaded(final boolean b) { this.shaded = b; final PolygonAttributes pa = getAppearance().getPolygonAttributes(); if (b) pa.setPolygonMode(PolygonAttributes.POLYGON_FILL); else pa.setPolygonMode(PolygonAttributes.POLYGON_LINE); }
@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() ); }
polyAttr.setPolygonMode(PolygonAttributes.POLYGON_LINE); polyAttr.setCullFace(PolygonAttributes.CULL_NONE);
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; }
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);
if (this.shaded) polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); else polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_LINE); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true);
polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true);
app.setColoringAttributes(cattr); PolygonAttributes pattr = new PolygonAttributes(); pattr.setPolygonMode(PolygonAttributes.POLYGON_LINE); pattr.setCullFace(PolygonAttributes.CULL_NONE); pattr.setBackFaceNormalFlip(true);
pa.setPolygonMode(PolygonAttributes.POLYGON_LINE); pa.setCullFace(PolygonAttributes.CULL_NONE); appearance.setPolygonAttributes(pa);
polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); polyAttrib.setCullFace(PolygonAttributes.CULL_BACK); polyAttrib.setBackFaceNormalFlip(false);
polyAttrib.setPolygonMode(PolygonAttributes.POLYGON_FILL); polyAttrib.setCullFace(PolygonAttributes.CULL_NONE); polyAttrib.setBackFaceNormalFlip(true);