Class SamplingOptions

java.lang.Object
icyllis.arc3d.core.SamplingOptions

@Immutable public final class SamplingOptions extends Object
Immutable struct describing image sampling options (resampling or interpolation method).
  • Field Details

    • FILTER_MODE_NEAREST

      public static final int FILTER_MODE_NEAREST
      Single sample point (nearest neighbor).
      See Also:
    • FILTER_MODE_LINEAR

      public static final int FILTER_MODE_LINEAR
      Interpolate between 2x2 sample points (bilinear interpolation).
      See Also:
    • MIPMAP_MODE_NONE

      public static final int MIPMAP_MODE_NONE
      Ignore mipmap levels, sample from the "base".
      See Also:
    • MIPMAP_MODE_NEAREST

      public static final int MIPMAP_MODE_NEAREST
      Sample from the nearest level.
      See Also:
    • MIPMAP_MODE_LINEAR

      public static final int MIPMAP_MODE_LINEAR
      Interpolate between the two nearest levels.
      See Also:
    • POINT

      public static final SamplingOptions POINT
      Use nearest-neighbour sampling for minification, magnification; no mipmapping. Also known as point sampling.
    • LINEAR

      public static final SamplingOptions LINEAR
      Use linear interpolation for minification, magnification; no mipmapping. Also known as triangle sampling and bilinear sampling.
    • MIN_MAG_MIP_POINT

      public static final SamplingOptions MIN_MAG_MIP_POINT
      Use nearest-neighbour sampling for minification, magnification, and mip-level sampling.
    • MIN_MAG_POINT_MIP_LINEAR

      public static final SamplingOptions MIN_MAG_POINT_MIP_LINEAR
    • MIN_MAG_LINEAR_MIP_POINT

      public static final SamplingOptions MIN_MAG_LINEAR_MIP_POINT
    • MIN_MAG_MIP_LINEAR

      public static final SamplingOptions MIN_MAG_MIP_LINEAR
      Use linear interpolation for minification, magnification, and mip-level sampling.
    • MIN_POINT_MAG_LINEAR

      public static final SamplingOptions MIN_POINT_MAG_LINEAR
    • MIN_LINEAR_MAG_POINT

      public static final SamplingOptions MIN_LINEAR_MAG_POINT
    • MIN_POINT_MAG_LINEAR_MIP_POINT

      public static final SamplingOptions MIN_POINT_MAG_LINEAR_MIP_POINT
    • MIN_LINEAR_MAG_MIP_POINT

      public static final SamplingOptions MIN_LINEAR_MAG_MIP_POINT
    • MIN_POINT_MAG_MIP_LINEAR

      public static final SamplingOptions MIN_POINT_MAG_MIP_LINEAR
    • MIN_LINEAR_MAG_POINT_MIP_LINEAR

      public static final SamplingOptions MIN_LINEAR_MAG_POINT_MIP_LINEAR
    • CUBIC_BSPLINE

      public static final SamplingOptions CUBIC_BSPLINE
      Use bicubic sampling, the cubic B-spline with B=1, C=0.
    • MITCHELL

      public static final SamplingOptions MITCHELL
      Use bicubic sampling, the Mitchell–Netravali filter with B=1/3, C=1/3.
    • PHOTOSHOP_BICUBIC

      public static final SamplingOptions PHOTOSHOP_BICUBIC
      Use bicubic sampling, the Photoshop bicubic filter with B=0, C=0.75.
    • CATMULLROM

      public static final SamplingOptions CATMULLROM
      Use bicubic sampling, the Catmull-Rom spline with B=0, C=0.5.
    • mMinFilter

      public final byte mMinFilter
    • mMagFilter

      public final byte mMagFilter
    • mMipmapMode

      public final byte mMipmapMode
    • mUseCubic

      public final boolean mUseCubic
    • mCubicB

      public final float mCubicB
    • mCubicC

      public final float mCubicC
    • mMaxAnisotropy

      public final int mMaxAnisotropy
  • Method Details

    • make

      public static SamplingOptions make(int filter)
    • make

      public static SamplingOptions make(int filter, int mipmap)
    • make

      public static SamplingOptions make(int minFilter, int magFilter, int mipmapMode)
    • makeCubic

      public static SamplingOptions makeCubic(float B, float C)
    • makeAnisotropy

      public static SamplingOptions makeAnisotropy(int maxAnisotropy)
      Parameters:
      maxAnisotropy - the max anisotropy filtering level
    • isAnisotropy

      public boolean isAnisotropy()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object