/** * Constructor * * @param occluder * @param target * @param func * @param isParallel * @param borderWhite */ public ProjectedDepthTexture( Spatial occluder, Spatial target, DepthTextureCompareFunc func, boolean isParallel, boolean borderWhite) { this.occluder = occluder; this.target = target; this.func = func; this.isParallel = isParallel; this.borderWhite = borderWhite; offsetState = new OffsetState(); offsetState.setEnabled(true); offsetState.setTypeEnabled(OffsetType.Fill, true); offsetState.setFactor(DEFAULT_POLYGON_OFFSET_FACTOR); offsetState.setUnits(DEFAULT_POLYGON_OFFSET_UNITS); }
/** * Set the polygon offset units value * * @param units */ public void setPolygonOffsetUnits(float units) { offsetState.setUnits(units); }
/** * Get the polygon offset units value * * @return */ public float getPolygonOffsetUnits() { return (offsetState.getUnits()); }
/** * Set the polygon offset factor value * * @param factor */ public void setPolygonOffsetFactor(float factor) { offsetState.setFactor(factor); }
/** * Get the polygon offset factor value * * @return */ public float getPolygonOffsetFactor() { return (offsetState.getFactor()); }