One Logo Pool Ball
ModelIO · IOS API REFERENCE

MDLMesh

class · iOS 9.0+ · SDK 27.1

class MDLMesh

Members (54)

static

newBox

TypeScript
static newBox(dimensions: SDKHandle, segments: SDKHandle, geometryType: MDLGeometryType, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
class func newBox(withDimensions dimensions: vector_float3, segments: vector_uint3, geometryType: MDLGeometryType, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
static · iOS 11.0+

newCapsule

TypeScript
static newCapsule(height: number, radii: SDKHandle, radialSegments: number, verticalSegments: number, hemisphereSegments: number, geometryType: MDLGeometryType, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
class func newCapsule(withHeight height: Float, radii: vector_float2, radialSegments: Int, verticalSegments: Int, hemisphereSegments: Int, geometryType: MDLGeometryType, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
static

newCylinder

TypeScript
static newCylinder(height: number, radii: SDKHandle, radialSegments: number, verticalSegments: number, geometryType: MDLGeometryType, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
class func newCylinder(withHeight height: Float, radii: vector_float2, radialSegments: Int, verticalSegments: Int, geometryType: MDLGeometryType, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
static

newEllipsoid

TypeScript
static newEllipsoid(radii: SDKHandle, radialSegments: number, verticalSegments: number, geometryType: MDLGeometryType, inwardNormals: boolean, hemisphere: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
class func newEllipsoid(withRadii radii: vector_float3, radialSegments: Int, verticalSegments: Int, geometryType: MDLGeometryType, inwardNormals: Bool, hemisphere: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
static

newEllipticalCone

TypeScript
static newEllipticalCone(height: number, radii: SDKHandle, radialSegments: number, verticalSegments: number, geometryType: MDLGeometryType, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
class func newEllipticalCone(withHeight height: Float, radii: vector_float2, radialSegments: Int, verticalSegments: Int, geometryType: MDLGeometryType, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
static

newIcosahedron

TypeScript
static newIcosahedronWithRadiusInwardNormalsAllocator(radius: number, inwardNormals: boolean, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
class func newIcosahedron(withRadius radius: Float, inwardNormals: Bool, allocator: (any MDLMeshBufferAllocator)?) -> Self
static · iOS 11.0+

newIcosahedron

TypeScript
static newIcosahedronWithRadiusInwardNormalsGeometryTypeAllocator(radius: number, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
class func newIcosahedron(withRadius radius: Float, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?) -> Self
static

newPlane

TypeScript
static newPlane(dimensions: SDKHandle, segments: SDKHandle, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
class func newPlane(withDimensions dimensions: vector_float2, segments: vector_uint2, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?) -> Self
static

newSubdividedMesh

TypeScript
static newSubdividedMesh(mesh: MDLMesh, submeshIndex: number, subdivisionLevels: number): (MDLMesh) | null
Swift declaration
class func newSubdividedMesh(_ mesh: MDLMesh, submeshIndex: Int, subdivisionLevels: Int) -> Self?
method

addAttribute

TypeScript
addAttributeWithNameFormat(name: string, format: MDLVertexFormat): void
Swift declaration
func addAttribute(withName name: String, format: MDLVertexFormat)
method

addAttribute

TypeScript
addAttributeWithNameFormatTypeDataStride(name: string, format: MDLVertexFormat, type: string, data: ArrayBuffer, stride: number): void
Swift declaration
func addAttribute(withName name: String, format: MDLVertexFormat, type: String, data: Data, stride: Int)
method

addAttribute

TypeScript
addAttributeWithNameFormatTypeDataStrideTime(name: string, format: MDLVertexFormat, type: string, data: ArrayBuffer, stride: number, time: number): void
Swift declaration
func addAttribute(withName name: String, format: MDLVertexFormat, type: String, data: Data, stride: Int, time: TimeInterval)
method

addNormals

TypeScript
addNormals(attributeName: (string) | null, creaseThreshold: number): void
Swift declaration
func addNormals(withAttributeNamed attributeName: String?, creaseThreshold: Float)
method · iOS 11.0+

addOrthTanBasis

TypeScript
addOrthTanBasis(textureCoordinateAttributeName: string, normalAttributeName: string, tangentAttributeName: string): void
Swift declaration
func addOrthTanBasis(forTextureCoordinateAttributeNamed textureCoordinateAttributeName: String, normalAttributeNamed normalAttributeName: String, tangentAttributeNamed tangentAttributeName: String)
method

addTangentBasis

TypeScript
addTangentBasisForTextureCoordinateAttributeNamedNormalAttributeNamedTangentAttributeNamed(textureCoordinateAttributeName: string, normalAttributeName: string, tangentAttributeName: string): void
Swift declaration
func addTangentBasis(forTextureCoordinateAttributeNamed textureCoordinateAttributeName: String, normalAttributeNamed normalAttributeName: String, tangentAttributeNamed tangentAttributeName: String)
method

addTangentBasis

TypeScript
addTangentBasisForTextureCoordinateAttributeNamedTangentAttributeNamedBitangentAttributeNamed(textureCoordinateAttributeName: string, tangentAttributeName: string, bitangentAttributeName?: (string) | null): void
Swift declaration
func addTangentBasis(forTextureCoordinateAttributeNamed textureCoordinateAttributeName: String, tangentAttributeNamed tangentAttributeName: String, bitangentAttributeNamed bitangentAttributeName: String?)
method

addUnwrappedTextureCoordinates

TypeScript
addUnwrappedTextureCoordinates(textureCoordinateAttributeName: string): void
Swift declaration
func addUnwrappedTextureCoordinates(forAttributeNamed textureCoordinateAttributeName: String)
method · iOS 11.0+

flipTextureCoordinates

TypeScript
flipTextureCoordinates(textureCoordinateAttributeName: string): void
Swift declaration
func flipTextureCoordinates(inAttributeNamed textureCoordinateAttributeName: String)
method

generateAmbientOcclusionTexture

TypeScript
generateAmbientOcclusionTextureWithQualityAttenuationFactorObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(bakeQuality: number, attenuationFactor: number, objectsToConsider: Array<MDLObject>, vertexAttributeName: string, materialPropertyName: string): boolean
Swift declaration
func generateAmbientOcclusionTexture(withQuality bakeQuality: Float, attenuationFactor: Float, objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String, materialPropertyNamed materialPropertyName: String) -> Bool
method

generateAmbientOcclusionTexture

TypeScript
generateAmbientOcclusionTextureWithSizeRaysPerSampleAttenuationFactorObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(textureSize: SDKHandle, raysPerSample: number, attenuationFactor: number, objectsToConsider: Array<MDLObject>, vertexAttributeName: string, materialPropertyName: string): boolean
Swift declaration
func generateAmbientOcclusionTexture(withSize textureSize: vector_int2, raysPerSample: Int, attenuationFactor: Float, objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String, materialPropertyNamed materialPropertyName: String) -> Bool
method

generateAmbientOcclusionVertexColors

TypeScript
generateAmbientOcclusionVertexColorsWithQualityAttenuationFactorObjectsToConsiderVertexAttributeNamed(bakeQuality: number, attenuationFactor: number, objectsToConsider: Array<MDLObject>, vertexAttributeName: string): boolean
Swift declaration
func generateAmbientOcclusionVertexColors(withQuality bakeQuality: Float, attenuationFactor: Float, objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String) -> Bool
method

generateAmbientOcclusionVertexColors

TypeScript
generateAmbientOcclusionVertexColorsWithRaysPerSampleAttenuationFactorObjectsToConsiderVertexAttributeNamed(raysPerSample: number, attenuationFactor: number, objectsToConsider: Array<MDLObject>, vertexAttributeName: string): boolean
Swift declaration
func generateAmbientOcclusionVertexColors(withRaysPerSample raysPerSample: Int, attenuationFactor: Float, objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String) -> Bool
method

generateLightMapTexture

TypeScript
generateLightMapTextureWithQualityLightsToConsiderObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(bakeQuality: number, lightsToConsider: Array<MDLLight>, objectsToConsider: Array<MDLObject>, vertexAttributeName: string, materialPropertyName: string): boolean
Swift declaration
func generateLightMapTexture(withQuality bakeQuality: Float, lightsToConsider: [MDLLight], objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String, materialPropertyNamed materialPropertyName: String) -> Bool
method

generateLightMapTexture

TypeScript
generateLightMapTextureWithTextureSizeLightsToConsiderObjectsToConsiderVertexAttributeNamedMaterialPropertyNamed(textureSize: SDKHandle, lightsToConsider: Array<MDLLight>, objectsToConsider: Array<MDLObject>, vertexAttributeName: string, materialPropertyName: string): boolean
Swift declaration
func generateLightMapTexture(withTextureSize textureSize: vector_int2, lightsToConsider: [MDLLight], objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String, materialPropertyNamed materialPropertyName: String) -> Bool
method

generateLightMapVertexColorsWithLights

TypeScript
generateLightMapVertexColorsWithLights(lightsToConsider: Array<MDLLight>, objectsToConsider: Array<MDLObject>, vertexAttributeName: string): boolean
Swift declaration
func generateLightMapVertexColorsWithLights(toConsider lightsToConsider: [MDLLight], objectsToConsider: [MDLObject], vertexAttributeNamed vertexAttributeName: String) -> Bool
init

init

TypeScript
static initBoxWithExtentSegmentsInwardNormalsGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(boxWithExtent extent: vector_float3, segments: vector_uint3, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
init

init

TypeScript
static initCapsuleWithExtentCylinderSegmentsHemisphereSegmentsInwardNormalsGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, hemisphereSegments: number, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(capsuleWithExtent extent: vector_float3, cylinderSegments segments: vector_uint2, hemisphereSegments: Int32, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
init

init

TypeScript
static initConeWithExtentSegmentsInwardNormalsCapGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, cap: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(coneWithExtent extent: vector_float3, segments: vector_uint2, inwardNormals: Bool, cap: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
init

init

TypeScript
static initCylinderWithExtentSegmentsInwardNormalsTopCapBottomCapGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, topCap: boolean, bottomCap: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(cylinderWithExtent extent: vector_float3, segments: vector_uint2, inwardNormals: Bool, topCap: Bool, bottomCap: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
init

init

TypeScript
static initHemisphereWithExtentSegmentsInwardNormalsCapGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, cap: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(hemisphereWithExtent extent: vector_float3, segments: vector_uint2, inwardNormals: Bool, cap: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
init

init

TypeScript
static initIcosahedronWithExtentInwardNormalsGeometryTypeAllocator(extent: SDKHandle, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(icosahedronWithExtent extent: vector_float3, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
init

init

TypeScript
static initMeshBySubdividingMeshSubmeshIndexSubdivisionLevelsAllocator(mesh: MDLMesh, submeshIndex: number, subdivisionLevels: number, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(meshBySubdividingMesh mesh: MDLMesh, submeshIndex: Int32, subdivisionLevels: UInt32, allocator: (any MDLMeshBufferAllocator)?)
init

init

TypeScript
static initPlaneWithExtentSegmentsGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(planeWithExtent extent: vector_float3, segments: vector_uint2, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
init

init

TypeScript
static initSphereWithExtentSegmentsInwardNormalsGeometryTypeAllocator(extent: SDKHandle, segments: SDKHandle, inwardNormals: boolean, geometryType: MDLGeometryType, allocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(sphereWithExtent extent: vector_float3, segments: vector_uint2, inwardNormals: Bool, geometryType: MDLGeometryType, allocator: (any MDLMeshBufferAllocator)?)
init · iOS 9.0+

init

TypeScript
static initBufferAllocator(bufferAllocator?: (SDKHandle) | null): MDLMesh
Swift declaration
init(bufferAllocator: (any MDLMeshBufferAllocator)?)
init · iOS 9.0+

init

TypeScript
static initVertexBufferVertexCountDescriptorSubmeshes(vertexBuffer: SDKHandle, vertexCount: number, descriptor: MDLVertexDescriptor, submeshes: Array<MDLSubmesh>): MDLMesh
Swift declaration
init(vertexBuffer: any MDLMeshBuffer, vertexCount: Int, descriptor: MDLVertexDescriptor, submeshes: [MDLSubmesh])
init · iOS 9.0+

init

TypeScript
static initVertexBuffersVertexCountDescriptorSubmeshes(vertexBuffers: Array<SDKHandle>, vertexCount: number, descriptor: MDLVertexDescriptor, submeshes: Array<MDLSubmesh>): MDLMesh
Swift declaration
init(vertexBuffers: [any MDLMeshBuffer], vertexCount: Int, descriptor: MDLVertexDescriptor, submeshes: [MDLSubmesh])
method · iOS 9.0+ · Deprecated in iOS 11.0

makeVerticesUnique

TypeScript
makeVerticesUnique(): void
Swift declaration
func makeVerticesUnique()
method · iOS 11.0+

makeVerticesUniqueAndReturnError

TypeScript
makeVerticesUniqueAndReturnError(): void
Swift declaration
func makeVerticesUniqueAndReturnError() throws
method

removeAttributeNamed

TypeScript
removeAttributeNamed(name: string): void
Swift declaration
func removeAttributeNamed(_ name: String)
method

replaceAttributeNamed

TypeScript
replaceAttributeNamed(name: string, newData: MDLVertexAttributeData): void
Swift declaration
func replaceAttributeNamed(_ name: String, with newData: MDLVertexAttributeData)
method

updateAttributeNamed

TypeScript
updateAttributeNamed(name: string, newData: MDLVertexAttributeData): void
Swift declaration
func updateAttributeNamed(_ name: String, with newData: MDLVertexAttributeData)
method · iOS 9.0+

vertexAttributeData

TypeScript
vertexAttributeDataForAttributeNamed(name: string): (MDLVertexAttributeData) | null
Swift declaration
func vertexAttributeData(forAttributeNamed name: String) -> MDLVertexAttributeData?
method · iOS 9.0+

vertexAttributeData

TypeScript
vertexAttributeDataForAttributeNamedAs(name: string, format: MDLVertexFormat): (MDLVertexAttributeData) | null
Swift declaration
func vertexAttributeData(forAttributeNamed name: String, as format: MDLVertexFormat) -> MDLVertexAttributeData?
get · iOS 9.0+

allocator

TypeScript
get allocator(): SDKHandle
Swift declaration
var allocator: any MDLMeshBufferAllocator { get }
get · iOS 9.0+

boundingBox

TypeScript
get boundingBox(): MDLAxisAlignedBoundingBox
Swift declaration
var boundingBox: MDLAxisAlignedBoundingBox { get }
get · iOS 9.0+

submeshes

TypeScript
get submeshes(): (_Foundation_NSMutableArray) | null
Swift declaration
@NSCopying var submeshes: NSMutableArray? { get set }
set · iOS 9.0+

submeshes

TypeScript
set submeshes(value: (_Foundation_NSMutableArray) | null)
Swift declaration
@NSCopying var submeshes: NSMutableArray? { get set }
get · iOS 9.0+

vertexBuffers

TypeScript
get vertexBuffers(): Array<SDKHandle>
Swift declaration
var vertexBuffers: [any MDLMeshBuffer] { get set }
set · iOS 9.0+

vertexBuffers

TypeScript
set vertexBuffers(value: Array<SDKHandle>)
Swift declaration
var vertexBuffers: [any MDLMeshBuffer] { get set }
get · iOS 9.0+

vertexCount

TypeScript
get vertexCount(): number
Swift declaration
var vertexCount: Int { get set }
set · iOS 9.0+

vertexCount

TypeScript
set vertexCount(value: number)
Swift declaration
var vertexCount: Int { get set }
get · iOS 9.0+

vertexDescriptor

TypeScript
get vertexDescriptor(): MDLVertexDescriptor
Swift declaration
@NSCopying var vertexDescriptor: MDLVertexDescriptor { get set }
set · iOS 9.0+

vertexDescriptor

TypeScript
set 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 →