Class MTKMesh

  • All Implemented Interfaces:
    NSObject

    public class MTKMesh
    extends NSObject
    MTKMesh Container for vertex data of a mesh and submeshes to render it.
    • Constructor Detail

      • MTKMesh

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static MTKMesh alloc()
      • 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()
      • newMeshesFromAssetDeviceSourceMeshesError

        public static NSArray<? extends MTKMesh> newMeshesFromAssetDeviceSourceMeshesError​(MDLAsset asset,
                                                                                           MTLDevice device,
                                                                                           org.moe.natj.general.ptr.Ptr<NSArray<? extends MDLMesh>> sourceMeshes,
                                                                                           org.moe.natj.general.ptr.Ptr<NSError> error)
        newMeshesFromAsset:device:sourceMeshes:error: Initialize all meshes in a Model I/O asset. A convenience method to create MetalKit meshes from each mesh in a Model I/O asset. resulting meshes are returned while the corresponding Model I/O meshes from which they were generated will appear in the sourceMeshes array. All vertexBuffer objects in each MDLMesh object in the asset and the indexBuffer of each submesh within each of these meshes must have been created using a MTKMeshBufferAllocator object. Thus
        Parameters:
        asset - Model I/O asset from which to create MetalKit meshes
        device - Metal device on which to create mesh resources
        sourceMeshes - Array built by this method containing MDLMesh objects corresponding the returned MTKMesh objects
        error - Pointer to an NSError object set if an error occurred
        Returns:
        MetalKit Meshes created from the Model I/O asset
      • 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()
      • version_static

        public static long version_static()
      • initWithMeshDeviceError

        public MTKMesh initWithMeshDeviceError​(MDLMesh mesh,
                                               MTLDevice device,
                                               org.moe.natj.general.ptr.Ptr<NSError> error)
        initWithMesh:device:error: Initialize the mesh and the mesh's submeshes. The designated initializer for this class. This does NOT initialize any meshes that are children of the Model I/O mesh, only submeshes that are part of the given mesh. An exception is raised if vertexBuffer objects in the given mesh and the indexBuffer of any submesh in this mesh have not been created with a MTKMeshBufferAllocator object. If a submesh using MDLGeometryTypeQuads or MDLGeometryTypeTopology is used, that submesh will be copied, and recreated to use MDLGeometryTypeTriangles, before this routine creates the MTKSubmesh.
        Parameters:
        mesh - Model I/O Mesh from which to create this MetalKit mesh
        device - Metal device on which to create mesh resources
        error - Pointer to an NSError object set if an error occurred
      • name

        public java.lang.String name()
        [@property] name Name of the mesh copies from the originating Model I/O mesh. Can be used by the app to identify the mesh in its scene/world/renderer etc.
      • setName

        public void setName​(java.lang.String value)
        [@property] name Name of the mesh copies from the originating Model I/O mesh. Can be used by the app to identify the mesh in its scene/world/renderer etc.
      • submeshes

        public NSArray<? extends MTKSubmesh> submeshes()
        [@property] submeshes Submeshes containing index buffers to rendering mesh vertices.
      • vertexBuffers

        public NSArray<? extends MTKMeshBuffer> vertexBuffers()
        [@property] vertexBuffers Array of buffers in which mesh vertex data resides. This is filled with mesh buffer objects using the layout described by the vertexDescriptor property. Elements in this array can be [NSNull null] if the vertexDescriptor does not specify elements for buffer for the given index
      • vertexCount

        public long vertexCount()
        [@property] vertexCount Number of vertices in the vertexBuffers.
      • vertexDescriptor

        public MDLVertexDescriptor vertexDescriptor()
        [@property] vertexDescriptor Model I/O vertex descriptor specifying the layout of data in vertexBuffers. This is not directly used by this object, but the application can use this information to determine rendering state or create a Metal vertex descriptor to build a RenderPipelineState object capable of interpreting data in 'vertexBuffers'. Changing propties in the object will not result in the relayout data in vertex descriptor and thus will make the vertex descriptor no loger describe the layout of vertes data and verticies. (i.e. don't change properties in this vertexDescriptor)