Package apple.modelio

Class MDLTexture

  • All Implemented Interfaces:
    MDLNamed, NSObject
    Direct Known Subclasses:
    MDLCheckerboardTexture, MDLColorSwatchTexture, MDLNoiseTexture, MDLNormalMapTexture, MDLSkyCubeTexture, MDLURLTexture

    public class MDLTexture
    extends NSObject
    implements MDLNamed
    MDLTexture [@summary] a description of texels provided by a texture object. A texture optionally generates or loads texels through an access to the data property, or one of the other properties, otherwise the texture object is a lightweight descriptor only. [@property] data Texel data that will exist when referenced; it may or may not exist before [@property] dimensions texel width and height of the texture [@property] rowStride The number of bytes from the first texel in a row to the first texel in the next row. A rowStride of zero indicates that interleaved x,y addressing of texels is not possible. This might be the case if the texture was compressed in some manner, for example. [@property] channelCount The number of channels incoded in a single texel. For example, an RGB texture has 3 channels. All channels must have the same encoding. [@property] channelEncoding The encoding of a channel in a single texel. [@property] isCube The texture encodes a cube map. If YES, then the layout of the cube map is deduced as a vertical strip if dimension.y is six times dimension.x. Other layouts are possible in the future. API-Since: 9.0
    • Constructor Detail

      • MDLTexture

        protected MDLTexture​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static MDLTexture allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • textureCubeWithImagesNamed

        public static MDLTexture textureCubeWithImagesNamed​(@NotNull
                                                            @NotNull NSArray<java.lang.String> names)
        Creates a cube texture map image using 6 faces of the same dimensions, ordered +X,-X,+Y,-Y,+Z,-Z If the data is read back the image will be compacted into a single vertical stack where dimensions.y = 6 * dimensions.x isCube will return YES
        Parameters:
        names - a collection of mosaiced images in a cross formation or column or row. - If 6 individual images are given they are assumed to be in order and will be loaded as is. - if 3 images of double height or width are given they will be treated as pairs of + and - in each axis, the order is must be x, then y, then z. - if 2 images of triple height or width are given they will be treates as a positive set and a negative set in the order +x, +y, +z, then -x, -y, -z. - if a single image is given it will be used without conversion if in column orientation and demosaiced in all other instances.
      • textureCubeWithImagesNamedBundle

        public static MDLTexture textureCubeWithImagesNamedBundle​(@NotNull
                                                                  @NotNull NSArray<java.lang.String> names,
                                                                  @Nullable
                                                                  @Nullable NSBundle bundleOrNil)
      • textureNamed

        public static MDLTexture textureNamed​(@NotNull
                                              @NotNull java.lang.String name)
        Creates a texture from a source in the main bundle named in a manner matching name.
      • textureNamedBundle

        public static MDLTexture textureNamedBundle​(@NotNull
                                                    @NotNull java.lang.String name,
                                                    @Nullable
                                                    @Nullable NSBundle bundleOrNil)
      • version_static

        public static long version_static()
      • channelCount

        public long channelCount()
      • channelEncoding

        public long channelEncoding()
      • hasAlphaValues

        public boolean hasAlphaValues()
        hasAlphaValues [@summary] Can be overridden. If not overridden, hasAlpha will be NO if the texture does not have an alpha channel. It wil be YES if the texture has an alpha channel and there is at least one non-opaque texel in it.
      • imageFromTexture

        @Nullable
        public @Nullable CGImageRef imageFromTexture()
      • isCube

        public boolean isCube()
      • mipLevelCount

        public long mipLevelCount()
      • name

        @NotNull
        public @NotNull java.lang.String name()
        Specified by:
        name in interface MDLNamed
      • rowStride

        public long rowStride()
      • setHasAlphaValues

        public void setHasAlphaValues​(boolean value)
        hasAlphaValues [@summary] Can be overridden. If not overridden, hasAlpha will be NO if the texture does not have an alpha channel. It wil be YES if the texture has an alpha channel and there is at least one non-opaque texel in it.
      • setIsCube

        public void setIsCube​(boolean value)
      • setName

        public void setName​(@NotNull
                            @NotNull java.lang.String value)
        Specified by:
        setName in interface MDLNamed
      • texelDataWithBottomLeftOrigin

        @Nullable
        public @Nullable NSData texelDataWithBottomLeftOrigin()
      • texelDataWithBottomLeftOriginAtMipLevelCreate

        @Nullable
        public @Nullable NSData texelDataWithBottomLeftOriginAtMipLevelCreate​(long level,
                                                                              boolean create)
      • texelDataWithTopLeftOrigin

        @Nullable
        public @Nullable NSData texelDataWithTopLeftOrigin()
      • texelDataWithTopLeftOriginAtMipLevelCreate

        @Nullable
        public @Nullable NSData texelDataWithTopLeftOriginAtMipLevelCreate​(long level,
                                                                           boolean create)
      • writeToURL

        public boolean writeToURL​(@NotNull
                                  @NotNull NSURL URL)
        write a texture to URL, deducing type from path extension
      • writeToURLType

        public boolean writeToURLType​(@NotNull
                                      @NotNull NSURL nsurl,
                                      @NotNull
                                      @NotNull CFStringRef type)
        write a texture to URL, using a specific UT type
      • imageFromTextureAtLevel

        @Nullable
        public @Nullable CGImageRef imageFromTextureAtLevel​(long level)
        API-Since: 11.0
      • writeToURLLevel

        public boolean writeToURLLevel​(@NotNull
                                       @NotNull NSURL URL,
                                       long level)
        write a particular level of a mipped texture to URL, deducing type from path extension API-Since: 11.0
      • writeToURLTypeLevel

        public boolean writeToURLTypeLevel​(@NotNull
                                           @NotNull NSURL nsurl,
                                           @NotNull
                                           @NotNull CFStringRef type,
                                           long level)
        write a particular level of a mipped texture to URL, using a specific UT type API-Since: 11.0
      • textureNamedAssetResolver

        public static MDLTexture textureNamedAssetResolver​(@NotNull
                                                           @NotNull java.lang.String name,
                                                           @NotNull
                                                           @NotNull MDLAssetResolver resolver)
        API-Since: 12.0
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.