Пример #1
0
  /**
   * 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);
  }
Пример #2
0
 /**
  * Set the polygon offset factor value
  *
  * @param factor
  */
 public void setPolygonOffsetFactor(float factor) {
   offsetState.setFactor(factor);
 }