Package org.robovm.apple.modelio
Class MDLMesh
java.lang.Object
org.robovm.rt.bro.NativeObject
org.robovm.objc.ObjCObject
org.robovm.apple.foundation.NSObject
org.robovm.apple.modelio.MDLObject
org.robovm.apple.modelio.MDLMesh
- All Implemented Interfaces:
NSObjectProtocol,MDLNamed,ObjCProtocol
public class MDLMesh extends MDLObject
- Since:
- Available in iOS 9.0 and later.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMDLMesh.MDLMeshPtrNested classes/interfaces inherited from class org.robovm.apple.modelio.MDLObject
MDLObject.MDLObjectPtrNested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInitNested classes/interfaces inherited from class org.robovm.objc.ObjCObject
ObjCObject.ObjCObjectPtr, ObjCObject.Super -
Field Summary
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAINFields inherited from class org.robovm.objc.ObjCObject
customClass -
Constructor Summary
Constructors Modifier Constructor Description MDLMesh()MDLMesh(List<MDLMeshBuffer> vertexBuffers, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)protectedMDLMesh(NSObject.Handle h, long handle)protectedMDLMesh(NSObject.SkipInit skipInit)MDLMesh(VectorFloat3 extent, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)MDLMesh(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean topCap, boolean bottomCap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)MDLMesh(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean cap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)MDLMesh(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)MDLMesh(VectorFloat3 extent, VectorInt2 segments, int hemisphereSegments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)MDLMesh(VectorFloat3 extent, VectorInt2 segments, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)MDLMesh(VectorFloat3 extent, VectorInt3 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)MDLMesh(MDLMeshBufferAllocator bufferAllocator)MDLMesh(MDLMeshBuffer vertexBuffer, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)MDLMesh(MDLMesh mesh, int submeshIndex, int subdivisionLevels, MDLMeshBufferAllocator allocator) -
Method Summary
Modifier and Type Method Description voidaddAttribute(String name, MDLVertexFormat format)voidaddAttribute(String name, MDLVertexFormat format, String type, NSData data, long stride)voidaddAttribute(String name, MDLVertexFormat format, String type, NSData data, long stride, double time)voidaddNormals(String attributeName, float creaseThreshold)voidaddOrthTanBasis(String textureCoordinateAttributeName, String normalAttributeName, String tangentAttributeName)voidaddTangentBasis(String textureCoordinateAttributeName, String tangentAttributeName, String bitangentAttributeName)voidaddTangentBasisWithNormals(String textureCoordinateAttributeName, String normalAttributeName, String tangentAttributeName)voidaddUnwrappedTextureCoordinatesForAttributeNamed(String textureCoordinateAttributeName)voidflipTextureCoordinatesInAttributeNamed(String textureCoordinateAttributeName)booleangenerateAmbientOcclusionTexture(float bakeQuality, float attenuationFactor, NSArray<MDLObject> objectsToConsider, String vertexAttributeName, String materialPropertyName)booleangenerateAmbientOcclusionTexture(VectorInt2 textureSize, long raysPerSample, float attenuationFactor, NSArray<MDLObject> objectsToConsider, String vertexAttributeName, String materialPropertyName)booleangenerateAmbientOcclusionVertexColors(float bakeQuality, float attenuationFactor, NSArray<MDLObject> objectsToConsider, String vertexAttributeName)booleangenerateAmbientOcclusionVertexColors(long raysPerSample, float attenuationFactor, NSArray<MDLObject> objectsToConsider, String vertexAttributeName)booleangenerateLightMapTexture(float bakeQuality, NSArray<MDLLight> lightsToConsider, NSArray<MDLObject> objectsToConsider, String vertexAttributeName, String materialPropertyName)booleangenerateLightMapTexture(VectorInt2 textureSize, NSArray<MDLLight> lightsToConsider, NSArray<MDLObject> objectsToConsider, String vertexAttributeName, String materialPropertyName)booleangenerateLightMapVertexColors(NSArray<MDLLight> lightsToConsider, NSArray<MDLObject> objectsToConsider, String vertexAttributeName)MDLMeshBufferAllocatorgetAllocator()MDLAxisAlignedBoundingBoxgetBoundingBox()NSMutableArray<MDLSubmesh>getSubmeshes()MDLVertexAttributeDatagetVertexAttributeData(String name)MDLVertexAttributeDatagetVertexAttributeData(String name, MDLVertexFormat format)NSArray<?>getVertexBuffers()longgetVertexCount()MDLVertexDescriptorgetVertexDescriptor()protected longinit(List<MDLMeshBuffer> vertexBuffers, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)protected longinit(VectorFloat3 extent, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)protected longinit(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean topCap, boolean bottomCap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)protected longinit(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean cap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)protected longinit(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)protected longinit(VectorFloat3 extent, VectorInt2 segments, int hemisphereSegments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)protected longinit(VectorFloat3 extent, VectorInt2 segments, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)protected longinit(VectorFloat3 extent, VectorInt3 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)protected longinit(MDLMeshBufferAllocator bufferAllocator)protected longinit(MDLMeshBuffer vertexBuffer, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)protected longinit(MDLMesh mesh, int submeshIndex, int subdivisionLevels, MDLMeshBufferAllocator allocator)protected longinitHemisphereWithExtent(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean cap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)voidmakeVerticesUnique()Deprecated.Deprecated in iOS 11.0.booleanmakeVerticesUniqueAndReturnError(NSError.NSErrorPtr error)static MDLMeshnewBox(VectorFloat3 dimensions, VectorInt3 segments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator)static MDLMeshnewCapsuleWithHeight(float height, VectorFloat2 radii, long radialSegments, long verticalSegments, long hemisphereSegments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator)static MDLMeshnewCylinder(float height, VectorFloat2 radii, long radialSegments, long verticalSegments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator)static MDLMeshnewEllipsoid(VectorFloat3 radii, long radialSegments, long verticalSegments, MDLGeometryType geometryType, boolean inwardNormals, boolean hemisphere, MDLMeshBufferAllocator allocator)static MDLMeshnewEllipticalCone(float height, VectorFloat2 radii, long radialSegments, long verticalSegments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator)static MDLMeshnewIcosahedron(float radius, boolean inwardNormals, MDLMeshBufferAllocator allocator)static MDLMeshnewIcosahedronWithRadius(float radius, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)static MDLMeshnewPlane(VectorFloat2 dimensions, VectorInt2 segments, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)static MDLMeshnewSubdividedMesh(MDLMesh mesh, long submeshIndex, long subdivisionLevels)voidremoveAttributeNamed(String name)voidreplaceAttribute(String name, MDLVertexAttributeData newData)voidsetSubmeshes(NSMutableArray<MDLSubmesh> v)voidsetVertexBuffers(NSArray<?> v)voidsetVertexCount(long v)voidsetVertexDescriptor(MDLVertexDescriptor v)voidupdateAttribute(String name, MDLVertexAttributeData newData)Methods inherited from class org.robovm.apple.modelio.MDLObject
addChild, enumerateChildObjects, getBoundingBox, getChildren, getComponent, getComponents, getInstance, getName, getParent, getPath, getTransform, isHidden, objectAtPath, objectForKeyedSubscript, setChildren, setComponent, setHidden, setInstance, setName, setObjectForKeyedSubscript, setParent, setTransformMethods inherited from class org.robovm.apple.foundation.NSObject
addKeyValueObserver, addKeyValueObserver, afterMarshaled, alloc, autorelease, autorelease, awakeFromNib, conformsToProtocol, copy, description, didChangeValue, didChangeValue, didChangeValues, doDispose, equals, forceSkipInit, getAutoContentAccessingProxy, getClassForCoder, getClassForKeyedArchiver, getKeyValueCoder, getObservationInfo, hash, hashCode, init, isEqual, isKindOfClass, isMemberOfClass, mutableCopy, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelector, performSelectorInBackground, performSelectorOnMainThread, performSelectorOnMainThread, performSelectorV, performSelectorV, performSelectorV, release, release, removeKeyValueObserver, removeKeyValueObservers, respondsToSelector, retain, retain, retainCount, setObservationInfo, toString, willChangeValue, willChangeValue, willChangeValuesMethods inherited from class org.robovm.objc.ObjCObject
addStrongRef, dispose, dispose, finalize, getAssociatedObject, getObjCClass, getPeerObject, getSuper, initObject, logRetainRelease, removeStrongRef, retainCustomObjectFromCb, setAssociatedObject, toObjCObject, toObjCObject, updateStrongRefMethods inherited from class org.robovm.rt.bro.NativeObject
as, getHandle, setHandle
-
Constructor Details
-
MDLMesh
public MDLMesh() -
MDLMesh
-
MDLMesh
-
MDLMesh
-
MDLMesh
public MDLMesh(MDLMeshBuffer vertexBuffer, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes) -
MDLMesh
public MDLMesh(List<MDLMeshBuffer> vertexBuffers, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes) -
MDLMesh
public MDLMesh(VectorFloat3 extent, VectorInt3 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
MDLMesh
public MDLMesh(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
MDLMesh
public MDLMesh(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean topCap, boolean bottomCap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
MDLMesh
public MDLMesh(VectorFloat3 extent, VectorInt2 segments, int hemisphereSegments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
MDLMesh
public MDLMesh(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean cap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
MDLMesh
public MDLMesh(VectorFloat3 extent, VectorInt2 segments, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
MDLMesh
public MDLMesh(VectorFloat3 extent, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
MDLMesh
public MDLMesh(MDLMesh mesh, int submeshIndex, int subdivisionLevels, MDLMeshBufferAllocator allocator)
-
-
Method Details
-
getBoundingBox
-
getVertexDescriptor
-
setVertexDescriptor
-
getVertexCount
public long getVertexCount() -
setVertexCount
public void setVertexCount(long v) -
getVertexBuffers
-
setVertexBuffers
-
getSubmeshes
-
setSubmeshes
-
getAllocator
-
init
-
init
protected long init(MDLMeshBuffer vertexBuffer, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes) -
init
protected long init(List<MDLMeshBuffer> vertexBuffers, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes) -
getVertexAttributeData
-
getVertexAttributeData
-
addAttribute
-
addAttribute
public void addAttribute(String name, MDLVertexFormat format, String type, NSData data, long stride) -
addAttribute
public void addAttribute(String name, MDLVertexFormat format, String type, NSData data, long stride, double time) -
addNormals
-
addTangentBasis
-
addTangentBasisWithNormals
-
addOrthTanBasis
public void addOrthTanBasis(String textureCoordinateAttributeName, String normalAttributeName, String tangentAttributeName)- Since:
- Available in iOS 11.0 and later.
-
addUnwrappedTextureCoordinatesForAttributeNamed
-
flipTextureCoordinatesInAttributeNamed
- Since:
- Available in iOS 11.0 and later.
-
makeVerticesUnique
Deprecated.Deprecated in iOS 11.0.- Since:
- Available in iOS 9.0 and later.
-
makeVerticesUniqueAndReturnError
- Since:
- Available in iOS 11.0 and later.
-
replaceAttribute
-
updateAttribute
-
removeAttributeNamed
-
init
protected long init(VectorFloat3 extent, VectorInt3 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
init
protected long init(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
initHemisphereWithExtent
protected long initHemisphereWithExtent(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean cap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
init
protected long init(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean topCap, boolean bottomCap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
init
protected long init(VectorFloat3 extent, VectorInt2 segments, int hemisphereSegments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
init
protected long init(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean cap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
init
protected long init(VectorFloat3 extent, VectorInt2 segments, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
init
protected long init(VectorFloat3 extent, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
init
protected long init(MDLMesh mesh, int submeshIndex, int subdivisionLevels, MDLMeshBufferAllocator allocator) -
newBox
public static MDLMesh newBox(VectorFloat3 dimensions, VectorInt3 segments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator) -
newEllipsoid
public static MDLMesh newEllipsoid(VectorFloat3 radii, long radialSegments, long verticalSegments, MDLGeometryType geometryType, boolean inwardNormals, boolean hemisphere, MDLMeshBufferAllocator allocator) -
newCylinder
public static MDLMesh newCylinder(float height, VectorFloat2 radii, long radialSegments, long verticalSegments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator) -
newCapsuleWithHeight
public static MDLMesh newCapsuleWithHeight(float height, VectorFloat2 radii, long radialSegments, long verticalSegments, long hemisphereSegments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator)- Since:
- Available in iOS 11.0 and later.
-
newEllipticalCone
public static MDLMesh newEllipticalCone(float height, VectorFloat2 radii, long radialSegments, long verticalSegments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator) -
newPlane
public static MDLMesh newPlane(VectorFloat2 dimensions, VectorInt2 segments, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator) -
newIcosahedronWithRadius
public static MDLMesh newIcosahedronWithRadius(float radius, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)- Since:
- Available in iOS 11.0 and later.
-
newIcosahedron
public static MDLMesh newIcosahedron(float radius, boolean inwardNormals, MDLMeshBufferAllocator allocator) -
newSubdividedMesh
-
generateAmbientOcclusionTexture
public boolean generateAmbientOcclusionTexture(VectorInt2 textureSize, long raysPerSample, float attenuationFactor, NSArray<MDLObject> objectsToConsider, String vertexAttributeName, String materialPropertyName) -
generateAmbientOcclusionTexture
-
generateAmbientOcclusionVertexColors
-
generateAmbientOcclusionVertexColors
-
generateLightMapTexture
-
generateLightMapTexture
-
generateLightMapVertexColors
-