Skip to content

ModelIO iOS xcode9 beta1

Vincent Dondain edited this page Jun 5, 2017 · 1 revision

#ModelIO.framework

diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAnimatedValue.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAnimatedValue.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAnimatedValue.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAnimatedValue.h	2017-05-20 23:52:55.000000000 -0400
@@ -0,0 +1,171 @@
+/*!
+ @header MDLAnimatedValue.h
+ @framework ModelIO
+ @abstract Time sampled transformation of elements in 3d assets
+ @copyright Copyright © 2015 Apple, Inc. All rights reserved.
+ */
+
+
+#import <Foundation/Foundation.h>
+#import <simd/simd.h>
+#import <ModelIO/MDLTypes.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef NS_ENUM(NSUInteger, MDLAnimatedValueInterpolation) {
+    MDLAnimatedValueInterpolationConstant,
+    MDLAnimatedValueInterpolationLinear
+};
+
+typedef NS_ENUM(NSUInteger, MDLDataPrecision) {
+    MDLDataPrecisionUndefined,
+    MDLDataPrecisionFloat,
+    MDLDataPrecisionDouble
+};
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLAnimatedValue : NSObject<MDLNamed, NSCopying>
+-(BOOL)isAnimated;
+@property (nonatomic, readonly) MDLDataPrecision precision;
+@property (nonatomic, readonly) NSUInteger timeSampleCount;
+@property (nonatomic, readonly) NSTimeInterval minimumTime;
+@property (nonatomic, readonly) NSTimeInterval maximumTime;
+@property (nonatomic) MDLAnimatedValueInterpolation interpolation;
+@property (nonatomic, copy) NSString *name;
+
+@property (nonatomic, readonly) NSArray<NSNumber *> *keyTimes;
+
+-(void)clear;
+-(NSUInteger)copyTimesInto:(NSTimeInterval *)timesArray maxCount:(NSUInteger)maxCount;
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLAnimatedScalarArray : MDLAnimatedValue
+
+@property (nonatomic, readonly) NSUInteger elementsCount;
+
+-(id)initWithName:(NSString*)name
+    elementsCount:(NSUInteger)arrayElementCount;
+
+-(void)setFloatArray:(const float *)array count:(NSUInteger)count atTime:(NSTimeInterval)time;
+-(void)setDoubleArray:(const double *)array count:(NSUInteger)count atTime:(NSTimeInterval)time;
+
+-(NSUInteger)copyFloatArrayInto:(float *)array maxCount:(NSUInteger)maxCount atTime:(NSTimeInterval)time;
+-(NSUInteger)copyDoubleArrayInto:(double *)array maxCount:(NSUInteger)maxCount atTime:(NSTimeInterval)time;
+
+-(void)resetWithFloatArray:(const float *)valuesArray count:(NSUInteger)valuesCount atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)timesCount;
+-(void)resetWithDoubleArray:(const double *)valuesArray count:(NSUInteger)valuesCount atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)timesCount;
+
+-(NSUInteger)copyFloatArrayInto:(float *)valuesArray maxCount:(NSUInteger)maxCount;
+-(NSUInteger)copyDoubleArrayInto:(double *)valuesArray maxCount:(NSUInteger)maxCount;
+
+@end
+
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLAnimatedScalar : MDLAnimatedValue
+
+-(id)initWithName:(NSString*)name;
+
+-(void)setFloat:(float)value atTime:(NSTimeInterval)time;
+-(void)setDouble:(double)value atTime:(NSTimeInterval)time;
+
+-(float)floatAtTime:(NSTimeInterval)time;
+-(double)doubleAtTime:(NSTimeInterval)time;
+
+-(void)resetWithFloatArray:(const float *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+-(void)resetWithDoubleArray:(const double *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+
+-(NSUInteger)copyFloatArrayInto:(float *)valuesArray maxCount:(NSUInteger)maxCount;
+-(NSUInteger)copyDoubleArrayInto:(double *)valuesArray maxCount:(NSUInteger)maxCount;
+
+@end
+
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLAnimatedVector2 : MDLAnimatedValue
+
+-(id)initWithName:(NSString*)name;
+
+-(void)setFloat2:(vector_float2)value atTime:(NSTimeInterval)time;
+-(void)setDouble2:(vector_double2)value atTime:(NSTimeInterval)time;
+
+-(vector_float2)float2AtTime:(NSTimeInterval)time;
+-(vector_double2)double2AtTime:(NSTimeInterval)time;
+
+-(void)resetWithFloat2Array:(const vector_float2 *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+-(void)resetWithDouble2Array:(const vector_double2 *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+
+-(NSUInteger)copyFloat2ArrayInto:(vector_float2 *)valuesArray maxCount:(NSUInteger)maxCount;
+-(NSUInteger)copyDouble2ArrayInto:(vector_double2 *)valuesArray maxCount:(NSUInteger)maxCount;
+
+@end
+
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLAnimatedVector3 : MDLAnimatedValue
+
+-(id)initWithName:(NSString*)name;
+
+-(void)setFloat3:(vector_float3)value atTime:(NSTimeInterval)time;
+-(void)setDouble3:(vector_double3)value atTime:(NSTimeInterval)time;
+
+-(vector_float3)float3AtTime:(NSTimeInterval)time;
+-(vector_double3)double3AtTime:(NSTimeInterval)time;
+
+-(void)resetWithFloat3Array:(const vector_float3 *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+-(void)resetWithDouble3Array:(const vector_double3 *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+
+-(NSUInteger)copyFloat3ArrayInto:(vector_float3 *)valuesArray maxCount:(NSUInteger)maxCount;
+-(NSUInteger)copyDouble3ArrayInto:(vector_double3 *)valuesArray maxCount:(NSUInteger)maxCount;
+
+@end
+
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLAnimatedVector4 : MDLAnimatedValue
+
+-(id)initWithName:(NSString*)name;
+
+-(void)setFloat4:(vector_float4)value atTime:(NSTimeInterval)time;
+-(void)setDouble4:(vector_double4)value atTime:(NSTimeInterval)time;
+
+-(vector_float4)float4AtTime:(NSTimeInterval)time;
+-(vector_double4)double4AtTime:(NSTimeInterval)time;
+
+-(void)resetWithFloat4Array:(const vector_float4 *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+-(void)resetWithDouble4Array:(const vector_double4 *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+
+-(NSUInteger)copyFloat4ArrayInto:(vector_float4 *)valuesArray maxCount:(NSUInteger)maxCount;
+-(NSUInteger)copyDouble4ArrayInto:(vector_double4 *)valuesArray maxCount:(NSUInteger)maxCount;
+
+@end
+
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLAnimatedMatrix4x4 : MDLAnimatedValue
+
+-(id)initWithName:(NSString*)name;
+
+-(void)setFloat4x4:(matrix_float4x4)value atTime:(NSTimeInterval)time;
+-(void)setDouble4x4:(matrix_double4x4)value atTime:(NSTimeInterval)time;
+
+-(matrix_float4x4)float4x4AtTime:(NSTimeInterval)time;
+-(matrix_double4x4)double4x4AtTime:(NSTimeInterval)time;
+
+-(void)resetWithFloat4x4Array:(const matrix_float4x4 *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+-(void)resetWithDouble4x4Array:(const matrix_double4x4 *)valuesArray atTimes:(const NSTimeInterval *)timesArray count:(NSUInteger)count;
+
+-(NSUInteger)copyFloat4x4ArrayInto:(matrix_float4x4 *)valuesArray maxCount:(NSUInteger)maxCount;
+-(NSUInteger)copyDouble4x4ArrayInto:(matrix_double4x4 *)valuesArray maxCount:(NSUInteger)maxCount;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAsset.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAsset.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAsset.h	2017-02-17 21:40:37.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAsset.h	2017-05-20 20:34:47.000000000 -0400
@@ -6,6 +6,7 @@
  */
 
 #import <ModelIO/ModelIOExports.h>
+#import <ModelIO/MDLAssetResolver.h>
 #import <ModelIO/MDLObject.h>
 #import <ModelIO/MDLVertexDescriptor.h>
 #import <ModelIO/MDLMeshBuffer.h>
@@ -15,6 +16,8 @@
 @class MDLLightProbe;
 @class MDLTexture;
 
+NS_ASSUME_NONNULL_BEGIN
+
 /*!
  @class MDLAsset
  
@@ -43,7 +46,6 @@
  */
 
 
-NS_ASSUME_NONNULL_BEGIN
 
 NS_CLASS_AVAILABLE(10_11, 9_0)
 MDL_EXPORT
@@ -61,6 +63,21 @@
  */
 - (instancetype)initWithURL:(NSURL *)URL;
 
+
+/*!
+ @method initWithURL:bufferAllocator:preserveIndexing:error
+ @abstract Initialize with contents of URL, preserving indexing in the original file
+ 
+ @discussion Some file formats allow independent indexing of vertex attritutes,
+ for example, there might be more data entries for vertex positions than
+ for normals. The vertex buffers and submesh index buffers will be
+ created exactly as they were in the originating file.
+ */
+- (instancetype)initWithURL:(NSURL *)URL
+            bufferAllocator:(nullable id<MDLMeshBufferAllocator>)bufferAllocator
+           preserveIndexing:(BOOL)preserveIndexing
+                      error:(NSError * __nullable * __nullable)error;
+
 /*!
  @method initWithURL:vertexDescriptor:bufferAllocator:
  @abstract Initialize an MDLAsset using the contents of the resource located at 
@@ -78,7 +95,7 @@
  
              Submeshes will be converted to triangle topology.
   */
-- (instancetype)initWithURL:(NSURL *)URL
+- (instancetype)initWithURL:(nullable NSURL *)URL
            vertexDescriptor:(nullable MDLVertexDescriptor*)vertexDescriptor
             bufferAllocator:(nullable id<MDLMeshBufferAllocator>)bufferAllocator;
 
@@ -109,7 +126,6 @@
            preserveTopology:(BOOL)preserveTopology
                       error:(NSError * __nullable * __nullable)error;
 
-
 /*!
  @method exportAssetToURL:
  @abstract Export an asset to the specified URL.
@@ -189,6 +205,14 @@
 - (NSArray<MDLObject*>*)childObjectsOfClass:(Class)objectClass;
 
 /*!
+ @method loadTextures
+ @abstract Iterates all material properties on all materials. If they are string 
+           values or NSURL values, and can be resolved as textures, then the string 
+           and NSURL values will be replaced by MDLTextureSampler values.
+ */
+- (void)loadTextures;
+
+/*!
  @method boundingBoxAtTime:
  @abstract The bounds of the MDLAsset at the specified time
  */
@@ -229,14 +253,29 @@
 @property (nonatomic, readwrite) NSTimeInterval endTime;
 
 /*!
+ @property upAxis
+ @abstract Scene up axis
+ @discussion Some imported formats specify a scene up axis. By default Y-axis (0, 1, 0) is used
+ but other values are supported.
+ */
+@property (nonatomic, readwrite) vector_float3 upAxis;
+
+/*!
  @property URL
  @abstract URL used to create the asset
- @discussion If no animation data was specified by resource or resource incapable 
-             of specifying animation data, this value defaults to 0
+ @discussion If the asset was not created with a URL, nil will be returned.
  */
 @property (nonatomic, readonly, retain, nullable) NSURL *URL;
 
 /*!
+ @property AssetResolver
+ @abstract Resolver asset that helps find associated files
+ @discussion The default asset resolver is the RelativeAssetResolver
+ */
+@property (nonatomic, retain, nullable) id<MDLAssetResolver> resolver;
+
+
+/*!
  @property bufferAllocator
  @abstract  Allocator used to create vertex and index buffers
  */
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAssetResolver.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAssetResolver.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAssetResolver.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLAssetResolver.h	2017-05-20 23:52:55.000000000 -0400
@@ -0,0 +1,75 @@
+/*!
+ @header MDLAssetResolver.h
+ @framework ModelIO
+ @abstract Structures for representing contents of 3d model files
+ @copyright Copyright © 2017 Apple, Inc. All rights reserved.
+ */
+
+#import <ModelIO/ModelIOExports.h>
+#import <Foundation/Foundation.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+@protocol MDLAssetResolver <NSObject>
+
+- (BOOL)canResolveAssetNamed:(NSString*)name;
+- (NSURL*)resolveAssetNamed:(NSString*)name;
+
+@end
+
+@class MDLAsset;
+
+/*!
+ @class MDLRelativeAssetResolver
+ 
+ @abstract The relative asset resolver searches for referenced files
+ by checking the location of the asset for sibling files
+ satisfying the requested name.
+ */
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLRelativeAssetResolver : NSObject <MDLAssetResolver>
+
+- (instancetype)initWithAsset:(MDLAsset*)asset;
+
+@property (nonatomic, readwrite, weak) MDLAsset *asset;
+
+@end
+
+/*!
+ @class MDLPathAssetResolver
+ 
+ @abstract The path asset resolver searches for referenced files
+ by prepending path.
+ 
+ @discussion Path should resolve to a well formed URI. A file system
+ path might take the form @"file:///path/to/all/assets/
+ 
+ A trailing slash is automatically appended to path if
+ not provided.
+ */
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLPathAssetResolver : NSObject <MDLAssetResolver>
+
+- (instancetype)initWithPath:(NSString*)path;
+
+@property (nonatomic, readwrite, copy) NSString *path;
+
+@end
+
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLBundleAssetResolver : NSObject <MDLAssetResolver>
+
+- (instancetype)initWithBundle:(NSString*)path;
+
+@property (nonatomic, readwrite, copy) NSString *path;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLCamera.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLCamera.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLCamera.h	2016-07-28 17:16:58.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLCamera.h	2017-05-20 23:58:41.000000000 -0400
@@ -108,7 +108,7 @@
  
     @property fieldOfView
  
-    The field of view is calcualted from the focal length and sensor aperture.
+    The field of view is calculated from the focal length and sensor aperture.
     Changing the field of view will update the focalLength property with respect 
     to the sensor aperture. The default is 54 degrees, corresponding to a focal 
     length of 50mm, and a vertical sensor aperture of 24mm.
@@ -192,7 +192,7 @@
     lens. This is useful in certain calculations, such as shadow or reflection
     projections, as well as to provide vergence in a parallel stereoscopic camera.
 
- 5. Exposure
+ 7. Exposure
  
     Finally, the sensor values need to be converted for display.
  
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLLight.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLLight.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLLight.h	2016-07-30 20:19:10.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLLight.h	2017-05-20 20:34:47.000000000 -0400
@@ -119,6 +119,18 @@
 
 -(void)generateCubemapFromLight:(NSUInteger)textureSize;
 
+/*!
+ @method generateTexture
+ @abstract
+ Generate an IES compliant MDLTexture
+ 1D when the number of horizontal angles is one and the innerConeAngle is < 180
+ 2D when the previous statement fails and innerConeAngle < 89
+ 3D in all other cases
+ the parameter textureSize is the size in pixels of the texture image. For a size of N,
+ 1D generates an Nx1 image, 2D generates an NxN image, 3D generates an Nx(N*6) image (i.e. cubemap).
+ */
+-(MDLTexture*)generateTexture:(NSUInteger)textureSize;
+
 @property (nonatomic, retain, nullable, readonly) MDLTexture *lightCubeMap;
 
 @property (nonatomic, readonly) NSUInteger sphericalHarmonicsLevel;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMaterial.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMaterial.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMaterial.h	2016-10-28 19:02:11.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMaterial.h	2017-05-20 23:58:41.000000000 -0400
@@ -14,6 +14,7 @@
 #import <ModelIO/ModelIOExports.h>
 #import <ModelIO/MDLTypes.h>
 #import <ModelIO/MDLTransform.h>
+#import <ModelIO/MDLAssetResolver.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -236,7 +237,7 @@
 - (void)setProperties:(MDLMaterialProperty *)property;
 
 @property (nonatomic, assign) MDLMaterialSemantic semantic;
-@property (nonatomic, readonly) MDLMaterialPropertyType type;
+@property (nonatomic, assign) MDLMaterialPropertyType type;
 
 /** @see MDLNamed */
 @property (nonatomic, copy) NSString *name;
@@ -365,14 +366,31 @@
 
 - (void)setProperty:(MDLMaterialProperty*)property;
 - (void)removeProperty:(MDLMaterialProperty*)property;
+
 - (nullable MDLMaterialProperty*)propertyNamed:(NSString*)name;
+
 // Returns the first occurence of the property that matches the semantic.
 // Not recommended to use when there are multiple properties with same semantic.
 - (nullable MDLMaterialProperty*)propertyWithSemantic:(MDLMaterialSemantic)semantic;
+
 // Returns the complete list of properties that match the semantic (e.g. Kd & Kd_map)
 - (NSArray<MDLMaterialProperty *> *)propertiesWithSemantic:(MDLMaterialSemantic)semantic;
 - (void)removeAllProperties;
 
+// Iterates all material properties. If they are string values, they are resolved into
+// valid paths as NSURL values.
+// @param resolver If non-nil, the resolver can be invoked to convert stringValues
+//                 to NSURLs for loading.
+- (void)resolveTexturesWithResolver:(id<MDLAssetResolver>)resolver;
+
+// Iterates all material properties. If they are string values or NSURL values, and
+// can be resolved as textures, then the string and NSURL values will be replaced by
+// MDLTextureSampler values. The transforms on the samplers will be identity, the
+// wrap modes will be clamp, and the filter modes will be linear.
+// @param resolver If non-nil, the resolver can be invoked to convert stringValues
+//                 to NSURLs for loading.
+- (void)loadTexturesUsingResolver:(id<MDLAssetResolver>)resolver;
+
 @property (nonatomic, readonly, retain) MDLScatteringFunction *scatteringFunction;
 
 /** @see MDLNamed */
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMesh.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMesh.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMesh.h	2017-02-17 21:43:16.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMesh.h	2017-05-20 23:52:55.000000000 -0400
@@ -8,9 +8,12 @@
 #import <ModelIO/MDLTypes.h>
 #import <ModelIO/MDLLight.h>
 #import <ModelIO/MDLTransform.h>
+#import <ModelIO/MDLPrimitive.h>
 #import <ModelIO/MDLSubmesh.h>
 #import <ModelIO/MDLMeshBuffer.h>
 #import <ModelIO/MDLVertexDescriptor.h>
+#import <ModelIO/MDLSkinDeformer.h>
+#import <ModelIO/MDLMorphDeformer.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
@@ -138,11 +141,11 @@
 /*!
  @property vertexCount
  @abstract Number of vertices in the vertexBuffers
- @discussion The size of vertex data in each buffer can be computed by multiplying
-             this value with the stride of the buffer in the vertexDescriptor's
-             layout
+ @discussion This value is valid only if the mesh was initialized
+             with an explicit vertex count
  */
-@property (nonatomic, readwrite) NSUInteger vertexCount;
+@property (nonatomic, readwrite) NSUInteger vertexCount
+                                    NS_DEPRECATED(10.11,10.13,9.0,11.0);
 
 /*!
  @property vertexBuffers
@@ -221,7 +224,7 @@
 /*!
  @method addNormalsWithAttributeNamed:creaseThreshold:
  @abstract Calculate and add vertex normal data
- @param attributeName Name of vertex normal attribute.  If nil, vertex normals
+ the first parameter attributeName is the attribute name of vertex normal attribute.  If nil, vertex normals
         will be added with the MDLVertexAttributeNormal name string
  @param creaseThreshold Threshold of the dot product between the 2 triangles after which
                         their face normal will be smoothed out. Therefore, a threshold of 0 will
@@ -238,35 +241,53 @@
 
 /*!
  @method addTangentBasisForTextureCoordinateAttributeNamed:tangentAttributeNamed:bitangentAttributeNamed
- @abstract Create tangent basis data
- @param textureCoordinateAttributeName texture coordinates to use in calculations
- @param tangentAttributeNamed Name of vertex tangent attribute.
- @param bitangentAttributeNamed Name of vertex bitangent attribute.
+ @abstract Create a shader basis where the tangent and bitangent span the uv -> object space transform
+ the first parameter textureCoordinateAttributeNamed texture coordinates to use in calculations
+ the second parameter tangentAttributeNamed is the name of vertex tangent attribute.
+ the third parameter bitangentAttributeNamed is the name of vertex bitangent attribute.
  @discussion Uses the attribute named MDLVertexAttributePosition and
              textureCoordinateAttributeName to calculate tangent and bitangent
              attributes. The mesh's vertexDescriptor will be updated to reflect
-             the new attributes if necessary.
+             the new attributes if necessary. The basis may not be orthogonal; to gaurantee an orthogonal
+              tangent basis please use addOrthTanBasisForTextureCoordinateAttibuteNamed selector.
  */
 - (void)addTangentBasisForTextureCoordinateAttributeNamed:(NSString*)textureCoordinateAttributeName
-                                    tangentAttributeNamed:(NSString *)tangentAttributeNamed
+                                    tangentAttributeNamed:(NSString *)tangentAttributeName
                                   bitangentAttributeNamed:(nullable NSString *)bitangentAttributeName;
 
 /*!
  @method addTangentBasisForTextureCoordinateAttributeNamed:normalAttributeNamed:tangentAttributeNamed
- @abstract Create tangent basis data
+ @abstract Create tangents which are orthogonal to the normal
  @param textureCoordinateAttributeName texture coordinates to use in calculations
- @param normalAttributeNamed normals to use in calculations
+ @param normalAttributeName normals to use in calculations
  @param tangentAttributeName Name of a four component vertex tangent attribute.
  @discussion Uses the attribute named MDLVertexAttributePosition and
              textureCoordinateAttributeName and the specified normals to calculate
              tangent information. The mesh's vertexDescriptor will be updated to
              reflect the new attribute if necessary.
-             Note that the bitangent can be calculated from the normal and
-             tangent by B = (N x T) * T.w
+             Note that this method does NOT produce a T.w component which is used in B = (N x T) * T.w
+             Please use addOrthTanBasisForTextureCoordinateAttributeNamed.
  */
 - (void)addTangentBasisForTextureCoordinateAttributeNamed:(NSString*)textureCoordinateAttributeName
-                                     normalAttributeNamed:(NSString*)normalAttributeNamed
-                                    tangentAttributeNamed:(NSString *)tangentAttributeNamed;
+                                     normalAttributeNamed:(NSString*)normalAttributeName
+                                    tangentAttributeNamed:(NSString *)tangentAttributeName;
+
+/*
+@method addOrthTanBasisForTextureCoordinateAttributeNamed:normalAttributeNamed:tangentAttributeNamed
+@abstract Create an orthonormal tangent basis with tangent specified
+@param textureCoordinateAttributeName texture coordinates to use in calculations
+@param normalAttributeName normals to use in calculations
+@param tangentAttributeName Name of a three/four component vertex tangent attribute.
+@discussion Uses the attribute named MDLVertexAttributePosition and
+            textureCoordinateAttributeName and the specified normals to calculate
+            tangent information. The mesh's vertexDescriptor will be updated to
+            reflect the new attribute if necessary.
+            Note that the bitangent can be calculated from the normal and
+            tangent by B = (N x T) * T.w
+*/
+- (void)addOrthTanBasisForTextureCoordinateAttributeNamed:(NSString *)textureCoordinateAttributeName
+                                     normalAttributeNamed:(NSString *)normalAttributeName
+                                    tangentAttributeNamed:(NSString *)tangentAttributeName;
 
 /*!
  @method addTextureCoordinatesForAttributeNamed:textureCoordinateAttributeName
@@ -277,6 +298,20 @@
  */
 - (void)addUnwrappedTextureCoordinatesForAttributeNamed:(NSString*)textureCoordinateAttributeName;
 
+
+/*!
+ @method flipTextureCoordinatesInAttributeNamed:
+ @abstract Flips texture coordinates by performing the operation (u,v) = (u, 1-v)
+ @param textureCoordinateAttributeName texture coordinates to modify
+ @discussion Many application generate model files with texture coordinate mapping
+             assuming a bottom left bitmap origin. It can be more convenient to
+             have texture coordinates corresponding to an upper left bitmap origin.
+             This selector will perform the flip operation if the requested texture
+             coordinate attribute exists on the mesh. An exception will be raised if
+             the attribute cannot be found
+ */
+- (void)flipTextureCoordinatesInAttributeNamed:(NSString*)textureCoordinateAttributeName;
+
 /*!
  @method makeVerticesUnique:
  @abstract Deindexes the vertex array
@@ -284,7 +319,17 @@
              vertices so faces do not share vertices. The vertex buffer and index
              buffers on submeshes may grow to accomadate any vertices added.
  */
-- (void)makeVerticesUnique;
+- (void)makeVerticesUnique NS_DEPRECATED(10.11,10.13,9.0,11.0);
+
+
+/*!
+ @method makeVerticesUniqueAndReturnError:
+ @abstract Deindexes the vertex array
+ @discussion If any vertices are shared on multiple faces, duplicate those
+ vertices so faces do not share vertices. The vertex buffer and index
+ buffers on submeshes may grow to accomadate any vertices added.
+ */
+- (BOOL)makeVerticesUniqueAndReturnError:(NSError **)error;
 
 /*!
  @method replaceAttributeNamed:withData
@@ -299,7 +344,7 @@
 /*!
  @method updateAttributeNamed:withData
  @abstract update existing attribute data with new attribute data retaining
- the format of the exisitng data.
+ the format of the existing data.
  @discussion If the specified attribute does not already exist, it will be
  created with the same format as the newData.
  */
@@ -410,32 +455,35 @@
  @abstract Factory method for generating a mesh with a capsule shape; a cylinder
            with hemispheres for caps.
  @return MDLMesh capsule with desired attributes
+ @param extent Dimension of bounding box for capsule.
  @param hemisphereSegments Number of slices through hemisphere caps along Y axis
  @param geometryType Must be MDLGeometryTypeTriangles or MDLGeometryTypeLines
  @param inwardNormals Normals point toward center of cylinder
  @param allocator A mesh buffer allocator used to allocate memory to back buffers
         for the returned mesh.  If nil, a default allocator will be used
- @discussion Center of cylinder at (0, 0, 0) with a top at +Y and bottom at -Y.
-             Specifying equal X and Z radia will generate a true cylinder.
-             Specifying a height of 0.0 and verticalSegments of 0 will generate
-             a sphere. Height controls the size of the cylinder, the full height
+ @discussion Center of capsule at (0, 0, 0) with a top at +Y and bottom at -Y.
+             The height of hemisphere cap is specified by the minimum of X and Z
+             Specifying equal X and Z radii will generate a true capsule.
+             Specifying a height that is less than the twice of min of the X and Z 
+             radii or verticalSegments of 0 will generate a sphere. The full height
              of the capsule will also incorporate the hemisphere caps.
-            Will raise an exception if radialSegments is < 3 or if an unsupported
-            geometry type is passed in.
-            Generated texture coordinates are laid out as follows:
+             Will raise an exception if radialSegments is < 3 or if hemisphereSegments < 1
+             or if an unsupported geometry type is specified.
+             Generated texture coordinates for top and bottom caps are wrapped 
+             in a similar manner as for asphere, laid out as follows:
                                       ___
                                      /   \   <- T texcoord = 0.0
  Texture for top of cylinder   ---> [-----]
-                                    [     ]  <- T texcoord = 0.3333
+                                    [     ]  <- T texcoord = extent.x/extent.y
                                     [     ]
  Texture for sides of cylinder ---> [     ]
-                                    [_____]  <- T texcoord = 0.6666
+                                    [_____]  <- T texcoord = 1.0 - extent.x/extent.y
  Texture for base of cylinder  ---> [     ]
                                      \___/   <- T texcoord = 1.0
 */
 - (instancetype)initCapsuleWithExtent:(vector_float3)extent
                      cylinderSegments:(vector_uint2)segments
-                   hemisphereSegments:(int)hemisphereSegments
+                   hemisphereSegments:(NSUInteger)hemisphereSegments
                         inwardNormals:(BOOL)inwardNormals
                          geometryType:(MDLGeometryType)geometryType
                             allocator:(nullable id<MDLMeshBufferAllocator>)allocator;
@@ -501,6 +549,24 @@
                                 allocator:(nullable id<MDLMeshBufferAllocator>)allocator;
 
 /*!
+ @method initMeshByPrimitive:segments:inwardNormals:geometryType:allocator
+ @abstract Factory method for generating a mesh from primitive
+ @return MDLMesh primitive mesh with desired attributes
+ @param segments Number of segements in the X, Y and Z dimensions
+ @param geometryType Can be MDLGeometryTypeLines, MDLGeometryTypeQuads, or MDLGeometryTypeTriangles
+ @param inwardNormals Generated normals will face towards the center of the mesh
+ @param allocator A mesh buffer allocator used to allocate memory to back buffers
+ for the returned mesh.  If nil, a default allocator will be used
+ @discussion Creates an mesh with center at (0, 0, 0). The primitive's radius, height,
+             length will be used as extent for X Y Z dimension accordingly.
+ */
+- (instancetype)initMeshWithPrimitive:(MDLPrimitive*)primitive
+                             segments:(vector_uint3)segments
+                        inwardNormals:(BOOL)inwardNormals
+                         geometryType:(MDLGeometryType)geometryType
+                            allocator:(nullable id<MDLMeshBufferAllocator>)allocator;
+
+/*!
  @method initMeshBySubdividingMesh:submeshIndex:subdivisionLevels:allocator
  @abstract Factory method that generates a subdivided mesh from a source mesh
  @param mesh Mesh from which to generate a subdivided mesh
@@ -565,6 +631,11 @@
 + (instancetype)newIcosahedronWithRadius:(float)radius
                            inwardNormals:(BOOL)inwardNormals
                                allocator:(nullable id<MDLMeshBufferAllocator>)allocator;
++ (nullable instancetype)newMeshWithPrimitive:(MDLPrimitive*)primitive
+                                     segments:(vector_uint3)segments
+                                inwardNormals:(BOOL)inwardNormals
+                                 geometryType:(MDLGeometryType)geometryType
+                                  allocator:(nullable id<MDLMeshBufferAllocator>)allocator;
 + (nullable instancetype)newSubdividedMesh:(MDLMesh*)mesh
                               submeshIndex:(NSUInteger)submeshIndex
                          subdivisionLevels:(NSUInteger)subdivisionLevels;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMeshBuffer.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMeshBuffer.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMeshBuffer.h	2016-09-23 20:51:26.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMeshBuffer.h	2017-05-20 23:25:23.000000000 -0400
@@ -261,6 +261,7 @@
 /*!
  An allocator to use when backing with an NSData is appropriate.
  */
+NS_CLASS_AVAILABLE(10_11, 9_0)
 MDL_EXPORT
 @interface MDLMeshBufferDataAllocator: NSObject <MDLMeshBufferAllocator>
 
@@ -269,6 +270,8 @@
 /*!
  A default zone that can be use for convenience 
  */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
 @interface MDLMeshBufferZoneDefault : NSObject <MDLMeshBufferZone>
 
 @property (nonatomic, readonly) NSUInteger capacity;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMorphDeformer.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMorphDeformer.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMorphDeformer.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLMorphDeformer.h	2017-05-20 23:52:55.000000000 -0400
@@ -0,0 +1,72 @@
+/*!
+ @header MDLSkinDeformer.h
+ @framework ModelIO
+ @abstract Structures for describing mesh blend shapes
+ @copyright Copyright © 2016 Apple, Inc. All rights reserved.
+ */
+
+#pragma once
+
+#import <ModelIO/MDLTransform.h>
+#import <ModelIO/MDLAnimatedValue.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MDLMesh;
+
+/*!
+ @protocol MDLMorphDeformerComponent
+ @abstract A blend shape deformer stores an array of shapeSets that contain the target shape(s),
+ and an array of blend weights that control the final shape
+ @discussion A blend shape deformer applies the difference between target shape and base geometry,
+ scaled by the shapeSetWeight, on top of the base geometry.
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@protocol MDLMorphDeformerComponent <MDLComponent>
+@required
+
+// these are target shapes to blend in-between
+@property (nonatomic, readonly) NSArray<MDLMesh *> *targetShapes;
+
+// the weights at which the (in-between) target shapes are placed (0..1).
+// Can be NULL if every shape set contains only one target shape.
+@property (nonatomic, readonly) NSArray<NSNumber *> *shapeSetTargetWeights;
+
+// the weights at which the target shapes are placed (0..1)
+// Can be NULL if every shape set contains only one target shape.
+@property (nonatomic, readonly) NSArray<NSNumber *> *shapeSetTargetCounts;
+
+// the effect of each target shape set can be controlled by a weight in the range 0..1. Animated property
+@property (nonatomic, readonly) MDLAnimatedScalarArray *weights;
+
+@end
+
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLMorphDeformer : NSObject<NSCopying, MDLMorphDeformerComponent>
+
+@property (nonatomic, readonly) NSArray<MDLMesh *> *targetShapes;
+
+@property (nonatomic, readonly) MDLAnimatedScalarArray *weights;
+
+-(instancetype) initWithTargetShapes:(NSArray<MDLMesh *> *)targetShapes
+               shapeSetTargetWeights:(NSArray<NSNumber *> * _Nullable)shapeSetTargetWeights
+                shapeSetTargetCounts:(NSArray<NSNumber *> * _Nullable)targetCountsCount;
+
+-(instancetype) initWithTargetShapes:(NSArray<MDLMesh *> *)targetShapes
+               shapeSetTargetWeights:(const float * _Nullable)shapeSetTargetWeights
+                               count:(NSUInteger)targetWeightsCount
+                shapeSetTargetCounts:(const unsigned int * _Nullable)targetCountsCount
+                               count:(NSUInteger)targetCountsCount;
+
+-(NSUInteger)copyShapeSetTargetWeightsInto:(float *)array
+                                  maxCount:(NSUInteger)maxCount;
+
+-(NSUInteger)copyShapeSetTargetCountsInto:(unsigned int *)array
+                                 maxCount:(NSUInteger)maxCount;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLObject.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLObject.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLObject.h	2017-02-17 20:59:22.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLObject.h	2017-05-20 23:58:41.000000000 -0400
@@ -8,10 +8,12 @@
 
 #import <ModelIO/MDLTypes.h>
 #import <ModelIO/MDLTransform.h>
+#import <ModelIO/MDLPrimitive.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
 @protocol MDLTransformComponent;
+@protocol MDLPrimitiveComponent;
 /*!
  @class MDLObject
  @abstract Base class for object in a ModelIO asset hierarchy
@@ -114,6 +116,16 @@
 @property (nonatomic, nullable, retain) id<MDLTransformComponent> transform;
 
 /*!
+ @property primitive
+ @abstract Short hand property for the MDLPrimitiveComponent.
+ @discussion The default value is nil
+ 
+ @see MDLPrimitiveComponent
+ */
+@property (nonatomic, nullable, retain) id<MDLPrimitiveComponent> primitive;
+
+
+/*!
  @property children
  @abstract Short hand property for the MDLObjectContainerComponent.
  @discussion The default value is nil
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLPrimitive.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLPrimitive.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLPrimitive.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLPrimitive.h	2017-05-20 23:52:55.000000000 -0400
@@ -0,0 +1,59 @@
+/*!
+ @header MDLPrimitive.h
+ @framework ModelIO
+ @abstract Primitives for Model IO
+ @copyright Copyright © 2016 Apple, Inc. All rights reserved.
+ */
+
+#import <ModelIO/MDLObject.h>
+#import <ModelIO/MDLTypes.h>
+#import <Foundation/Foundation.h>
+#include <simd/simd.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MDLObject;
+
+typedef NS_ENUM (NSUInteger, MDLPrimitiveType) {
+    MDLPrimitiveTypeCube,
+    MDLPrimitiveTypeSphere,
+    MDLPrimitiveTypeCone,
+    MDLPrimitiveTypeCapsule,
+    MDLPrimitiveTypeCylinder,
+    MDLPrimitiveTypeNone
+};
+
+/** MDLPrimitiveComponent
+ @summary a container for different types of primitves supported by 3D softwares
+ @discussion current primitives supports usd primitives
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@protocol MDLPrimitiveComponent <MDLComponent>
+@required
+@property (nonatomic, readwrite) MDLPrimitiveType primitiveType;
+@end
+/**
+ Concrete implementation of <MDLPrimitiveComponent>.
+ @summary initialization for the MDLPrimitve 
+ */
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLPrimitive : NSObject <NSCopying, MDLPrimitiveComponent>
+
+
+
+- (instancetype)initWithPrimitiveType:(MDLPrimitiveType) primitiveType NS_DESIGNATED_INITIALIZER;
+- (instancetype)initWithPrimitiveType:(MDLPrimitiveType) primitiveType
+                               radius:(float)radius
+                               height:(float)height
+                               length:(float)length;
+@property (nonatomic, readwrite) float radius;
+@property (nonatomic, readwrite) float height;
+@property (nonatomic, readwrite) float length;
+
+@end
+
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLSkinDeformer.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLSkinDeformer.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLSkinDeformer.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLSkinDeformer.h	2017-05-20 23:52:55.000000000 -0400
@@ -0,0 +1,54 @@
+/*!
+ @header MDLSkinDeformer.h
+ @framework ModelIO
+ @abstract Structure for describing mesh skinning
+ @copyright Copyright © 2016 Apple, Inc. All rights reserved.
+ */
+
+#pragma once
+
+#import <Foundation/Foundation.h>
+#import <ModelIO/MDLTransform.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MDLMesh;
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@protocol MDLSkinDeformerComponent <MDLComponent>
+@required
+
+// Path names of each joint the target mesh is bound to by the skin deformer
+@property (nonatomic, readonly) NSArray<NSString *> *jointPaths;
+
+ // Type: NSData of matrix_float4x4
+@property (nonatomic, readonly) NSData *jointBindTransforms;
+
+// World space transform of the target mesh bound by the skin deformer
+@property (nonatomic, readonly) matrix_float4x4 meshBindTransform;
+
+-(NSUInteger) copyJointBindTransformsInto:(matrix_float4x4 *)jointBindTransformsArray
+                                 maxCount:(NSUInteger)maxCount;
+@end
+
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLSkinDeformer : NSObject<NSCopying, MDLSkinDeformerComponent>
+
+@property (nonatomic, readonly) NSArray<NSString *> *jointPaths;
+@property (nonatomic, readonly) NSData *jointBindTransforms;
+@property (nonatomic, readonly) matrix_float4x4 meshBindTransform;
+
+-(instancetype) initWithJointPaths:(NSArray<NSString *> *)jointPaths
+               jointBindTransforms:(const matrix_float4x4 *)jointBindTransforms
+                             count:(NSUInteger)jointBindTransformsCount
+                 meshBindTransform:(matrix_float4x4)meshBindTransform;
+
+-(NSUInteger) copyJointBindTransformsInto:(matrix_float4x4 *)jointBindTransformsArray
+                                 maxCount:(NSUInteger)maxCount;
+@end
+
+NS_ASSUME_NONNULL_END
+
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLSubmesh.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLSubmesh.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLSubmesh.h	2016-10-28 19:01:50.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLSubmesh.h	2017-05-20 23:28:29.000000000 -0400
@@ -151,6 +151,30 @@
                     topology:(nullable MDLSubmeshTopology *)topology;
 
 /*!
+ @method initWithIndexBuffer:indexCount:indexType:faceIndexing:faceTopologyBuffer:geometryType:material:
+ @abstract Initialize submesh with all data necessary to make properties valid
+ 
+ @discussion The geometry type will typically be MDLGeometryTypeVariableTopology,
+             if other types are used the faceTopologyBuffer contents should reflect that.
+             faceIndexing may be nil. If it is not nil, it describes per-vertex index packing.
+             per-vertex index packing allows different indices per vertex attribute. As an
+             example, a triangle may have three different positions, but one normal shared on
+             all corners. If positions and normals are in vertex buffers 0 and 2 respectively,
+             then faceIndexing would contain @[0, 2]. If buffer zero contains three positions, and
+             buffer 2 contains one normal, the index buffer might contain [0,0, 1,0, 2,0].
+             At the moment, only variable topology and associated topology buffer are supported
+             in this way.
+ */
+- (instancetype)initWithName:(NSString *)name
+                 indexBuffer:(id<MDLMeshBuffer>)indexBuffer
+                  indexCount:(NSUInteger)indexCount
+                   indexType:(MDLIndexBitDepth)indexType
+                faceIndexing:(nullable NSArray<NSNumber*>*)faceIndexing
+                geometryType:(MDLGeometryType)geometryType
+                    material:(nullable MDLMaterial *)material
+                    topology:(nullable MDLSubmeshTopology *)topology;
+
+/*!
  @method initWithMDLSubmesh:indexType:geometryType:
  @abstract Initialize submesh using another submesh as input.
  @discussion the resulting submesh will have a new index type if necessary.
@@ -207,6 +231,15 @@
 @property (nonatomic, retain, nullable) MDLSubmeshTopology *topology;
 
 /*!
+ @property faceIndexing
+ @abstract If face vertices have independently indexed attributes, this property is not nil
+ 
+ @discussion see discussion for initWithIndexBuffer:indexCount:indexType:faceIndexing:faceTopologyBuffer:geometryType:material:
+*/
+
+@property (nonatomic, retain, nullable) NSArray<NSNumber*> *faceIndexing;
+
+/*!
  @property name
  @abstract Identifying name for this object
  */
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLTexture.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLTexture.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLTexture.h	2016-10-28 21:56:57.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLTexture.h	2017-05-20 23:28:29.000000000 -0400
@@ -36,6 +36,7 @@
     MDLTextureChannelEncodingUInt32 = 4,
     MDLTextureChannelEncodingUint32 = 4,
     MDLTextureChannelEncodingFloat16 = 0x102,
+    MDLTextureChannelEncodingFloat16SR = 0x302,
     MDLTextureChannelEncodingFloat32 = 0x104,
 };
 
@@ -120,13 +121,20 @@
              channelEncoding:(MDLTextureChannelEncoding)channelEncoding
                       isCube:(BOOL)isCube NS_DESIGNATED_INITIALIZER;
 
-/** writeToURL, deducing type from path extension */
+/** write a texture to URL, deducing type from path extension */
 - (BOOL)writeToURL:(NSURL *)URL;
 
-/** writeToURL using a specific UT type */
+/** write a particular level of a mipped texture to URL, deducing type from path extension */
+- (BOOL)writeToURL:(NSURL *)URL level:(NSUInteger)level;
+
+/** write a texture to URL, using a specific UT type */
 - (BOOL)writeToURL:(NSURL *)nsurl type:(CFStringRef)type;
 
+/** write a particular level of a mipped texture to URL, using a specific UT type */
+- (BOOL)writeToURL:(NSURL *)nsurl type:(CFStringRef)type level:(NSUInteger)level;
+
 - (nullable CGImageRef)imageFromTexture;
+- (nullable CGImageRef)imageFromTextureAtLevel:(NSUInteger)level;
 
 - (nullable NSData *)texelDataWithTopLeftOrigin;
 - (nullable NSData *)texelDataWithBottomLeftOrigin;
@@ -218,7 +226,17 @@
            replacement should occur. Negative values are below the horizon.
 
  @property groundColor If this value is set, the environment will be replaced with
-           the color below the horizonElevation value.
+           the color below the horizonElevation value blended with the w factor up to
+           Pi/2.0 past the horizon.
+           (e.g. w = 0.0 groundColor is applied immediatly on the horizon with no blend
+                 w = Pi/2 groundColor is linearly applied all the way to the south pole)
+           NOTE: To maintain default behavior a simple length(groundColor) != 0 is used to determine
+                 if we want to set the ground color (e.g. black and blended immediatly
+                 on the horizon use (0.0, 0.0, 0.0, 0.0000001))
+           4 component treats the first 3 components as color and w as blend factor
+           3 component treats the first 3 components as color and 0 as blend factor
+           2 component treats the first component as greyscale color and y as blend factor
+           1 component treats the scalar component as greyscale color and 0 as blend factor
  
  @property gamma Modifies the amount of gamma correction applied during
            tone mapping.
@@ -247,6 +265,15 @@
    upperAtmosphereScattering:(float)upperAtmosphereScattering // how intense the sun looks, 0 to 1
                 groundAlbedo:(float)groundAlbedo;             // how much sky color is reflected from the Earth
 
+- (instancetype)initWithName:(nullable NSString*)name
+             channelEncoding:(MDLTextureChannelEncoding)channelEncoding
+           textureDimensions:(vector_int2)textureDimensions   // the size of one cube face
+                   turbidity:(float)turbidity                 // the clearness of the sky
+                sunElevation:(float)sunElevation              // from 0 to 1 zenith to nadir
+                  sunAzimuth:(float)sunAzimuth                // from 0 to 2Pi
+   upperAtmosphereScattering:(float)upperAtmosphereScattering // how intense the sun looks, 0 to 1
+                groundAlbedo:(float)groundAlbedo;             // how much sky color is reflected from the Earth
+
 /**
  Call updateTexture if parameters have been changed and a new sky is required.
  */
@@ -254,6 +281,7 @@
 
 @property (nonatomic, assign) float turbidity;
 @property (nonatomic, assign) float sunElevation;
+@property (nonatomic, assign) float sunAzimuth;
 @property (nonatomic, assign) float upperAtmosphereScattering;
 @property (nonatomic, assign) float groundAlbedo;
 
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLTransformStack.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLTransformStack.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLTransformStack.h	1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/MDLTransformStack.h	2017-05-20 23:52:55.000000000 -0400
@@ -0,0 +1,124 @@
+/*!
+ @header MDLTransformStack.h
+ @framework ModelIO
+ @abstract Time sampled transformation of elements in 3d assets
+ @copyright Copyright © 2017 Apple, Inc. All rights reserved.
+ */
+
+
+#import <Foundation/Foundation.h>
+#import <simd/simd.h>
+#import <ModelIO/MDLTypes.h>
+#import <ModelIO/MDLTransform.h>
+#import <ModelIO/MDLAnimatedValue.h>
+
+NS_ASSUME_NONNULL_BEGIN
+typedef NS_ENUM(NSUInteger, MDLTransformOpRotationOrder) {
+    MDLTransformOpRotationOrderXYZ = 1,
+    MDLTransformOpRotationOrderXZY,
+    MDLTransformOpRotationOrderYXZ,
+    MDLTransformOpRotationOrderYZX,
+    MDLTransformOpRotationOrderZXY,
+    MDLTransformOpRotationOrderZYX,
+};
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+@protocol MDLTransformOp
+@property (nonatomic, readonly) NSString* name;
+-(matrix_float4x4)float4x4AtTime:(NSTimeInterval)time;
+-(matrix_double4x4)double4x4AtTime:(NSTimeInterval)time;
+-(bool)IsInverseOp;
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLTransformRotateXOp : NSObject<MDLTransformOp>
+@property (nonatomic, readonly) NSString* name;
+@property (nonatomic, readonly) MDLAnimatedScalar* animatedValue;
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLTransformRotateYOp : NSObject<MDLTransformOp>
+@property (nonatomic, readonly) NSString* name;
+@property (nonatomic, readonly) MDLAnimatedScalar* animatedValue;
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLTransformRotateZOp : NSObject<MDLTransformOp>
+@property (nonatomic, readonly) NSString* name;
+@property (nonatomic, readonly) MDLAnimatedScalar* animatedValue;
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLTransformRotateOp : NSObject<MDLTransformOp>
+@property (nonatomic, readonly) NSString* name;
+@property (nonatomic, readonly) MDLAnimatedVector3* animatedValue;
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLTransformTranslateOp : NSObject<MDLTransformOp>
+@property (nonatomic, readonly) NSString* name;
+@property (nonatomic, readonly) MDLAnimatedVector3* animatedValue;
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLTransformScaleOp : NSObject<MDLTransformOp>
+@property (nonatomic, readonly) NSString* name;
+@property (nonatomic, readonly) MDLAnimatedVector3* animatedValue;
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLTransformMatrixOp : NSObject<MDLTransformOp>
+@property (nonatomic, readonly) NSString* name;
+@property (nonatomic, readonly) MDLAnimatedMatrix4x4* animatedValue;
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0))
+MDL_EXPORT
+@interface MDLTransformStack : NSObject<NSCopying, MDLTransformComponent>
+
+- (id)init;
+
+-(MDLTransformTranslateOp*) addTranslateOp:(NSString*)animatedValueName
+                                   inverse:(bool)inverse;
+
+-(MDLTransformRotateXOp*) addRotateXOp:(NSString*)animatedValueName
+                               inverse:(bool)inverse;
+
+-(MDLTransformRotateYOp*) addRotateYOp:(NSString*)animatedValueName
+                               inverse:(bool)inverse;
+
+-(MDLTransformRotateZOp*) addRotateZOp:(NSString*)animatedValueName
+                               inverse:(bool)inverse;
+
+-(MDLTransformRotateOp*) addRotateOp:(NSString*)animatedValueName
+                               order:(MDLTransformOpRotationOrder)order
+                             inverse:(bool)inverse;
+
+-(MDLTransformScaleOp*) addScaleOp:(NSString*)animatedValueName
+                           inverse:(bool)inverse;
+
+-(MDLTransformMatrixOp*) addMatrixOp:(NSString*)animatedValueName
+                             inverse:(bool)inverse;
+
+-(MDLAnimatedValue*) animatedValueWithName:(NSString*) name;
+
+-(matrix_float4x4)float4x4AtTime:(NSTimeInterval)time;
+-(matrix_double4x4)double4x4AtTime:(NSTimeInterval)time;
+
+-(NSUInteger)count;
+
+@property (nonatomic, readonly, copy) NSArray<NSNumber*> *keyTimes;
+@property (nonatomic, readonly, copy) NSArray<id<MDLTransformOp>> *transformOps;
+
+
+@end
+
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/ModelIO.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/ModelIO.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/ModelIO.h	2016-09-23 21:12:04.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/System/Library/Frameworks/ModelIO.framework/Headers/ModelIO.h	2017-05-20 23:52:55.000000000 -0400
@@ -8,15 +8,20 @@
 #import <ModelIO/ModelIOExports.h>
 
 #import <ModelIO/MDLAsset.h>
+#import <ModelIO/MDLAssetResolver.h>
+#import <ModelIO/MDLMorphDeformer.h>
 #import <ModelIO/MDLCamera.h>
 #import <ModelIO/MDLLight.h>
 #import <ModelIO/MDLMaterial.h>
 #import <ModelIO/MDLMesh.h>
 #import <ModelIO/MDLMeshBuffer.h>
 #import <ModelIO/MDLObject.h>
+#import <ModelIO/MDLSkinDeformer.h>
 #import <ModelIO/MDLSubmesh.h>
 #import <ModelIO/MDLTexture.h>
 #import <ModelIO/MDLTransform.h>
+#import <ModelIO/MDLTransformStack.h>
+#import <ModelIO/MDLPrimitive.h>
 #import <ModelIO/MDLTypes.h>
 #import <ModelIO/MDLVertexDescriptor.h>
 #import <ModelIO/MDLVoxelArray.h>
Clone this wiki locally