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.
    • Constructor Detail

      • MDLTexture

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

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

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

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

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

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

        public static 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

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • 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​(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​(NSArray<java.lang.String> names,
                                                                  NSBundle bundleOrNil)
      • textureNamed

        public static MDLTexture textureNamed​(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​(java.lang.String name,
                                                    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

        public CGImageRef imageFromTexture()
      • isCube

        public boolean isCube()
      • mipLevelCount

        public long mipLevelCount()
      • name

        public 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​(java.lang.String value)
        Specified by:
        setName in interface MDLNamed
      • texelDataWithBottomLeftOrigin

        public NSData texelDataWithBottomLeftOrigin()
      • texelDataWithBottomLeftOriginAtMipLevelCreate

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

        public NSData texelDataWithTopLeftOrigin()
      • texelDataWithTopLeftOriginAtMipLevelCreate

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

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

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

        public CGImageRef imageFromTextureAtLevel​(long level)
      • writeToURLLevel

        public boolean writeToURLLevel​(NSURL URL,
                                       long level)
        write a particular level of a mipped texture to URL, deducing type from path extension
      • writeToURLTypeLevel

        public boolean writeToURLTypeLevel​(NSURL nsurl,
                                           CFStringRef type,
                                           long level)
        write a particular level of a mipped texture to URL, using a specific UT type
      • textureNamedAssetResolver

        public static MDLTexture textureNamedAssetResolver​(java.lang.String name,
                                                           MDLAssetResolver resolver)