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
,org.robovm.objc.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 class
MDLMesh.MDLMeshPtr
-
Nested classes/interfaces inherited from class org.robovm.apple.modelio.MDLObject
MDLObject.MDLObjectPtr
-
Nested classes/interfaces inherited from class org.robovm.apple.foundation.NSObject
NSObject.Handle, NSObject.Marshaler, NSObject.NoRetainMarshaler, NSObject.NSKeyValueObserver, NSObject.NSObjectPtr, NSObject.SkipInit
-
-
Field Summary
-
Fields inherited from class org.robovm.apple.foundation.NSObject
FLAG_NO_RETAIN
-
-
Constructor Summary
Constructors Modifier Constructor Description MDLMesh()
MDLMesh(java.util.List<MDLMeshBuffer> vertexBuffers, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)
protected
MDLMesh(NSObject.Handle h, long handle)
protected
MDLMesh(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
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addAttribute(java.lang.String name, MDLVertexFormat format)
void
addAttribute(java.lang.String name, MDLVertexFormat format, java.lang.String type, NSData data, long stride)
void
addAttribute(java.lang.String name, MDLVertexFormat format, java.lang.String type, NSData data, long stride, double time)
void
addNormals(java.lang.String attributeName, float creaseThreshold)
void
addOrthTanBasis(java.lang.String textureCoordinateAttributeName, java.lang.String normalAttributeName, java.lang.String tangentAttributeName)
void
addTangentBasis(java.lang.String textureCoordinateAttributeName, java.lang.String tangentAttributeName, java.lang.String bitangentAttributeName)
void
addTangentBasisWithNormals(java.lang.String textureCoordinateAttributeName, java.lang.String normalAttributeName, java.lang.String tangentAttributeName)
void
addUnwrappedTextureCoordinatesForAttributeNamed(java.lang.String textureCoordinateAttributeName)
void
flipTextureCoordinatesInAttributeNamed(java.lang.String textureCoordinateAttributeName)
boolean
generateAmbientOcclusionTexture(float bakeQuality, float attenuationFactor, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName, java.lang.String materialPropertyName)
boolean
generateAmbientOcclusionTexture(VectorInt2 textureSize, long raysPerSample, float attenuationFactor, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName, java.lang.String materialPropertyName)
boolean
generateAmbientOcclusionVertexColors(float bakeQuality, float attenuationFactor, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName)
boolean
generateAmbientOcclusionVertexColors(long raysPerSample, float attenuationFactor, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName)
boolean
generateLightMapTexture(float bakeQuality, NSArray<MDLLight> lightsToConsider, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName, java.lang.String materialPropertyName)
boolean
generateLightMapTexture(VectorInt2 textureSize, NSArray<MDLLight> lightsToConsider, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName, java.lang.String materialPropertyName)
boolean
generateLightMapVertexColors(NSArray<MDLLight> lightsToConsider, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName)
MDLMeshBufferAllocator
getAllocator()
MDLAxisAlignedBoundingBox
getBoundingBox()
NSMutableArray<MDLSubmesh>
getSubmeshes()
MDLVertexAttributeData
getVertexAttributeData(java.lang.String name)
MDLVertexAttributeData
getVertexAttributeData(java.lang.String name, MDLVertexFormat format)
NSArray<?>
getVertexBuffers()
long
getVertexCount()
MDLVertexDescriptor
getVertexDescriptor()
protected long
init(java.util.List<MDLMeshBuffer> vertexBuffers, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)
protected long
init(VectorFloat3 extent, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
protected long
init(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean topCap, boolean bottomCap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
protected long
init(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean cap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
protected long
init(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
protected long
init(VectorFloat3 extent, VectorInt2 segments, int hemisphereSegments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
protected long
init(VectorFloat3 extent, VectorInt2 segments, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
protected long
init(VectorFloat3 extent, VectorInt3 segments, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
protected long
init(MDLMeshBufferAllocator bufferAllocator)
protected long
init(MDLMeshBuffer vertexBuffer, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)
protected long
init(MDLMesh mesh, int submeshIndex, int subdivisionLevels, MDLMeshBufferAllocator allocator)
protected long
initHemisphereWithExtent(VectorFloat3 extent, VectorInt2 segments, boolean inwardNormals, boolean cap, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
void
makeVerticesUnique()
Deprecated.Deprecated in iOS 11.0.boolean
makeVerticesUniqueAndReturnError(NSError.NSErrorPtr error)
static MDLMesh
newBox(VectorFloat3 dimensions, VectorInt3 segments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator)
static MDLMesh
newCapsuleWithHeight(float height, VectorFloat2 radii, long radialSegments, long verticalSegments, long hemisphereSegments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator)
static MDLMesh
newCylinder(float height, VectorFloat2 radii, long radialSegments, long verticalSegments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator)
static MDLMesh
newEllipsoid(VectorFloat3 radii, long radialSegments, long verticalSegments, MDLGeometryType geometryType, boolean inwardNormals, boolean hemisphere, MDLMeshBufferAllocator allocator)
static MDLMesh
newEllipticalCone(float height, VectorFloat2 radii, long radialSegments, long verticalSegments, MDLGeometryType geometryType, boolean inwardNormals, MDLMeshBufferAllocator allocator)
static MDLMesh
newIcosahedron(float radius, boolean inwardNormals, MDLMeshBufferAllocator allocator)
static MDLMesh
newIcosahedronWithRadius(float radius, boolean inwardNormals, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
static MDLMesh
newPlane(VectorFloat2 dimensions, VectorInt2 segments, MDLGeometryType geometryType, MDLMeshBufferAllocator allocator)
static MDLMesh
newSubdividedMesh(MDLMesh mesh, long submeshIndex, long subdivisionLevels)
void
removeAttributeNamed(java.lang.String name)
void
replaceAttribute(java.lang.String name, MDLVertexAttributeData newData)
void
setSubmeshes(NSMutableArray<MDLSubmesh> v)
void
setVertexBuffers(NSArray<?> v)
void
setVertexCount(long v)
void
setVertexDescriptor(MDLVertexDescriptor v)
void
updateAttribute(java.lang.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, setTransform
-
Methods 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, willChangeValues
-
-
-
-
Constructor Detail
-
MDLMesh
public MDLMesh()
-
MDLMesh
protected MDLMesh(NSObject.Handle h, long handle)
-
MDLMesh
protected MDLMesh(NSObject.SkipInit skipInit)
-
MDLMesh
public MDLMesh(MDLMeshBufferAllocator bufferAllocator)
-
MDLMesh
public MDLMesh(MDLMeshBuffer vertexBuffer, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)
-
MDLMesh
public MDLMesh(java.util.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 Detail
-
getBoundingBox
public MDLAxisAlignedBoundingBox getBoundingBox()
-
getVertexDescriptor
public MDLVertexDescriptor getVertexDescriptor()
-
setVertexDescriptor
public void setVertexDescriptor(MDLVertexDescriptor v)
-
getVertexCount
public long getVertexCount()
-
setVertexCount
public void setVertexCount(long v)
-
getVertexBuffers
public NSArray<?> getVertexBuffers()
-
setVertexBuffers
public void setVertexBuffers(NSArray<?> v)
-
getSubmeshes
public NSMutableArray<MDLSubmesh> getSubmeshes()
-
setSubmeshes
public void setSubmeshes(NSMutableArray<MDLSubmesh> v)
-
getAllocator
public MDLMeshBufferAllocator getAllocator()
-
init
protected long init(MDLMeshBufferAllocator bufferAllocator)
-
init
protected long init(MDLMeshBuffer vertexBuffer, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)
-
init
protected long init(java.util.List<MDLMeshBuffer> vertexBuffers, long vertexCount, MDLVertexDescriptor descriptor, NSMutableArray<MDLSubmesh> submeshes)
-
getVertexAttributeData
public MDLVertexAttributeData getVertexAttributeData(java.lang.String name)
-
getVertexAttributeData
public MDLVertexAttributeData getVertexAttributeData(java.lang.String name, MDLVertexFormat format)
-
addAttribute
public void addAttribute(java.lang.String name, MDLVertexFormat format)
-
addAttribute
public void addAttribute(java.lang.String name, MDLVertexFormat format, java.lang.String type, NSData data, long stride)
-
addAttribute
public void addAttribute(java.lang.String name, MDLVertexFormat format, java.lang.String type, NSData data, long stride, double time)
-
addNormals
public void addNormals(java.lang.String attributeName, float creaseThreshold)
-
addTangentBasis
public void addTangentBasis(java.lang.String textureCoordinateAttributeName, java.lang.String tangentAttributeName, java.lang.String bitangentAttributeName)
-
addTangentBasisWithNormals
public void addTangentBasisWithNormals(java.lang.String textureCoordinateAttributeName, java.lang.String normalAttributeName, java.lang.String tangentAttributeName)
-
addOrthTanBasis
public void addOrthTanBasis(java.lang.String textureCoordinateAttributeName, java.lang.String normalAttributeName, java.lang.String tangentAttributeName)
- Since:
- Available in iOS 11.0 and later.
-
addUnwrappedTextureCoordinatesForAttributeNamed
public void addUnwrappedTextureCoordinatesForAttributeNamed(java.lang.String textureCoordinateAttributeName)
-
flipTextureCoordinatesInAttributeNamed
public void flipTextureCoordinatesInAttributeNamed(java.lang.String textureCoordinateAttributeName)
- Since:
- Available in iOS 11.0 and later.
-
makeVerticesUnique
@Deprecated public void makeVerticesUnique()
Deprecated.Deprecated in iOS 11.0.- Since:
- Available in iOS 9.0 and later.
-
makeVerticesUniqueAndReturnError
public boolean makeVerticesUniqueAndReturnError(NSError.NSErrorPtr error)
- Since:
- Available in iOS 11.0 and later.
-
replaceAttribute
public void replaceAttribute(java.lang.String name, MDLVertexAttributeData newData)
-
updateAttribute
public void updateAttribute(java.lang.String name, MDLVertexAttributeData newData)
-
removeAttributeNamed
public void removeAttributeNamed(java.lang.String name)
-
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
public static MDLMesh newSubdividedMesh(MDLMesh mesh, long submeshIndex, long subdivisionLevels)
-
generateAmbientOcclusionTexture
public boolean generateAmbientOcclusionTexture(VectorInt2 textureSize, long raysPerSample, float attenuationFactor, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName, java.lang.String materialPropertyName)
-
generateAmbientOcclusionTexture
public boolean generateAmbientOcclusionTexture(float bakeQuality, float attenuationFactor, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName, java.lang.String materialPropertyName)
-
generateAmbientOcclusionVertexColors
public boolean generateAmbientOcclusionVertexColors(long raysPerSample, float attenuationFactor, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName)
-
generateAmbientOcclusionVertexColors
public boolean generateAmbientOcclusionVertexColors(float bakeQuality, float attenuationFactor, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName)
-
generateLightMapTexture
public boolean generateLightMapTexture(VectorInt2 textureSize, NSArray<MDLLight> lightsToConsider, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName, java.lang.String materialPropertyName)
-
generateLightMapTexture
public boolean generateLightMapTexture(float bakeQuality, NSArray<MDLLight> lightsToConsider, NSArray<MDLObject> objectsToConsider, java.lang.String vertexAttributeName, java.lang.String materialPropertyName)
-
-