ModelIO · IOS API REFERENCE
MDLMesh
class · iOS 9.0+ · SDK 27.1
class MDLMesh
Members (54)
staticnewBox
TypeScriptstatic newBox(dimensions: SDKHandle, segments: SDKHandle, geometryType: MDLGeometryType, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationclass func newBox(withDimensions dimensions: vector_float3, segments: vector_uint3, geometryType: MDLGeometryType, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
static · iOS 11.0+newCapsule
TypeScriptstatic newCapsule(height: number, radii: SDKHandle, radialSegments: number, verticalSegments: number, hemisphereSegments: number, geometryType: MDLGeometryType, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationclass func newCapsule(withHeight height: Float, radii: vector_float2, radialSegments: Int, verticalSegments: Int, hemisphereSegments: Int, geometryType: MDLGeometryType, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
staticnewCylinder
TypeScriptstatic newCylinder(height: number, radii: SDKHandle, radialSegments: number, verticalSegments: number, geometryType: MDLGeometryType, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationclass func newCylinder(withHeight height: Float, radii: vector_float2, radialSegments: Int, verticalSegments: Int, geometryType: MDLGeometryType, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
staticnewEllipsoid
TypeScriptstatic newEllipsoid(radii: SDKHandle, radialSegments: number, verticalSegments: number, geometryType: MDLGeometryType, inwardNormals: boolean, hemisphere: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationclass func newEllipsoid(withRadii radii: vector_float3, radialSegments: Int, verticalSegments: Int, geometryType: MDLGeometryType, inwardNormals: Bool, hemisphere: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
staticnewEllipticalCone
TypeScriptstatic newEllipticalCone(height: number, radii: SDKHandle, radialSegments: number, verticalSegments: number, geometryType: MDLGeometryType, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationclass func newEllipticalCone(withHeight height: Float, radii: vector_float2, radialSegments: Int, verticalSegments: Int, geometryType: MDLGeometryType, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
staticnewIcosahedron
TypeScriptstatic newIcosahedronWithRadiusInwardNormalsAllocator(radius: number, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationclass func newIcosahedron(withRadius radius: Float, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
static · iOS 11.0+newIcosahedron
TypeScriptstatic newIcosahedronWithRadiusInwardNormalsGeometryTypeAllocator(radius: number, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationclass func newIcosahedron(withRadius radius: Float, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?) -> Self
staticnewPlane
TypeScriptstatic newPlane(dimensions: SDKHandle, segments: SDKHandle, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationclass func newPlane(withDimensions dimensions: vector_float2, segments: vector_uint2, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?) -> Self
staticnewSubdividedMesh
TypeScriptstatic newSubdividedMesh(mesh: MDLMesh, submeshIndex: number, subdivisionLevels: number): (MDLMesh) | null
Swift declarationclass func newSubdividedMesh(_ mesh: MDLMesh, submeshIndex: Int, subdivisionLevels: Int) -> Self?
methodaddAttribute
TypeScriptaddAttributeWithNameFormat(name: string, format: MDLVertexFormat): void
Swift declarationfunc addAttribute(withName name: String, format: MDLVertexFormat)
methodaddAttribute
TypeScriptaddAttributeWithNameFormatTypeDataStride(name: string, format: MDLVertexFormat, type: string, data: ArrayBuffer, stride: number): void
Swift declarationfunc addAttribute(withName name: String, format: MDLVertexFormat, type: String, data: Data, stride: Int)
methodaddAttribute
TypeScriptaddAttributeWithNameFormatTypeDataStrideTime(name: string, format: MDLVertexFormat, type: string, data: ArrayBuffer, stride: number, time: number): void
Swift declarationfunc addAttribute(withName name: String, format: MDLVertexFormat, type: String, data: Data, stride: Int, time: TimeInterval)
methodaddNormals
TypeScriptaddNormals(attributeName: (string) | null, creaseThreshold: number): void
Swift declarationfunc addNormals(withAttributeNamed attributeName: String?, creaseThreshold: Float)
method · iOS 11.0+addOrthTanBasis
TypeScriptaddOrthTanBasis(textureCoordinateAttributeName: string, normalAttributeName: string, tangentAttributeName: string): void
Swift declarationfunc addOrthTanBasis(forTextureCoordinateAttributeNamed textureCoordinateAttributeName: String, normalAttributeNamed normalAttributeName: String, tangentAttributeNamed tangentAttributeName: String)
methodaddTangentBasis
TypeScriptaddTangentBasisForTextureCoordinateAttributeNamedNormalAttributeNamedTangentAttributeNamed(textureCoordinateAttributeName: string, normalAttributeName: string, tangentAttributeName: string): void
Swift declarationfunc addTangentBasis(forTextureCoordinateAttributeNamed textureCoordinateAttributeName: String, normalAttributeNamed normalAttributeName: String, tangentAttributeNamed tangentAttributeName: String)
methodaddTangentBasis
TypeScriptaddTangentBasisForTextureCoordinateAttributeNamedTangentAttributeNamedBitangentAttributeNamed(textureCoordinateAttributeName: string, tangentAttributeName: string, bitangentAttributeName?: (string) | null): void
Swift declarationfunc addTangentBasis(forTextureCoordinateAttributeNamed textureCoordinateAttributeName: String, tangentAttributeNamed tangentAttributeName: String, bitangentAttributeNamed bitangentAttributeName: String?)
methodaddUnwrappedTextureCoordinates
TypeScriptaddUnwrappedTextureCoordinates(textureCoordinateAttributeName: string): void
Swift declarationfunc addUnwrappedTextureCoordinates(forAttributeNamed textureCoordinateAttributeName: String)
method · iOS 11.0+flipTextureCoordinates
TypeScriptflipTextureCoordinates(textureCoordinateAttributeName: string): void
Swift declarationfunc flipTextureCoordinates(inAttributeNamed textureCoordinateAttributeName: String)
methodgenerateAmbientOcclusionTexture
TypeScriptgenerateAmbientOcclusionTextureWithQualityAttenuationFactorObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(bakeQuality: number, attenuationFactor: number, objectsToConsider: Array<MDLObject>, vertexAttributeName: string, materialPropertyName: string): boolean
Swift declarationfunc generateAmbientOcclusionTexture(withQuality bakeQuality: Float, attenuationFactor: Float, objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String, materialPropertyNamed materialPropertyName: String) -> Bool
methodgenerateAmbientOcclusionTexture
TypeScriptgenerateAmbientOcclusionTextureWithSizeRaysPerSampleAttenuationFactorObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(textureSize: SDKHandle, raysPerSample: number, attenuationFactor: number, objectsToConsider: Array<MDLObject>, vertexAttributeName: string, materialPropertyName: string): boolean
Swift declarationfunc generateAmbientOcclusionTexture(withSize textureSize: vector_int2, raysPerSample: Int, attenuationFactor: Float, objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String, materialPropertyNamed materialPropertyName: String) -> Bool
methodgenerateAmbientOcclusionVertexColors
TypeScriptgenerateAmbientOcclusionVertexColorsWithQualityAttenuationFactorObjectsToConsiderVertexAttributeNamed(bakeQuality: number, attenuationFactor: number, objectsToConsider: Array<MDLObject>, vertexAttributeName: string): boolean
Swift declarationfunc generateAmbientOcclusionVertexColors(withQuality bakeQuality: Float, attenuationFactor: Float, objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String) -> Bool
methodgenerateAmbientOcclusionVertexColors
TypeScriptgenerateAmbientOcclusionVertexColorsWithRaysPerSampleAttenuationFactorObjectsToConsiderVertexAttributeNamed(raysPerSample: number, attenuationFactor: number, objectsToConsider: Array<MDLObject>, vertexAttributeName: string): boolean
Swift declarationfunc generateAmbientOcclusionVertexColors(withRaysPerSample raysPerSample: Int, attenuationFactor: Float, objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String) -> Bool
methodgenerateLightMapTexture
TypeScriptgenerateLightMapTextureWithQualityLightsToConsiderObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(bakeQuality: number, lightsToConsider: Array<MDLLight>, objectsToConsider: Array<MDLObject>, vertexAttributeName: string, materialPropertyName: string): boolean
Swift declarationfunc generateLightMapTexture(withQuality bakeQuality: Float, lightsToConsider: [MDLLight], objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String, materialPropertyNamed materialPropertyName: String) -> Bool
methodgenerateLightMapTexture
TypeScriptgenerateLightMapTextureWithTextureSizeLightsToConsiderObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(textureSize: SDKHandle, lightsToConsider: Array<MDLLight>, objectsToConsider: Array<MDLObject>, vertexAttributeName: string, materialPropertyName: string): boolean
Swift declarationfunc generateLightMapTexture(withTextureSize textureSize: vector_int2, lightsToConsider: [MDLLight], objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String, materialPropertyNamed materialPropertyName: String) -> Bool
methodgenerateLightMapVertexColorsWithLights
TypeScriptgenerateLightMapVertexColorsWithLights(lightsToConsider: Array<MDLLight>, objectsToConsider: Array<MDLObject>, vertexAttributeName: string): boolean
Swift declarationfunc generateLightMapVertexColorsWithLights(toConsider lightsToConsider: [MDLLight], objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String) -> Bool
initinit
TypeScriptstatic initBoxWithExtentSegmentsInwardNormalsGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(boxWithExtent extent: vector_float3, segments: vector_uint3, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
initinit
TypeScriptstatic initCapsuleWithExtentCylinderSegmentsHemisphereSegmentsInwardNormalsGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, hemisphereSegments: number, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(capsuleWithExtent extent: vector_float3, cylinderSegments segments: vector_uint2, hemisphereSegments: Int32, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
initinit
TypeScriptstatic initConeWithExtentSegmentsInwardNormalsCapGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, cap: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(coneWithExtent extent: vector_float3, segments: vector_uint2, inwardNormals: Bool, cap: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
initinit
TypeScriptstatic initCylinderWithExtentSegmentsInwardNormalsTopCapBottomCapGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, topCap: boolean, bottomCap: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(cylinderWithExtent extent: vector_float3, segments: vector_uint2, inwardNormals: Bool, topCap: Bool, bottomCap: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
initinit
TypeScriptstatic initHemisphereWithExtentSegmentsInwardNormalsCapGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, cap: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(hemisphereWithExtent extent: vector_float3, segments: vector_uint2, inwardNormals: Bool, cap: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
initinit
TypeScriptstatic initIcosahedronWithExtentInwardNormalsGeometryTypeAllocator(extent: SDKHandle, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(icosahedronWithExtent extent: vector_float3, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
initinit
TypeScriptstatic initMeshBySubdividingMeshSubmeshIndexSubdivisionLevelsAllocator(mesh: MDLMesh, submeshIndex: number, subdivisionLevels: number, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(meshBySubdividingMesh mesh: MDLMesh, submeshIndex: Int32, subdivisionLevels: UInt32, allocator: (any MDLMeshBufferAllocator)?)
initinit
TypeScriptstatic initPlaneWithExtentSegmentsGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(planeWithExtent extent: vector_float3, segments: vector_uint2, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
initinit
TypeScriptstatic initSphereWithExtentSegmentsInwardNormalsGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(sphereWithExtent extent: vector_float3, segments: vector_uint2, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
init · iOS 9.0+init
TypeScriptstatic initBufferAllocator(bufferAllocator?: (SDKHandle) | null): MDLMesh
Swift declarationinit(bufferAllocator: (any MDLMeshBufferAllocator)?)
init · iOS 9.0+init
TypeScriptstatic initVertexBufferVertexCountDescriptorSubmeshes(vertexBuffer: SDKHandle, vertexCount: number, descriptor: MDLVertexDescriptor, submeshes: Array<MDLSubmesh>): MDLMesh
Swift declarationinit(vertexBuffer: any MDLMeshBuffer, vertexCount: Int, descriptor: MDLVertexDescriptor, submeshes: [MDLSubmesh])
init · iOS 9.0+init
TypeScriptstatic initVertexBuffersVertexCountDescriptorSubmeshes(vertexBuffers: Array<SDKHandle>, vertexCount: number, descriptor: MDLVertexDescriptor, submeshes: Array<MDLSubmesh>): MDLMesh
Swift declarationinit(vertexBuffers: [any MDLMeshBuffer], vertexCount: Int, descriptor: MDLVertexDescriptor, submeshes: [MDLSubmesh])
method · iOS 9.0+ · Deprecated in iOS 11.0makeVerticesUnique
TypeScriptmakeVerticesUnique(): void
Swift declarationfunc makeVerticesUnique()
method · iOS 11.0+makeVerticesUniqueAndReturnError
TypeScriptmakeVerticesUniqueAndReturnError(): void
Swift declarationfunc makeVerticesUniqueAndReturnError() throws
methodremoveAttributeNamed
TypeScriptremoveAttributeNamed(name: string): void
Swift declarationfunc removeAttributeNamed(_ name: String)
methodreplaceAttributeNamed
TypeScriptreplaceAttributeNamed(name: string, newData: MDLVertexAttributeData): void
Swift declarationfunc replaceAttributeNamed(_ name: String, with newData: MDLVertexAttributeData)
methodupdateAttributeNamed
TypeScriptupdateAttributeNamed(name: string, newData: MDLVertexAttributeData): void
Swift declarationfunc updateAttributeNamed(_ name: String, with newData: MDLVertexAttributeData)
method · iOS 9.0+vertexAttributeData
TypeScriptvertexAttributeDataForAttributeNamed(name: string): (MDLVertexAttributeData) | null
Swift declarationfunc vertexAttributeData(forAttributeNamed name: String) -> MDLVertexAttributeData?
method · iOS 9.0+vertexAttributeData
TypeScriptvertexAttributeDataForAttributeNamedAs(name: string, format: MDLVertexFormat): (MDLVertexAttributeData) | null
Swift declarationfunc vertexAttributeData(forAttributeNamed name: String, as format: MDLVertexFormat) -> MDLVertexAttributeData?
get · iOS 9.0+allocator
TypeScriptget allocator(): SDKHandle
Swift declarationvar allocator: any MDLMeshBufferAllocator { get }
get · iOS 9.0+boundingBox
TypeScriptget boundingBox(): MDLAxisAlignedBoundingBox
Swift declarationvar boundingBox: MDLAxisAlignedBoundingBox { get }
get · iOS 9.0+submeshes
TypeScriptget submeshes(): (_Foundation_NSMutableArray) | null
Swift declaration@NSCopying var submeshes: NSMutableArray? { get set }
set · iOS 9.0+submeshes
TypeScriptset submeshes(value: (_Foundation_NSMutableArray) | null)
Swift declaration@NSCopying var submeshes: NSMutableArray? { get set }
get · iOS 9.0+vertexBuffers
TypeScriptget vertexBuffers(): Array<SDKHandle>
Swift declarationvar vertexBuffers: [any MDLMeshBuffer] { get set }
set · iOS 9.0+vertexBuffers
TypeScriptset vertexBuffers(value: Array<SDKHandle>)
Swift declarationvar vertexBuffers: [any MDLMeshBuffer] { get set }
get · iOS 9.0+vertexCount
TypeScriptget vertexCount(): number
Swift declarationvar vertexCount: Int { get set }
set · iOS 9.0+vertexCount
TypeScriptset vertexCount(value: number)
Swift declarationvar vertexCount: Int { get set }
get · iOS 9.0+vertexDescriptor
TypeScriptget vertexDescriptor(): MDLVertexDescriptor
Swift declaration@NSCopying var vertexDescriptor: MDLVertexDescriptor { get set }
set · iOS 9.0+vertexDescriptor
TypeScriptset vertexDescriptor(value: MDLVertexDescriptor)
Swift declaration@NSCopying var vertexDescriptor: MDLVertexDescriptor { get set }
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
MDLMesh.init()
inherited init: cannot prove legal (class declares 12 custom initializers)
All ModelIO types →