Package engine.base

Examples of engine.base.Vector4


    _function(out, caches[0].sample(localX, localY));
  }
 
 
  protected float _value1f(float u, float v) {
    Vector4 val = valueRGBA(u, v);
    return (val.x+val.y+val.z)*(1.0f/3.0f);
  }
 
View Full Code Here


    Vector4 val = valueRGBA(u, v);
    return (val.x+val.y+val.z)*(1.0f/3.0f);
  }
 
  protected Vector4 _valueRGBA(float u, float v) {
    Vector4 ret = new Vector4();
    _function(ret, inputChannels[0].valueRGBA(u, v));
    return ret;
  }
View Full Code Here

      this.py = py;
    }

    public Vector4 sample(int x, int y) {
      int i = ((x + border) + (y + border) * (xres + 2*border)) * 4;
      return new Vector4(data.get(i + 0), data.get(i + 1), data.get(i + 2), data.get(i + 3));
    }
View Full Code Here

      while (x >= xres)
        x -= xres;
      while (y >= yres)
        y -= xres;
      int i = (x + border + (y +border) * (xres+2*border)) * 4;
      return new Vector4(data.get(i + 0), data.get(i + 1), data.get(i + 2), data.get(i + 3));
    }
View Full Code Here

          for (int x = px * xres - border, localX = border; x < (px + 1) * xres + border; x++, idx++, localX++) {
            float u = (float) x / (float) globalXres;
            float v = (float) y / (float) globalYres;
            u = u - FMath.ffloor(u);
            v = v - FMath.ffloor(v);
            Vector4 temp = new Vector4();
            c.cache_function(temp, tiles, localX, localY, u, v);
            put(idx, temp);
          }
        }
      }
View Full Code Here

  }
 
  @Override
  public Vector4 valueRGBA(float u, float v) {
    Vector3 p = transform(u, v);
    Vector4 val = _valueRGBA(p.x, p.y);
    return val;
  }
View Full Code Here

    out.set(_function(caches[0].sample(localX, localY)));
  }
 
 
  protected float _value1f(float u, float v) {
    Vector4 val = valueRGBA(u, v);
    return (val.x+val.y+val.z)*(1.0f/3.0f);
  }
 
View Full Code Here

        return I;
    }
  }

  private final Vector4 _function(Vector4 in0, float u, float v) {
    Vector4 c = new Vector4(in0);
    if (onR.get()) c.x = apply(c.x);
    if (onG.get()) c.y = apply(c.y);
    if (onB.get()) c.z = apply(c.z);
    if (onA.get()) c.w = apply(c.w);
    return c;
View Full Code Here

    out.set(_function(caches[0].sample(localX, localY), u, v));
  }


  protected Vector4 _valueRGBA(float u, float v) {
    Vector4 c0 = inputChannels[0].valueRGBA(u, v);
    return _function(c0, u, v);
 
View Full Code Here

    else System.err.println("Invalid channel access in " + this);
    return OutputType.SCALAR;
  }
 
  private final Vector4 _function(Vector4 in0, float du, float dv) {
    Vector4 c = new Vector4(in0);
    Vector3 n = new Vector3(du*strength.get(), dv*strength.get(), 0.0f);
   
    float a = FMath.deg2rad(angle.get());
    Vector3 dir = new Vector3(FMath.cos(a),FMath.sin(a),0);
    float addValue = n.dot(dir);
View Full Code Here

TOP

Related Classes of engine.base.Vector4

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.