Esempio n. 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);
  }
Esempio n. 2
0
 /**
  * Set the polygon offset units value
  *
  * @param units
  */
 public void setPolygonOffsetUnits(float units) {
   offsetState.setUnits(units);
 }
Esempio n. 3
0
 /**
  * Get the polygon offset units value
  *
  * @return
  */
 public float getPolygonOffsetUnits() {
   return (offsetState.getUnits());
 }
Esempio n. 4
0
 /**
  * Set the polygon offset factor value
  *
  * @param factor
  */
 public void setPolygonOffsetFactor(float factor) {
   offsetState.setFactor(factor);
 }
Esempio n. 5
0
 /**
  * Get the polygon offset factor value
  *
  * @return
  */
 public float getPolygonOffsetFactor() {
   return (offsetState.getFactor());
 }