public TextureAttribute (final long type) { super(type); if (!is(type)) throw new GdxRuntimeException("Invalid type specified"); textureDescription = new TextureDescriptor<Texture>(); }
public <T extends Cubemap> CubemapAttribute (final long type, final TextureDescriptor<T> textureDescription) { this(type); this.textureDescription.set(textureDescription); }
@Override public int compareTo (Attribute o) { if (type != o.type) return (int)(type - o.type); return textureDescription.compareTo(((CubemapAttribute)o).textureDescription); } }
@Override public int hashCode () { int result = super.hashCode(); result = 967 * result + textureDescription.hashCode(); return result; }
@Override public int hashCode () { int result = super.hashCode(); result = 967 * result + textureDescription.hashCode(); return result; }
public CubemapAttribute (final long type) { super(type); if (!is(type)) throw new GdxRuntimeException("Invalid type specified"); textureDescription = new TextureDescriptor<Cubemap>(); }
public <T extends Texture> TextureAttribute (final long type, final TextureDescriptor<T> textureDescription) { this(type); this.textureDescription.set(textureDescription); }
@Override public int hashCode () { int result = super.hashCode(); result = 991 * result + textureDescription.hashCode(); result = 991 * result + NumberUtils.floatToRawIntBits(offsetU); result = 991 * result + NumberUtils.floatToRawIntBits(offsetV); result = 991 * result + NumberUtils.floatToRawIntBits(scaleU); result = 991 * result + NumberUtils.floatToRawIntBits(scaleV); result = 991 * result + uvIndex; return result; }
@Override public int compareTo (Attribute o) { if (type != o.type) return (int)(type - o.type); return textureDescription.compareTo(((CubemapAttribute)o).textureDescription); } }
public TextureAttribute (final long type) { super(type); if (!is(type)) throw new GdxRuntimeException("Invalid type specified"); textureDescription = new TextureDescriptor<Texture>(); }
public <T extends Cubemap> CubemapAttribute (final long type, final TextureDescriptor<T> textureDescription) { this(type); this.textureDescription.set(textureDescription); }
@Override public int hashCode () { int result = super.hashCode(); result = 991 * result + textureDescription.hashCode(); result = 991 * result + NumberUtils.floatToRawIntBits(offsetU); result = 991 * result + NumberUtils.floatToRawIntBits(offsetV); result = 991 * result + NumberUtils.floatToRawIntBits(scaleU); result = 991 * result + NumberUtils.floatToRawIntBits(scaleV); result = 991 * result + uvIndex; return result; }
@Override public int compareTo (Attribute o) { if (type != o.type) return type < o.type ? -1 : 1; TextureAttribute other = (TextureAttribute)o; final int c = textureDescription.compareTo(other.textureDescription); if (c != 0) return c; if (uvIndex != other.uvIndex) return uvIndex - other.uvIndex; if (!MathUtils.isEqual(scaleU, other.scaleU)) return scaleU > other.scaleU ? 1 : -1; if (!MathUtils.isEqual(scaleV, other.scaleV)) return scaleV > other.scaleV ? 1 : -1; if (!MathUtils.isEqual(offsetU, other.offsetU)) return offsetU > other.offsetU ? 1 : -1; if (!MathUtils.isEqual(offsetV, other.offsetV)) return offsetV > other.offsetV ? 1 : -1; return 0; } }
public CubemapAttribute (final long type) { super(type); if (!is(type)) throw new GdxRuntimeException("Invalid type specified"); textureDescription = new TextureDescriptor<Cubemap>(); }
public TextureDescriptor (final T texture, final Texture.TextureFilter minFilter, final Texture.TextureFilter magFilter, final Texture.TextureWrap uWrap, final Texture.TextureWrap vWrap) { set(texture, minFilter, magFilter, uWrap, vWrap); }
@Override public int hashCode () { int result = super.hashCode(); result = 967 * result + textureDescription.hashCode(); return result; }
@Override public int compareTo (Attribute o) { if (type != o.type) return type < o.type ? -1 : 1; TextureAttribute other = (TextureAttribute)o; final int c = textureDescription.compareTo(other.textureDescription); if (c != 0) return c; if (uvIndex != other.uvIndex) return uvIndex - other.uvIndex; if (!MathUtils.isEqual(scaleU, other.scaleU)) return scaleU > other.scaleU ? 1 : -1; if (!MathUtils.isEqual(scaleV, other.scaleV)) return scaleV > other.scaleV ? 1 : -1; if (!MathUtils.isEqual(offsetU, other.offsetU)) return offsetU > other.offsetU ? 1 : -1; if (!MathUtils.isEqual(offsetV, other.offsetV)) return offsetV > other.offsetV ? 1 : -1; return 0; } }
/** @deprecated Experimental, likely to change, do not use! */ public DirectionalShadowLight (int shadowMapWidth, int shadowMapHeight, float shadowViewportWidth, float shadowViewportHeight, float shadowNear, float shadowFar) { fbo = new FrameBuffer(Format.RGBA8888, shadowMapWidth, shadowMapHeight, true); cam = new OrthographicCamera(shadowViewportWidth, shadowViewportHeight); cam.near = shadowNear; cam.far = shadowFar; halfHeight = shadowViewportHeight * 0.5f; halfDepth = shadowNear + 0.5f * (shadowFar - shadowNear); textureDesc = new TextureDescriptor(); textureDesc.minFilter = textureDesc.magFilter = Texture.TextureFilter.Nearest; textureDesc.uWrap = textureDesc.vWrap = Texture.TextureWrap.ClampToEdge; }
public <T extends Texture> TextureAttribute (final long type, final TextureDescriptor<T> textureDescription) { this(type); this.textureDescription.set(textureDescription); }
@Override public int hashCode () { int result = super.hashCode(); result = 991 * result + textureDescription.hashCode(); result = 991 * result + NumberUtils.floatToRawIntBits(offsetU); result = 991 * result + NumberUtils.floatToRawIntBits(offsetV); result = 991 * result + NumberUtils.floatToRawIntBits(scaleU); result = 991 * result + NumberUtils.floatToRawIntBits(scaleV); result = 991 * result + uvIndex; return result; }