/** * Set the threshold for all the textures that were loaded by this * AppearanceCreator. Pixel values below the threshold are not rendered. * * @param f */ public void setThreshold(final float f) { rendAttr.setAlphaTestValue(f); }
public void setThreshold(final float f) { rendAttr.setAlphaTestValue(f); }
@Override public void readObject( DataInput in ) throws IOException { super.readObject( in ); RenderingAttributes attr = (RenderingAttributes)node; attr.setAlphaTestFunction( in.readInt() ); attr.setAlphaTestValue( in.readFloat() ); attr.setDepthBufferEnable( in.readBoolean() ); attr.setDepthBufferWriteEnable( in.readBoolean() ); attr.setIgnoreVertexColors( in.readBoolean() ); attr.setRasterOp( in.readInt() ); attr.setRasterOpEnable( in.readBoolean() ); attr.setVisible( in.readBoolean() ); }
final RenderingAttributes renderingAtts = new RenderingAttributes(); renderingAtts.setAlphaTestFunction( RenderingAttributes.GREATER_OR_EQUAL ); renderingAtts.setAlphaTestValue( 0.3f ); appearance.setRenderingAttributes( renderingAtts );
final RenderingAttributes renderingAtts = new RenderingAttributes(); renderingAtts.setAlphaTestFunction( RenderingAttributes.GREATER_OR_EQUAL ); renderingAtts.setAlphaTestValue( 0.3f ); appearance.setRenderingAttributes( renderingAtts );
rendAttr.setDepthTestFunction(RenderingAttributes.ALWAYS); rendAttr.setCapability(RenderingAttributes.ALLOW_ALPHA_TEST_VALUE_WRITE); rendAttr.setAlphaTestValue(0f); rendAttr.setAlphaTestFunction(RenderingAttributes.GREATER);
rendAttr.setAlphaTestValue(0.1f); rendAttr.setAlphaTestFunction(RenderingAttributes.GREATER);
rendAttr.setCapability( RenderingAttributes.ALLOW_ALPHA_TEST_VALUE_WRITE); rendAttr.setAlphaTestValue(0.1f); rendAttr.setAlphaTestFunction(RenderingAttributes.GREATER); appearance.setRenderingAttributes(rendAttr);
rendAttr.setCapability( RenderingAttributes.ALLOW_ALPHA_TEST_VALUE_WRITE); rendAttr.setAlphaTestValue(0.1f); rendAttr.setAlphaTestFunction(RenderingAttributes.GREATER); appearance.setRenderingAttributes(rendAttr);