Class MDLTexture

All Implemented Interfaces:
NSObjectProtocol, MDLNamed, ObjCProtocol
Direct Known Subclasses:
MDLCheckerboardTexture, MDLColorSwatchTexture, MDLNoiseTexture, MDLNormalMapTexture, MDLSkyCubeTexture, MDLURLTexture

public class MDLTexture
extends NSObject
implements MDLNamed
Since:
Available in iOS 9.0 and later.
  • Constructor Details

    • MDLTexture

      public MDLTexture()
    • MDLTexture

      protected MDLTexture​(NSObject.Handle h, long handle)
    • MDLTexture

      protected MDLTexture​(NSObject.SkipInit skipInit)
    • MDLTexture

      public MDLTexture​(NSData pixelData, boolean topLeftOrigin, String name, VectorInt2 dimensions, long rowStride, long channelCount, MDLTextureChannelEncoding channelEncoding, boolean isCube)
    • MDLTexture

      public MDLTexture​(String name)
    • MDLTexture

      public MDLTexture​(String name, NSBundle bundleOrNil)
    • MDLTexture

      public MDLTexture​(String name, MDLAssetResolver resolver)
      Since:
      Available in iOS 12.0 and later.
  • Method Details

    • getDimensions

      public VectorInt2 getDimensions()
    • getRowStride

      public long getRowStride()
    • getChannelCount

      public long getChannelCount()
    • getMipLevelCount

      public long getMipLevelCount()
    • getChannelEncoding

      public MDLTextureChannelEncoding getChannelEncoding()
    • isCube

      public boolean isCube()
    • setIsCube

      public void setIsCube​(boolean v)
    • hasAlphaValues

      public boolean hasAlphaValues()
    • setHasAlphaValues

      public void setHasAlphaValues​(boolean v)
    • getName

      public String getName()
      Specified by:
      getName in interface MDLNamed
    • setName

      public void setName​(String v)
      Specified by:
      setName in interface MDLNamed
    • init

      protected long init​(NSData pixelData, boolean topLeftOrigin, String name, VectorInt2 dimensions, long rowStride, long channelCount, MDLTextureChannelEncoding channelEncoding, boolean isCube)
    • write

      public boolean write​(NSURL URL)
    • write

      public boolean write​(NSURL URL, long level)
      Since:
      Available in iOS 11.0 and later.
    • write

      public boolean write​(NSURL nsurl, String type)
    • write

      public boolean write​(NSURL nsurl, String type, long level)
      Since:
      Available in iOS 11.0 and later.
    • getImage

      public CGImage getImage()
    • imageFromTextureAtLevel

      public CGImage imageFromTextureAtLevel​(long level)
      Since:
      Available in iOS 11.0 and later.
    • getTexelDataWithTopLeftOrigin

      public NSData getTexelDataWithTopLeftOrigin()
    • getTexelDataWithBottomLeftOrigin

      public NSData getTexelDataWithBottomLeftOrigin()
    • getTexelDataWithTopLeftOrigin

      public NSData getTexelDataWithTopLeftOrigin​(long level, boolean create)
    • getTexelDataWithBottomLeftOrigin

      public NSData getTexelDataWithBottomLeftOrigin​(long level, boolean create)
    • create

      protected static long create​(String name)
    • create

      protected static long create​(String name, NSBundle bundleOrNil)
    • create

      protected static long create​(String name, MDLAssetResolver resolver)
      Since:
      Available in iOS 12.0 and later.
    • newTextureCube

      public static MDLTexture newTextureCube​(List<String> names)
    • newTextureCube

      public static MDLTexture newTextureCube​(List<String> names, NSBundle bundleOrNil)
    • newIrradianceTextureCube

      public static MDLTexture newIrradianceTextureCube​(MDLTexture texture, String name, VectorInt2 dimensions)
    • newIrradianceTextureCube

      public static MDLTexture newIrradianceTextureCube​(MDLTexture texture, String name, VectorInt2 dimensions, float roughness)