Package engine.base

Examples of engine.base.Vector4


    float mx = (u * rx) - x;
    float my = (v * ry) - y;
    x = x%rx;
    y = y%ry;
   
    Vector4 c0 = Utils.RGBAToVector4(img.getRGB(x, y));
    Vector4 c1 = Utils.RGBAToVector4(img.getRGB((x+1)%rx, y));
    Vector4 c2 = Utils.RGBAToVector4(img.getRGB(x, (y+1)%ry));
    Vector4 c3 = Utils.RGBAToVector4(img.getRGB((x+1)%rx, (y+1)%ry));
   
    c0.linearInterp_ip(mx, c1);
    c2.linearInterp_ip(mx, c3);
    c0.linearInterp_ip(my, c2);
   
View Full Code Here


 
 
  protected Vector4 _valueRGBA(float u, float v) {
    BufferedImage img = image.getImage();
    if (img == null) {
      return new Vector4(0, 0, 0, 0);
    } else {
      if (interpolation.getEnumPos() == 0) return sampleColorNearest(img, u, v);
      else return sampleColorLinear(img, u, v);
    }
  }
View Full Code Here

  public PatternConstantColor(float r, float g, float b) {
    color = CreateLocalColorParam("Color", r, g, b);
  }

  protected Vector4 _valueRGBA(float u, float v) {
    return new Vector4(color.get(), 1.0f);
  }
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.