Package icyllis.arc3d.core

# 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).

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static @interface`
  `SamplingOptions.FilterMode`
  The `FilterMode` specifies the sampling method on transformed texture images.
  `static @interface`
  `SamplingOptions.MipmapMode`
  The `MipmapMode` specifies the interpolation method for MIP image levels when down-sampling texture images.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final SamplingOptions`
  `CATMULLROM`
  Use bicubic sampling, the Catmull-Rom spline with B=0, C=0.5.
  `static final SamplingOptions`
  `CUBIC_BSPLINE`
  Use bicubic sampling, the cubic B-spline with B=1, C=0.
  `static final int`
  `FILTER_MODE_LINEAR`
  Interpolate between 2x2 sample points (bilinear interpolation).
  `static final int`
  `FILTER_MODE_NEAREST`
  Single sample point (nearest neighbor).
  `static final SamplingOptions`
  `LINEAR`
  Use linear interpolation for minification, magnification; no mipmapping.
  `final float`
  `mCubicB`
  `final float`
  `mCubicC`
  `static final SamplingOptions`
  `MIN_LINEAR_MAG_MIP_POINT`
  `static final SamplingOptions`
  `MIN_LINEAR_MAG_POINT`
  `static final SamplingOptions`
  `MIN_LINEAR_MAG_POINT_MIP_LINEAR`
  `static final SamplingOptions`
  `MIN_MAG_LINEAR_MIP_POINT`
  `static final SamplingOptions`
  `MIN_MAG_MIP_LINEAR`
  Use linear interpolation for minification, magnification, and mip-level sampling.
  `static final SamplingOptions`
  `MIN_MAG_MIP_POINT`
  Use nearest-neighbour sampling for minification, magnification, and mip-level sampling.
  `static final SamplingOptions`
  `MIN_MAG_POINT_MIP_LINEAR`
  `static final SamplingOptions`
  `MIN_POINT_MAG_LINEAR`
  `static final SamplingOptions`
  `MIN_POINT_MAG_LINEAR_MIP_POINT`
  `static final SamplingOptions`
  `MIN_POINT_MAG_MIP_LINEAR`
  `static final int`
  `MIPMAP_MODE_LINEAR`
  Interpolate between the two nearest levels.
  `static final int`
  `MIPMAP_MODE_NEAREST`
  Sample from the nearest level.
  `static final int`
  `MIPMAP_MODE_NONE`
  Ignore mipmap levels, sample from the "base".
  `static final SamplingOptions`
  `MITCHELL`
  Use bicubic sampling, the Mitchell–Netravali filter with B=1/3, C=1/3.
  `final byte`
  `mMagFilter`
  `final int`
  `mMaxAnisotropy`
  `final byte`
  `mMinFilter`
  `final byte`
  `mMipmapMode`
  `final boolean`
  `mUseCubic`
  `static final SamplingOptions`
  `PHOTOSHOP_BICUBIC`
  Use bicubic sampling, the Photoshop bicubic filter with B=0, C=0.75.
  `static final SamplingOptions`
  `POINT`
  Use nearest-neighbour sampling for minification, magnification; no mipmapping.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `int`
  `hashCode()`
  `boolean`
  `isAnisotropy()`
  `static SamplingOptions`
  `make(int filter)`
  `static SamplingOptions`
  `make(int filter, int mipmap)`
  `static SamplingOptions`
  `make(int minFilter, int magFilter, int mipmapMode)`
  `static SamplingOptions`
  `makeAnisotropy(int maxAnisotropy)`
  `static SamplingOptions`
  `makeCubic(float B, float C)`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### FILTER_MODE_NEAREST

    public static final int FILTER_MODE_NEAREST
    Single sample point (nearest neighbor).
    See Also:
      - Constant Field Values

  - ### FILTER_MODE_LINEAR

    public static final int FILTER_MODE_LINEAR
    Interpolate between 2x2 sample points (bilinear interpolation).
    See Also:
      - Constant Field Values

  - ### MIPMAP_MODE_NONE

    public static final int MIPMAP_MODE_NONE
    Ignore mipmap levels, sample from the "base".
    See Also:
      - Constant Field Values

  - ### MIPMAP_MODE_NEAREST

    public static final int MIPMAP_MODE_NEAREST
    Sample from the nearest level.
    See Also:
      - Constant Field Values

  - ### MIPMAP_MODE_LINEAR

    public static final int MIPMAP_MODE_LINEAR
    Interpolate between the two nearest levels.
    See Also:
      - Constant Field Values

  - ### 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`