All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bugvm.apple.modelio.MDLAsset Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (C) 2013-2015 RoboVM AB
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.bugvm.apple.modelio;

/**/
import java.io.*;
import java.nio.*;
import java.util.*;
import com.bugvm.objc.*;
import com.bugvm.objc.annotation.*;
import com.bugvm.objc.block.*;
import com.bugvm.rt.*;
import com.bugvm.rt.annotation.*;
import com.bugvm.rt.bro.*;
import com.bugvm.rt.bro.annotation.*;
import com.bugvm.rt.bro.ptr.*;
import com.bugvm.apple.foundation.*;
import com.bugvm.apple.coregraphics.*;
/**/

/**/
/**
 * @since Available in iOS 9.0 and later.
 */
/**/
/**/@Library("ModelIO") @NativeClass/**/
/**/public/**/ class /**/MDLAsset/**/ 
    extends /**/NSObject/**/ 
    /**/implements NSFastEnumeration/**/ {

    /**/public static class MDLAssetPtr extends Ptr {}/**/
    /**/static { ObjCRuntime.bind(MDLAsset.class); }/**/
    /**//**/
    /**/
    public MDLAsset() {}
    protected MDLAsset(SkipInit skipInit) { super(skipInit); }
    public MDLAsset(NSURL URL) { super((SkipInit) null); initObject(init(URL)); }
    public MDLAsset(NSURL URL, MDLVertexDescriptor vertexDescriptor, MDLMeshBufferAllocator bufferAllocator) { super((SkipInit) null); initObject(init(URL, vertexDescriptor, bufferAllocator)); }
    public MDLAsset(NSURL URL, MDLVertexDescriptor vertexDescriptor, MDLMeshBufferAllocator bufferAllocator, boolean preserveTopology) throws NSErrorException {
       super((SkipInit) null);
       NSError.NSErrorPtr ptr = new NSError.NSErrorPtr();
       long handle = init(URL, vertexDescriptor, bufferAllocator, preserveTopology, ptr);
       if (ptr.get() != null) { throw new NSErrorException(ptr.get()); }
       initObject(handle);
    }
    /**/
    /**/
    @Property(selector = "boundingBox")
    public native @ByVal MDLAxisAlignedBoundingBox getBoundingBox();
    @Property(selector = "frameInterval")
    public native double getFrameInterval();
    @Property(selector = "setFrameInterval:")
    public native void setFrameInterval(double v);
    @Property(selector = "startTime")
    public native double getStartTime();
    @Property(selector = "setStartTime:")
    public native void setStartTime(double v);
    @Property(selector = "endTime")
    public native double getEndTime();
    @Property(selector = "setEndTime:")
    public native void setEndTime(double v);
    @Property(selector = "URL")
    public native NSURL getURL();
    @Property(selector = "bufferAllocator")
    public native MDLMeshBufferAllocator getBufferAllocator();
    @Property(selector = "vertexDescriptor")
    public native MDLVertexDescriptor getVertexDescriptor();
    @Property(selector = "count")
    public native @MachineSizedUInt long getCount();
    /**/
    /**//**/
    /**/
    @Method(selector = "initWithURL:")
    protected native @Pointer long init(NSURL URL);
    @Method(selector = "initWithURL:vertexDescriptor:bufferAllocator:")
    protected native @Pointer long init(NSURL URL, MDLVertexDescriptor vertexDescriptor, MDLMeshBufferAllocator bufferAllocator);
    @Method(selector = "initWithURL:vertexDescriptor:bufferAllocator:preserveTopology:error:")
    private native @Pointer long init(NSURL URL, MDLVertexDescriptor vertexDescriptor, MDLMeshBufferAllocator bufferAllocator, boolean preserveTopology, NSError.NSErrorPtr error);
    public boolean export(NSURL URL) throws NSErrorException {
       NSError.NSErrorPtr ptr = new NSError.NSErrorPtr();
       boolean result = export(URL, ptr);
       if (ptr.get() != null) { throw new NSErrorException(ptr.get()); }
       return result;
    }
    @Method(selector = "exportAssetToURL:error:")
    private native boolean export(NSURL URL, NSError.NSErrorPtr error);
    @Method(selector = "boundingBoxAtTime:")
    public native @ByVal MDLAxisAlignedBoundingBox getBoundingBox(double time);
    @Method(selector = "addObject:")
    public native void addObject(MDLObject object);
    @Method(selector = "removeObject:")
    public native void removeObject(MDLObject object);
    @Method(selector = "objectAtIndex:")
    public native MDLObject getObject(@MachineSizedUInt long index);
    @Method(selector = "canImportFileExtension:")
    public static native boolean canImportFileExtension(String extension);
    @Method(selector = "canExportFileExtension:")
    public static native boolean canExportFileExtension(String extension);
    /**/
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy