forked from xamarin/xamarin-macios
-
Notifications
You must be signed in to change notification settings - Fork 1
SceneKit macOS xcode9 beta1
Vincent Dondain edited this page Jun 5, 2017
·
3 revisions
#SceneKit.framework
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/ModelIO.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// ModelIO.h
//
-// Copyright (c) 2015-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2015-2017 Apple Inc. All rights reserved.
//
#import <ModelIO/ModelIO.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h 2016-09-26 20:55:17.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAction.h 2017-05-30 23:13:12.000000000 -0400
@@ -12,16 +12,6 @@
@class SCNAction;
@class SCNAudioSource;
-/*! @enum SCNActionTimingMode
- @abstract The modes that an action can use to adjust the apparent timing of the action.
- */
-typedef NS_ENUM(NSInteger, SCNActionTimingMode) {
- SCNActionTimingModeLinear,
- SCNActionTimingModeEaseIn,
- SCNActionTimingModeEaseOut,
- SCNActionTimingModeEaseInEaseOut
-} NS_ENUM_AVAILABLE(10_10, 8_0);
-
/**
A custom timing function for SCNActions. Input time will be between 0.0 and 1.0
over the duration of the action. Return values must be 0.0-1.0 and increasing
@@ -56,7 +46,7 @@
- (void)runAction:(SCNAction *)action forKey:(nullable NSString *)key completionHandler:(nullable void (^)())block NS_AVAILABLE(10_10, 8_0);
/*!
- @method hasActions
+ @property hasActions
@abstract Returns a Boolean value that indicates whether the node is executing actions.
*/
@property(nonatomic, readonly) BOOL hasActions NS_AVAILABLE(10_10, 8_0);
@@ -80,7 +70,7 @@
- (void)removeAllActions NS_AVAILABLE(10_10, 8_0);
/*!
- @method actionKeys
+ @property actionKeys
@abstract Returns an array containing the keys of all actions currently attached to the receiver.
*/
@property(nonatomic, readonly) NSArray<NSString *> *actionKeys NS_AVAILABLE(10_10, 8_0);
@@ -196,7 +186,7 @@
/** Creates an action that plays a sound
@param source The audio source to play (see SCNAudioSource.h)
- @param waitForCompletion If YES, then the duration of this action is the same
+ @param wait If YES, then the duration of this action is the same
as the length of the audio playback. If NO, the action is considered
to have completed immediately.*/
+ (SCNAction *)playAudioSource:(SCNAudioSource *)source waitForCompletion:(BOOL)wait NS_AVAILABLE(10_11, 9_0);
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h 2016-09-26 20:31:43.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAnimation.h 2017-05-19 02:22:15.000000000 -0400
@@ -1,51 +1,57 @@
//
// SCNAnimation.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
-NS_ASSUME_NONNULL_BEGIN
+@class SCNAnimation, SCNAnimationEvent, SCNAnimationPlayer;
+@protocol SCNAnimatable;
-/*!
- @typedef SCNAnimationEventBlock
- @discussion Signature for the block executed when the animation event is triggered.
- */
-typedef void (^SCNAnimationEventBlock)(CAAnimation *animation, id animatedObject, BOOL playingBackward);
+@protocol SCNAnimation <NSObject>
+@end
-/*!
- @class SCNAnimationEvent
- @abstract SCNAnimationEvent encapsulate a block to trigger at a specific time.
- */
+#import <SceneKit/SCNCAAnimationExtensions.h>
-API_AVAILABLE(macosx(10.9))
-@interface SCNAnimationEvent : NSObject
+NS_ASSUME_NONNULL_BEGIN
-/*!
- @method animationEventWithKeyTime:block:
- @abstract Returns an animation event instance
- @param time The relative time to trigger the event.
- @param eventBlock The block to call when the event is triggered.
- @discussion "time" is relative to animation duration and therefor it has to be a value in the range [0,1].
- */
-+ (instancetype)animationEventWithKeyTime:(CGFloat)time block:(SCNAnimationEventBlock)eventBlock;
+typedef void (^SCNAnimationDidStartBlock)(SCNAnimation *animation, id <SCNAnimatable> receiver);
+typedef void (^SCNAnimationDidStopBlock)(SCNAnimation *animation, id <SCNAnimatable> receiver, BOOL completed);
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNTimingFunction : NSObject <NSSecureCoding>
++ (SCNTimingFunction *)functionWithTimingMode:(SCNActionTimingMode)timingMode;
++ (SCNTimingFunction *)functionWithCAMediaTimingFunction:(CAMediaTimingFunction *)caTimingFunction;
@end
/*!
@protocol SCNAnimatable
@abstract The SCNAnimatable protocol defines an animatable property. Objects that implement this protocol can be animated through these methods.
-*/
+ */
@protocol SCNAnimatable <NSObject>
/*!
@method addAnimation:forKey:
- @abstract Add an animation.
+ @abstract Adds and runs an animation
@param animation Added animation.
@param key May be any string such that only one animation per unique key is added per animatable object.
+ @discussion Only SCNAnimation (preferred), CABasicAnimation, CAKeyframeAnimation and CAAnimationGroup are supported.
+ The animation starts playing right away. The animation is automatically removed on completion unless if removedOnCompletion is explicitly set to NO.
+ @seealso -[id <SCNAnimation> removedOnCompletion]
*/
-- (void)addAnimation:(CAAnimation *)animation forKey:(nullable NSString *)key;
+- (void)addAnimation:(id <SCNAnimation>)animation forKey:(nullable NSString *)key;
+
+/*!
+ @method addAnimationPlayer:forKey:
+ @abstract Add an animation player.
+ @param player Added animation player.
+ @param key May be any string such that only one animation per unique key is added per animatable object.
+ @discussion The animation player is not removed automatically on completion.
+ The animation doesn't start playing immediatelly. Call "play" on the player to start playing it.
+ @seealso -[SCNAnimationPlayer play]
+ */
+- (void)addAnimationPlayer:(SCNAnimationPlayer *)player forKey:(nullable NSString *)key API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
@method removeAllAnimations
@@ -61,91 +67,348 @@
- (void)removeAnimationForKey:(NSString *)key;
/*!
- @method animationKeys
+ @property animationKeys
@abstract Returns an array containing the keys of all animations currently attached to the receiver.
*/
@property(readonly) NSArray<NSString *> *animationKeys;
/*!
+ @method animationPlayerForKey:
+ @abstract Returns the animation player with the given identifier
+ @param key The identifier for the animation player to retrieve.
+ @discussion This will return nil if no such animation player exists.
+ */
+- (nullable SCNAnimationPlayer *)animationPlayerForKey:(NSString *)key API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Smoothly remove the animation with the given identifier.
+ @param key The identifier for the animation to remove.
+ @param duration The blend out duration used to remove the animation.
+ */
+- (void)removeAnimationForKey:(NSString *)key blendOutDuration:(CGFloat)duration API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+
+// Deprecated
+
+/*!
+ @method removeAnimationForKey:fadeOutDuration:
+ @abstract Smoothly remove the animation with the given identifier.
+ @param key The identifier for the animation to remove.
+ @param duration The fade out duration used to remove the animation.
+ */
+- (void)removeAnimationForKey:(NSString *)key fadeOutDuration:(CGFloat)duration API_DEPRECATED_WITH_REPLACEMENT("-removeAnimationForKey:blendOutDuration:", macos(10.10, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0));
+
+/*!
@method animationForKey:
@abstract Returns the animation with the given identifier
@param key The identifier for the animation to retrieve.
@discussion This will return nil if no such animation exists.
- Attempting to modify any properties of the returned object will result in undefined behavior.
+ Attempting to modify any properties of the returned object will result in undefined behavior.
*/
-- (nullable CAAnimation *)animationForKey:(NSString *)key;
+- (nullable CAAnimation *)animationForKey:(NSString *)key API_DEPRECATED_WITH_REPLACEMENT("-animationPlayerForKey:", macos(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0));
/*!
@method pauseAnimationForKey:
@abstract Pause the animation with the given identifier.
@param key The identifier for the animation to pause.
*/
-- (void)pauseAnimationForKey:(NSString *)key API_AVAILABLE(macosx(10.9));
+- (void)pauseAnimationForKey:(NSString *)key API_DEPRECATED("Use -[SCNAnimationPlayer setPaused:] instead", macos(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
/*!
@method resumeAnimationForKey:
@abstract Resume the animation with the given identifier.
@param key The identifier for the animation to resume.
*/
-- (void)resumeAnimationForKey:(NSString *)key API_AVAILABLE(macosx(10.9));
+- (void)resumeAnimationForKey:(NSString *)key API_DEPRECATED("Use -[SCNAnimationPlayer setPaused:] instead", macos(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @method setSpeed:forAnimationKey:
+ @abstract Update the animation speed of the animation with the given identifier.
+ @param speed The new speed of the animation.
+ @param key The identifier for the animation to update.
+ */
+- (void)setSpeed:(CGFloat)speed forAnimationKey:(NSString *)key API_DEPRECATED("Use -[SCNAnimationPlayer setSpeed:] instead", macos(10.12, 10.13), ios(10.0, 11.0), tvos(10.0, 11.0), watchos(3.0, 4.0));
/*!
@method isAnimationForKeyPaused:
@abstract Returns whether the animation for the specified identifier is paused.
@param key The identifier for the animation to query.
*/
-- (BOOL)isAnimationForKeyPaused:(NSString *)key API_AVAILABLE(macosx(10.9));
+- (BOOL)isAnimationForKeyPaused:(NSString *)key API_DEPRECATED("Use -[SCNAnimationPlayer paused] instead", macos(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+@end
+
+
+
+/**
+ SCNAnimation represents an animation that targets a specific key path.
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNAnimation : NSObject <SCNAnimation, NSCopying, NSSecureCoding>
+
/*!
- @method removeAnimationForKey:fadeOutDuration:
- @abstract Smoothly remove the animation with the given identifier.
- @param key The identifier for the animation to remove.
- @param duration The fade out duration used to remove the animation.
+ Initializers
+ */
+
+/**
+ Loads and returns an animation loaded from the specified URL.
+
+ @param animationUrl The url to load.
+ */
++ (SCNAnimation *)animationWithContentsOfURL:(NSURL *)animationUrl;
+
+/**
+ Loads and returns the animation with the specified name in the current application bundle.
+
+ @param animationName The name of the animation to load.
+ */
++ (SCNAnimation *)animationNamed:(NSString *)animationName;
+
+// bridge with Core Animation
+/**
+ Returns a SCNAnimation initialized from a CAAnimation.
+
+ @param caAnimation The CAAnimation to initialize from.
+ @discussion Only CABasicAnimation, CAKeyframeAnimation and CAAnimationGroup are currently supported.
*/
-- (void)removeAnimationForKey:(NSString *)key fadeOutDuration:(CGFloat)duration API_AVAILABLE(macosx(10.10));
++ (SCNAnimation *)animationWithCAAnimation:(CAAnimation *)caAnimation;
+
+
/*!
- @method setSpeed:forAnimationKey:
- @abstract Update the animation speed of the animation with the given identifier.
- @param speed The new speed of the animation.
- @param key The identifier for the animation to update.
+ Basic properties
*/
-- (void)setSpeed:(CGFloat)speed forAnimationKey:(NSString *)key API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
-@end
+/**
+ The duration of the animation in seconds. Defaults to 0.
+ */
+@property (nonatomic) NSTimeInterval duration;
+
+/**
+ The key-path describing the property to be animated for single-property animations, nil for animations targetting multiple nodes. defaults to nil.
+ */
+@property (nonatomic, copy, nullable) NSString *keyPath;
+
+/**
+ A timing function defining the pacing of the animation. Defaults to nil indicating linear pacing.
+ */
+@property (nonatomic, retain) SCNTimingFunction *timingFunction;
+
+
/*!
- @category CAAnimation (CAAnimation)
- @abstract Extends the CAAnimation class for SceneKit explicit animations.
+ Blending
+ */
+
+/**
+ Determines the receiver's blend-in duration.
+ @discussion When the blendInDuration is greater than zero, the effect of the animation progressively increase from 0% to 100% during the specified duration.
+ */
+@property (nonatomic) NSTimeInterval blendInDuration;
+
+/**
+ Determines the receiver's blend-out duration.
+ @discussion When the blendOutDuration is greater than zero, the effect of the animation progressively decrease from 100% to 0% at the end of the animation duration.
*/
-@interface CAAnimation (SceneKitAdditions)
+@property (nonatomic) NSTimeInterval blendOutDuration;
+
+
/*!
- @property usesSceneTimeBase
- @abstract Determines whether the receiver is evaluated using the scene time or the system time. Defaults to NO.
+ Animation behaviors
+ */
+
+/**
+ When true, the animation is removed from the render tree once its active duration has passed. Defaults to YES.
+ */
+@property (nonatomic, getter=isRemovedOnCompletion) BOOL removedOnCompletion;
+
+/**
+ When true, the animation is applied to the model tree once its active duration has passed. Defaults to NO.
+ */
+@property (nonatomic, getter=isAppliedOnCompletion) BOOL appliedOnCompletion;
+
+
+
+/*!
+ Repeat
+ */
+
+/**
+ The repeat count of the object. May be fractional. Defaults to 0.
+ */
+@property (nonatomic) CGFloat repeatCount;
+/**
+ When true, the object plays backwards after playing forwards. Defaults to NO.
+ */
+@property (nonatomic) BOOL autoreverses;
+
+
+
+/*!
+ Delay and offset
+ */
+
+/**
+ The relative delay to start the animation, in relation to its parent animation if applicable. Defaults to 0.
+ @discussion This property is bridged with CoreAnimations's beginTime. However, for top level animations, startDelay relative to the current time (unlike CAAnimation's beginTime that is absolute). So if a CAAnimation has a non-zero beginTime, startDelay is initialized as caAnimation.beginTime - CACurrentMediaTime().
+ */
+@property (nonatomic) NSTimeInterval startDelay;
+
+/**
+ Additional offset in active local time. i.e. to convert from parent
+ time tp to active local time t: t = (tp - begin) * speed + offset.
+ Defaults to 0.
+ */
+@property (nonatomic) NSTimeInterval timeOffset;
+
+
+
+/*!
+ Fill mode
+ */
+
+/**
+ When true, the animation remains active after its active duration and evaluates to its end value. Defaults to NO.
+ */
+@property (nonatomic) BOOL fillsForward;
+
+/**
+ When true, the animation is active before its active duration and evaluates to its start value. Defaults to NO.
+ */
+@property (nonatomic) BOOL fillsBackward;
+
+/**
+ Determines whether the receiver is evaluated using the scene time or the system time. Defaults to NO.
@discussion A scene-time based animation is evaluated using the "sceneTime" value of the renderer that renders the scene.
+ The "sceneTime" base is typically used by players or editors that need to preview, edit and being able to change the evaluation time.
+ @see SCNSceneSourceAnimationImportPolicyKey
*/
-@property BOOL usesSceneTimeBase;
+@property (nonatomic) BOOL usesSceneTimeBase;
+
/*!
- @property fadeInDuration
- @abstract Determines the receiver's fade-in duration.
- @discussion When the fadeInDuration is greater than zero, the effect of the animation progressively increase from 0% to 100% during the specified duration.
+ Notifications & events
*/
-@property CGFloat fadeInDuration API_AVAILABLE(macosx(10.9));
-
+
+/**
+ Called when the animation starts.
+ */
+@property (nonatomic, copy, nullable) SCNAnimationDidStartBlock animationDidStart;
+
+/**
+ Called when the animation either completes its active duration or
+ is removed from the object it is attached to (i.e. the layer). The 'completed' argument of SCNAnimationDidStopBlock
+ is true if the animation reached the end of its active duration without being removed.
+ */
+@property (nonatomic, copy, nullable) SCNAnimationDidStopBlock animationDidStop;
+
+/**
+ Specifies the animation events attached to the receiver.
+ @see SCNAnimationEvent
+ */
+@property (nonatomic, copy, nullable) NSArray<SCNAnimationEvent *> *animationEvents;
+
+/*!
+ Additive and cumulative
+ */
+
+/**
+ When true the value specified by the animation will be "added" to
+ the current presentation value of the property to produce the new
+ presentation value. The addition function is type-dependent, e.g.
+ for affine transforms the two matrices are concatenated. Defaults to
+ NO. */
+@property (nonatomic, getter=isAdditive) BOOL additive;
+
+/**
+ The `cumulative' property affects how repeating animations produce
+ their result. If true then the current value of the animation is the
+ value at the end of the previous repeat cycle, plus the value of the
+ current repeat cycle. If false, the value is simply the value
+ calculated for the current repeat cycle. Defaults to NO.
+ */
+@property (nonatomic, getter=isCumulative) BOOL cumulative;
+
+@end
+
+
+
+/**
+ SCNAnimationPlayer let you control when and how to play and blend an animation
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNAnimationPlayer : NSObject <SCNAnimatable, NSCopying, NSSecureCoding>
+
+/**
+ Initialize an animation player with an animation
+ @param animation The animation to play
+ */
++ (SCNAnimationPlayer *)animationPlayerWithAnimation:(SCNAnimation *)animation;
+
+/**
+ The played animation
+ */
+@property (nonatomic, readonly) SCNAnimation *animation;
+
+/**
+ The speed to play the animation at. Defaults to 1.0. Animatable
+ */
+@property (nonatomic) CGFloat speed;
+
+/**
+ Controls the influence of the played animation. When set to 1 the animation is applied without any blending. When set to less than 1, the animation value is blent with the current presentation value of the animated property. Defaults to 1.0. Animatable.
+ */
+@property (nonatomic) CGFloat blendFactor;
+
+/**
+ Specifies if the animation is paused. Defaults to NO.
+ */
+@property (nonatomic) BOOL paused;
+
/*!
- @property fadeOutDuration
- @abstract Determines the receiver's fade-out duration.
- @discussion When the fadeOutDuration is greater than zero, the effect of the animation progressively decrease from 100% to 0% at the end of the animation duration.
+ Actions
*/
-@property CGFloat fadeOutDuration API_AVAILABLE(macosx(10.9));
+
+/**
+ Set paused to NO and restart playing from the beginning of the animation.
+ */
+- (void)play;
+
+/**
+ Stop the animation.
+ */
+- (void)stop;
+
+/**
+ Stop the animation and smoothly blend out the animation over the specified duration.
+ */
+- (void)stopWithBlendOutDuration:(NSTimeInterval)duration;
+
+@end
+
+
+/**
+ Signature for the block executed when the animation event is triggered.
+ */
+typedef void (^SCNAnimationEventBlock)(id <SCNAnimation> animation, id animatedObject, BOOL playingBackward);
+
+
+/**
+ SCNAnimationEvent encapsulates a block to trigger at a specific time.
+ */
+API_AVAILABLE(macos(10.9))
+@interface SCNAnimationEvent : NSObject
/*!
- @property animationEvents
- @abstract Specifies the animation events attached to the receiver.
+ @method animationEventWithKeyTime:block:
+ @abstract Returns an animation event instance
+ @param time The relative time to trigger the event.
+ @param eventBlock The block to call when the event is triggered.
+ @discussion "time" is relative to animation duration and therefor it has to be a value in the range [0,1].
*/
-@property(nonatomic, copy, nullable) NSArray<SCNAnimationEvent *> *animationEvents API_AVAILABLE(macosx(10.9));
++ (instancetype)animationEventWithKeyTime:(CGFloat)time block:(SCNAnimationEventBlock)eventBlock;
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNAudioSource.h 2017-05-30 23:13:12.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNAudioSource.h
//
-// Copyright (c) 2015-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2015-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNNode.h>
@@ -14,7 +14,7 @@
@class SCNAudioSource
@abstract The SCNAudioSource class represents an audio source that can be added to a SCNNode.
*/
-API_AVAILABLE(macosx(10.11), ios(9.0))
+API_AVAILABLE(macos(10.11), ios(9.0))
@interface SCNAudioSource : NSObject <NSCopying, NSSecureCoding>
/*!
@@ -38,6 +38,7 @@
/*!
@property positional
@abstract Marks the audio source as positional so that the audio mix considers relative position and velocity with regards to the SCNSceneRenderer's current listener node. Defaults to YES.
+ @discussion shouldStream must be set to false in order to get positional audio (see shouldStream).
@see SCNSceneRenderer audioListener.
*/
@property(nonatomic, getter=isPositional) BOOL positional;
@@ -81,7 +82,7 @@
@end
-API_AVAILABLE(macosx(10.11), ios(9.0))
+API_AVAILABLE(macos(10.11), ios(9.0))
@interface SCNAudioPlayer : NSObject
- (instancetype)init NS_UNAVAILABLE;
@@ -143,25 +144,25 @@
@method addAudioPlayer:
@abstract Add an audio player to the node and starts playing it right away.
*/
-- (void)addAudioPlayer:(SCNAudioPlayer *)player API_AVAILABLE(macosx(10.11), ios(9.0));
+- (void)addAudioPlayer:(SCNAudioPlayer *)player API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@method removeAllAudioPlayers
@abstract Remove all audio players from this node and stop playing them.
*/
-- (void)removeAllAudioPlayers API_AVAILABLE(macosx(10.11), ios(9.0));
+- (void)removeAllAudioPlayers API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@method removeAudioPlayer:
@abstract Remove the given audio player from this node and stop playing it.
*/
-- (void)removeAudioPlayer:(SCNAudioPlayer *)player API_AVAILABLE(macosx(10.11), ios(9.0));
+- (void)removeAudioPlayer:(SCNAudioPlayer *)player API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property audioPlayers
@abstract Get an array with all the audio players connected and playing on this node.
*/
-@property(nonatomic, readonly) NSArray<SCNAudioPlayer *> *audioPlayers API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly) NSArray<SCNAudioPlayer *> *audioPlayers API_AVAILABLE(macos(10.11), ios(9.0));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNBoundingVolume.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNBoundingVolume.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -22,23 +22,25 @@
@abstract Fill the min and max vectors with the min and max vertex of the bounding box.
@param min A pointer to a SCNVector3 to store the min vertex of the bounding box into.
@param max A pointer to a SCNVector3 to store the max vertex of the bounding box into.
+ @discussion the returned bounding box is in local space of the receiver.
*/
- (BOOL)getBoundingBoxMin:(nullable SCNVector3 *)min max:(nullable SCNVector3 *)max NS_REFINED_FOR_SWIFT;
/*!
@method setBoundingBoxMin:max:
- @abstract Override the receiver bounding box with the min and max vectors provided.
+ @abstract Override the receiver bounding box with the min and max vectors provided (in local space of the receiver).
@param min A pointer to a SCNVector3 representing the min vertex of the desired bounding box.
@param max A pointer to a SCNVector3 representing the max vertex of the desired bounding box.
@discussion Passing nil as arguments will recompute the original bounding box of the receiver.
*/
-- (void)setBoundingBoxMin:(nullable SCNVector3 *)min max:(nullable SCNVector3 *)max API_AVAILABLE(macosx(10.9)) NS_REFINED_FOR_SWIFT;
+- (void)setBoundingBoxMin:(nullable SCNVector3 *)min max:(nullable SCNVector3 *)max API_AVAILABLE(macos(10.9)) NS_REFINED_FOR_SWIFT;
/*!
@method getBoundingSphereCenter:radius:
@abstract Fill the center vector with the center of the bounding sphere and store the radius of the bounding sphere in 'radius'.
@param center A pointer to a SCNVector3 to store the center of the bounding sphere into.
@param radius A pointer to a CGFloat to store the radius of the bounding sphere into.
+ @discussion the returned bounding sphere is in local space of the receiver.
*/
- (BOOL)getBoundingSphereCenter:(nullable SCNVector3 *)center radius:(nullable CGFloat *)radius NS_REFINED_FOR_SWIFT;
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCAAnimationExtensions.h 2017-05-18 17:39:18.000000000 -0400
@@ -0,0 +1,62 @@
+//
+// SCNCAAnimationExtensions.h
+//
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <CoreGraphics/CoreGraphics.h>
+#import <QuartzCore/QuartzCore.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class SCNAnimationEvent, SCNAnimation;
+
+
+@interface CAAnimation (SCNAnimation) <SCNAnimation>
+@end
+
+/*!
+ @category CAAnimation (SceneKitAdditions)
+ @abstract Extends the CAAnimation class for SceneKit explicit animations.
+ */
+@interface CAAnimation (SceneKitAdditions)
+
+/*!
+ Bridge with SCNAnimation
+*/
+/**
+ Initializes a CoreAnimation animation from a SCNAnimation
+ */
++ (CAAnimation *)animationWithSCNAnimation:(SCNAnimation *)animation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property usesSceneTimeBase
+ @abstract Determines whether the receiver is evaluated using the scene time or the system time. Defaults to NO.
+ @discussion A scene-time based animation is evaluated using the "sceneTime" value of the renderer that renders the scene.
+ */
+@property BOOL usesSceneTimeBase;
+
+/*!
+ @property fadeInDuration
+ @abstract Determines the receiver's fade-in duration.
+ @discussion When the fadeInDuration is greater than zero, the effect of the animation progressively increase from 0% to 100% during the specified duration.
+ */
+@property CGFloat fadeInDuration API_AVAILABLE(macos(10.9));
+
+/*!
+ @property fadeOutDuration
+ @abstract Determines the receiver's fade-out duration.
+ @discussion When the fadeOutDuration is greater than zero, the effect of the animation progressively decrease from 100% to 0% at the end of the animation duration.
+ */
+@property CGFloat fadeOutDuration API_AVAILABLE(macos(10.9));
+
+/*!
+ @property animationEvents
+ @abstract Specifies the animation events attached to the receiver.
+ */
+@property(nonatomic, copy, nullable) NSArray<SCNAnimationEvent *> *animationEvents API_AVAILABLE(macos(10.9));
+
+@end
+
+NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCamera.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,13 +1,19 @@
//
// SCNCamera.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
#import <SceneKit/SCNAnimation.h>
#import <SceneKit/SCNTechnique.h>
+
+typedef NS_ENUM(NSInteger, SCNCameraProjectionDirection) {
+ SCNCameraProjectionDirectionVertical = 0,
+ SCNCameraProjectionDirectionHorizontal = 1,
+} API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
NS_ASSUME_NONNULL_BEGIN
/*!
@@ -30,19 +36,32 @@
*/
@property(nonatomic, copy, nullable) NSString *name;
-/*!
- @property xFov
- @abstract Determines the receiver's field of view on the X axis (in degree). Animatable.
- @discussion When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
+/*!
+ @property fieldOfView
+ @abstract Determines the receiver's field of view (in degree). Animatable.
+ @discussion defaults to 60°.
*/
-@property(nonatomic) double xFov;
+@property(nonatomic) CGFloat fieldOfView API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
-/*!
- @property yFov
- @abstract Determines the receiver's field of view on the Y axis (in degree). Animatable.
- @discussion When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
+/*!
+ @property projectionDirection
+ @abstract Determines whether the fieldOfView (or orthographicScale) is verical or horizontal. Defaults to vertical.
+ */
+@property(nonatomic) SCNCameraProjectionDirection projectionDirection API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property focalLength
+ @abstract Determines the receiver's focal length in millimeter. Animatable.
+ @discussion defaults to 50mm.
*/
-@property(nonatomic) double yFov;
+@property(nonatomic) CGFloat focalLength API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property sensorHeight
+ @abstract Determines the vertical size of the sensor in millimeter. Animatable.
+ @discussion Defaults to 24mm.
+ */
+@property(nonatomic) CGFloat sensorHeight API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
@property zNear
@@ -63,7 +82,7 @@
@abstract Determines whether the receiver automatically adjusts the zNear and zFar values. Defaults to NO.
@discussion When set to YES, the near and far planes are automatically set to fit the bounding box of the entire scene at render time. Setting the property zNear or zFar automatically resets this property to NO.
*/
-@property(nonatomic) BOOL automaticallyAdjustsZRange API_AVAILABLE(macosx(10.9));
+@property(nonatomic) BOOL automaticallyAdjustsZRange API_AVAILABLE(macos(10.9));
/*!
@property usesOrthographicProjection
@@ -76,7 +95,7 @@
@abstract Determines the receiver's orthographic scale value. Animatable. Defaults to 1.
@discussion This setting determines the size of the camera's visible area. This is only enabled when usesOrthographicProjection is set to YES.
*/
-@property(nonatomic) double orthographicScale API_AVAILABLE(macosx(10.9));
+@property(nonatomic) double orthographicScale API_AVAILABLE(macos(10.9));
/*!
@property projectionTransform
@@ -84,168 +103,261 @@
*/
@property(nonatomic) SCNMatrix4 projectionTransform;
- (SCNMatrix4)projectionTransform;
-- (void)setProjectionTransform:(SCNMatrix4)projectionTransform API_AVAILABLE(macosx(10.9));
+- (void)setProjectionTransform:(SCNMatrix4)projectionTransform API_AVAILABLE(macos(10.9));
/*!
- @functiongroup Depth of field
+ Depth of field
*/
+
/*!
- @property focalDistance
- @abstract Determines the receiver's focal distance. Animatable.
- @discussion When non zero, the focal distance determines how the camera focuses the objects in the 3d scene. Defaults to 10.0
+ @property wantsDepthOfField
+ @abstract Determines if the receiver has depth of field. Defaults to NO.
*/
-@property(nonatomic) CGFloat focalDistance API_AVAILABLE(macosx(10.9));
+@property(nonatomic) BOOL wantsDepthOfField API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
- @property focalSize
- @abstract Determines the receiver's focal size. Animatable.
- @discussion Determines the size of the area around focalDistance where the objects are in focus. Defaults to 0.
+ @property focusDistance
+ @abstract Determines the receiver's focus distance. Animatable.
+ @discussion Defaults to 2.5
*/
-@property(nonatomic) CGFloat focalSize API_AVAILABLE(macosx(10.9));
+@property(nonatomic) CGFloat focusDistance API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
- @property focalBlurRadius
- @abstract Determines the receiver's focal radius. Animatable.
- @discussion Determines the maximum amount of blur for objects out of focus. Defaults to 0.
+ @property focalBlurSampleCount
+ @abstract Determines the receiver's sample count for depth of field effect.
+ @discussion Defaults to 25.
*/
-@property(nonatomic) CGFloat focalBlurRadius API_AVAILABLE(macosx(10.9));
+@property(nonatomic) NSInteger focalBlurSampleCount API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
- @property aperture
- @abstract Determines the receiver's aperture. Animatable.
- @discussion Determines how fast the transition between in-focus and out-of-focus areas is. The greater the aperture is the faster the transition is. Defaults to 1/8.
+ @property fStop
+ @abstract Determines the receiver's fstop. Animatable.
+ @discussion Defaults to 5.6.
*/
-@property(nonatomic) CGFloat aperture API_AVAILABLE(macosx(10.9));
+@property(nonatomic) CGFloat fStop API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property apertureBladeCount
+ @abstract Determines the receiver's blade count of the aperture.
+ @discussion Defaults to 6.
+ */
+@property(nonatomic) NSInteger apertureBladeCount API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
@property motionBlurIntensity
@abstract Determines the intensity of the motion blur. Animatable. Defaults to 0.
@discussion An intensity of zero means no motion blur. The intensity should not exceeed 1.
*/
-@property(nonatomic) CGFloat motionBlurIntensity API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat motionBlurIntensity API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
+
+
+
+/*!
+ Screen space ambient occlusion
+ */
+
+/*!
+ @property screenSpaceAmbientOcclusionIntensity
+ @abstract Determines the intensity of the screen space ambient occlusion. Animatable.
+ @discussion defaults to 0.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionIntensity API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property screenSpaceAmbientOcclusionRadius
+ @abstract Determines the screen space ambient occlusion radius in scene unit. Animatable.
+ @discussion defaults to 5.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionRadius API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property screenSpaceAmbientOcclusionBias
+ @abstract Determines self occlusion bias in scene unit.
+ @discussion defaults to 0.03.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionBias API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property screenSpaceAmbientOcclusionDepthThreshold
+ @abstract Determines the depth blur threshold in scene unit.
+ @discussion defaults to 0.2.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionDepthThreshold API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
- @functiongroup High Dynamic Range
+ @property screenSpaceAmbientOcclusionNormalThreshold
+ @abstract Determines the normal blur threshold.
+ @discussion defaults to 0.3.
+ */
+@property(nonatomic) CGFloat screenSpaceAmbientOcclusionNormalThreshold API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ High Dynamic Range
*/
/*!
@property wantsHDR
@abstract Determines if the receiver has a high dynamic range. Defaults to NO.
*/
-@property(nonatomic) BOOL wantsHDR API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) BOOL wantsHDR API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property exposureOffset
@abstract Determines the logarithimc exposure biasing, in EV. Defaults to 0.
*/
-@property(nonatomic) CGFloat exposureOffset API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat exposureOffset API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property averageGray
@abstract Determines the average gray level desired in the final image. Defaults to 0.18.
*/
-@property(nonatomic) CGFloat averageGray API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat averageGray API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property whitePoint
@abstract Determines the smallest luminance level that will be mapped to white in the final image. Defaults to 1.
*/
-@property(nonatomic) CGFloat whitePoint API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat whitePoint API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property wantsExposureAdaptation
@abstract Determines if the receiver should simulate an eye and continuously adjust to luminance. Defaults to YES.
*/
-@property(nonatomic) BOOL wantsExposureAdaptation API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) BOOL wantsExposureAdaptation API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property exposureAdaptationBrighteningSpeedFactor
@abstract Determines the exposure adaptation speed when going from bright areas to dark areas. Defaults to 0.4.
*/
-@property(nonatomic) CGFloat exposureAdaptationBrighteningSpeedFactor API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat exposureAdaptationBrighteningSpeedFactor API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property exposureAdaptationBrighteningSpeedFactor
- @abstract Determines the exposure adaptation speed whien going from dark areas to bright areas. Defaults to 0.6.
+ @abstract Determines the exposure adaptation speed when going from dark areas to bright areas. Defaults to 0.6.
*/
-@property(nonatomic) CGFloat exposureAdaptationDarkeningSpeedFactor API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat exposureAdaptationDarkeningSpeedFactor API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property minimumExposure
@abstract Determines the minimum exposure offset of the adaptation, in EV. Defaults to -15.
*/
-@property(nonatomic) CGFloat minimumExposure API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat minimumExposure API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property maximumExposure
@abstract Determines the maximum exposure offset of the adaptation, in EV. Defaults to -15.
*/
-@property(nonatomic) CGFloat maximumExposure API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat maximumExposure API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property bloomThreshold
@abstract Determines the luminance threshold for the bloom effect. Animatable. Defaults to 1.
*/
-@property(nonatomic) CGFloat bloomThreshold API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat bloomThreshold API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property bloomIntensity
@abstract Determines the intensity of the bloom effect. Animatable. Defaults to 0 (no effect).
*/
-@property(nonatomic) CGFloat bloomIntensity API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat bloomIntensity API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property bloomBlurRadius
- @abstract Determines the radius of the bloom effect in pixels. Animatable. Defaults to 4.
+ @abstract Determines the radius of the bloom effect in points. Animatable. Defaults to 4.
*/
-@property(nonatomic) CGFloat bloomBlurRadius API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat bloomBlurRadius API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property vignettingPower
@abstract Controls the shape of the vignetting effect. Defaults to 0 (no effect).
*/
-@property(nonatomic) CGFloat vignettingPower API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat vignettingPower API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property vignettingIntensity
@abstract Controls the intensity of the vignetting effect. Defaults to 0 (no effect).
*/
-@property(nonatomic) CGFloat vignettingIntensity API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat vignettingIntensity API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property colorFringeStrength
@abstract Controls the strength of the color shift effect. Defaults to 0 (no effect).
*/
-@property(nonatomic) CGFloat colorFringeStrength API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat colorFringeStrength API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property colorFringeIntensity
@abstract Controls the intensity of the color shift effect. Defaults to 1.
*/
-@property(nonatomic) CGFloat colorFringeIntensity API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat colorFringeIntensity API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property saturation
@abstract Controls the overall saturation of the scene. Defaults to 1 (no effect).
*/
-@property(nonatomic) CGFloat saturation API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat saturation API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property contrast
@abstract Controls the overall contrast of the scene. Defaults to 0 (no effect).
*/
-@property(nonatomic) CGFloat contrast API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat contrast API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property colorGrading
@abstract Specifies a lookup texture to apply color grading. The contents must a 2D image representing `n` slices of a unit color cube texture, arranged in an horizontal row of `n` images. For instance, a color cube of dimension 16x16x16 should be provided as an image of size 256x16.
*/
-@property(nonatomic, readonly) SCNMaterialProperty *colorGrading API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic, readonly) SCNMaterialProperty *colorGrading API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property categoryBitMask
@abstract Determines the node categories that are visible from the receiver. Defaults to all bits set.
*/
-@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macosx(10.10));
+@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macos(10.10));
+
+
+//Deprecated
+
+/*!
+ @property focalBlurRadius
+ @abstract Determines the receiver's focal radius. Animatable.
+ @discussion Determines the maximum amount of blur for objects out of focus. Defaults to 0.
+ */
+@property(nonatomic) CGFloat focalBlurRadius API_DEPRECATED("Use fStop instead", macos(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property xFov
+ @abstract Determines the receiver's field of view on the X axis (in degree). Animatable.
+ @discussion When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
+ */
+@property(nonatomic) double xFov API_DEPRECATED("Use -[SCNCamera fov] or -[SCNCamera focalLength] instead", macos(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property yFov
+ @abstract Determines the receiver's field of view on the Y axis (in degree). Animatable.
+ @discussion When both xFov and yFov are null an yFov of 60° is used. When both are set, the one that best fits the renderer's aspect ratio is used. When only one is set, it is used. Defaults to 0.
+ */
+@property(nonatomic) double yFov API_DEPRECATED("Use -[SCNCamera fov] or -[SCNCamera focalLength] instead", macos(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property aperture
+ @abstract Determines the receiver's aperture. Animatable.
+ @discussion Defaults to 1/8.0.
+ */
+@property(nonatomic) CGFloat aperture API_DEPRECATED("Use -[SCNCamera fStop] instead with fStop = sensorHeight / aperture.", macos(10.8, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property focalSize
+ @abstract Determines the receiver's focal size. Animatable.
+ @discussion Determines the size of the area around focalDistance where the objects are in focus. Defaults to 0.
+ */
+@property(nonatomic) CGFloat focalSize API_DEPRECATED_WITH_REPLACEMENT("-focalDistance", macos(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
+
+/*!
+ @property focalDistance
+ @abstract Determines the receiver's focal distance. Animatable.
+ @discussion When non zero, the focal distance determines how the camera focuses the objects in the 3d scene. Defaults to 10.0 prior to macOS 10.13, iOS 11, tvOS 11 and watchOS 4. Defaults to 2.5 otherwise.
+ */
+@property(nonatomic) CGFloat focalDistance API_DEPRECATED_WITH_REPLACEMENT("-focusDistance", macos(10.9, 10.13), ios(8.0, 11.0), tvos(9.0, 11.0), watchos(3.0, 4.0));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNCameraController.h 2017-05-30 23:13:12.000000000 -0400
@@ -0,0 +1,107 @@
+//
+// SCNCameraController.h
+//
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <SceneKit/SceneKitTypes.h>
+
+@class SCNNode;
+@class SCNCameraController;
+
+// SCNInteractionMode specify the behavior of the camera relative to
+// screen space interactions.
+typedef NS_ENUM(NSInteger, SCNInteractionMode) {
+ // Relative to up vector.
+ SCNInteractionModeFly,
+ SCNInteractionModeOrbitTurntable, // rotate around target with absolute orientation from angles accumulation.
+ // Up vector not taken into account.
+ SCNInteractionModeOrbitAngleMapping, // rotate around target by mapping 2D screen coordinates to spherical coordinates.
+ SCNInteractionModeOrbitCenteredArcball,
+ SCNInteractionModeOrbitArcball, // rotate around target by mapping 2D screen coordinates to an half sphere.
+ SCNInteractionModePan, // camera space translation on X/Y
+ SCNInteractionModeTruck, // camera space translation on X/Z
+} API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+@protocol SCNCameraControllerDelegate <NSObject>
+
+@optional
+- (void)cameraInertiaWillStartForController:(SCNCameraController*)cameraController;
+- (void)cameraInertiaDidEndForController:(SCNCameraController*)cameraController;
+
+@end
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNCameraController : NSObject
+
+@property(nonatomic, assign) id<SCNCameraControllerDelegate> delegate;
+
+@property(nonatomic, retain) SCNNode* pointOfView;
+@property(nonatomic, assign) SCNInteractionMode interactionMode;
+
+// The camera target in world space for orbit rotation.
+@property(nonatomic, assign) SCNVector3 target;
+
+// Automatically update the target in beginInteraction
+@property(nonatomic, assign) BOOL automaticTarget; //default to NO
+
+// The up vector in world space used as reference for SCNInteractionModeFly and SCNInteractionModeOrbitTurntable camera modes.
+// Default to UnitY(0, 1, 0).
+@property(nonatomic, assign) SCNVector3 worldUp;
+
+// Set to YES to enable inertia on endInteraction.
+// Default to NO.
+@property(nonatomic, assign) BOOL inertiaEnabled;
+
+// The friction coefficient applied to the inertia.
+// Default to 0.05.
+@property(nonatomic, assign) float inertiaFriction;
+
+// Returns YES if inertia is running.
+@property(nonatomic, readonly, getter = isInertiaRunning) BOOL inertiaRunning;
+
+// Maximum vertical view angle in degree for Fly mode and Turntable.
+// A value of 0 indicates no angle locking. Default to 0.
+@property(nonatomic, assign) float maximumVerticalAngle;
+
+// Maximum horizontal view angle in degree for Fly mode and Turntable.
+// A value of 0 indicates no angle locking. Default to 0.
+@property(nonatomic, assign) float maximumHorizontalAngle;
+
+// Translate the camera along the local X/Y/Z axis.
+- (void)translateInCameraSpaceByX:(float)deltaX Y:(float)deltaY Z:(float)deltaX;
+
+// Move the camera to a position where the bounding sphere of all nodes is fully visible.
+// Also set the camera target has the center of the bounding sphere.
+- (void)frameNodes:(NSArray<SCNNode*>*)nodes;
+
+// Rotate delta is in degree.
+- (void)rotateByX:(float)deltaX Y:(float)deltaY;
+
+// Rotate the camera around the given screen space point. Delta is in degree.
+- (void)rollBy:(float)delta aroundScreenPoint:(CGPoint)point viewport:(CGSize)viewport;
+
+// Zoom by moving the camera along the axis by a screen space point.
+- (void)dollyZoomBy:(float)delta onScreenPoint:(CGPoint)point viewport:(CGSize)viewport;
+
+// Rotate the camera around the axis from the camera position to the target.
+// Delta is in degree.
+- (void)rollAroundTarget:(float)delta;
+
+// Zoom by moving the camera along the axis from the camera position to the target.
+- (void)dollyZoomToTarget:(float)delta;
+
+// clear the camera roll if any
+- (void)clearRoll;
+
+// Stop current inertia.
+- (void)stopInertia;
+
+// Begin/Continue/End interaction using an input location relative to viewport.
+// The behavior depends on the current interactionMode.
+- (void)beginInteraction:(CGPoint)location withViewport:(CGSize)viewport;
+- (void)continueInteraction:(CGPoint)location withViewport:(CGSize)viewport sensitivity:(CGFloat)sensitivity;
+- (void)endInteraction:(CGPoint)location withViewport:(CGSize)viewport velocity:(CGPoint)velocity;
+
+@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h 2016-09-26 20:55:17.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNConstraint.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNConstraint.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -16,23 +16,37 @@
@abstract A SCNConstraint is an abstract class that represents a single constraint that can be applied to a node.
*/
-API_AVAILABLE(macosx(10.9))
+API_AVAILABLE(macos(10.9))
@interface SCNConstraint : NSObject <NSCopying, NSSecureCoding, SCNAnimatable>
/*!
+ @property enable
+ @abstract Determines whether the constraint is enabled or not. Defaults to YES.
+ */
+@property(nonatomic, getter = isEnabled) BOOL enabled NS_AVAILABLE(10_10, 8_0);
+
+/*!
@property influenceFactor
@abstract Specifies the inflence factor of the receiver. Defaults to 1. Animatable
*/
-@property(nonatomic) CGFloat influenceFactor API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat influenceFactor API_AVAILABLE(macos(10.10));
+
+/*!
+ @property incremental
+ @abstract Specifies whether or not the contraint should applies incrementally and have it's effect being cumulated over the rendered frames. Defaults to true on macos 10.13, ios 11.0, tvos 11.0, watchos 4.0, default to false on previous releases.
+ */
+@property(nonatomic, getter=isIncremental) BOOL incremental API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
@end
+// MARK: -
+
/*!
@class SCNLookAtConstraint
@abstract A SCNLookAtConstraint applies on a node's orientation so that it always look at another node.
*/
-API_AVAILABLE(macosx(10.9))
+API_AVAILABLE(macos(10.9))
@interface SCNLookAtConstraint : SCNConstraint
/*!
@@ -48,7 +62,26 @@
*/
@property(nonatomic, retain, nullable) SCNNode *target;
- (nullable SCNNode *)target;
-- (void)setTarget:(nullable SCNNode *)target API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+- (void)setTarget:(nullable SCNNode *)target API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
+
+/*!
+ @property targetOffset
+ @abstract Offset look at position in target space. Defaults to zero. Animatable
+ */
+@property(nonatomic, assign) SCNVector3 targetOffset API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property targetOffset
+ @abstract Front direction in the constraint owner local space. Defaults to [SCNNode localFront]. Animatable
+ */
+@property(nonatomic, assign) SCNVector3 localFront API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property worldUp
+ @abstract Up reference direction in world space. Defaults to [SCNNode localUp]. Animatable
+ */
+@property(nonatomic, assign) SCNVector3 worldUp API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
/*!
@property gimbalLockEnabled
@@ -59,6 +92,8 @@
@end
+// MARK: -
+
typedef NS_OPTIONS(NSUInteger, SCNBillboardAxis) {
SCNBillboardAxisX = 0x1 << 0,
SCNBillboardAxisY = 0x1 << 1,
@@ -66,7 +101,7 @@
SCNBillboardAxisAll = SCNBillboardAxisX | SCNBillboardAxisY | SCNBillboardAxisZ
};
-API_AVAILABLE(macosx(10.11), ios(9.0))
+API_AVAILABLE(macos(10.11), ios(9.0))
@interface SCNBillboardConstraint : SCNConstraint
/*!
@@ -84,11 +119,13 @@
@end
+// MARK: -
+
/*!
@class SCNTransformConstraint
@abstract A SCNTransformConstraint applies on the transform of a node via a custom block.
*/
-API_AVAILABLE(macosx(10.9))
+API_AVAILABLE(macos(10.9))
@interface SCNTransformConstraint : SCNConstraint
/*!
@@ -100,14 +137,33 @@
*/
+ (instancetype)transformConstraintInWorldSpace:(BOOL)world withBlock:(SCNMatrix4 (^)(SCNNode *node, SCNMatrix4 transform))block;
+/*!
+ @method positionConstraintInWorldSpace:withBlock:
+ @abstract Creates and returns a SCNTransformConstraint object with the specified parameters.
+ @param world Determines whether the constraint is evaluated in world or local space.
+ @param block The custom block to call to evaluate the constraint.
+ @discussion The node and its position are passed to the block. The position returned by the block will be used to render the node.
+ */
++ (instancetype)positionConstraintInWorldSpace:(BOOL)world withBlock:(SCNVector3 (^)(SCNNode *node, SCNVector3 position))block API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @method orientationConstraintInWorldSpace:withBlock:
+ @abstract Creates and returns a SCNTransformConstraint object with the specified parameters.
+ @param world Determines whether the constraint is evaluated in world or local space.
+ @param block The custom block to call to evaluate the constraint.
+ @discussion The node and its quaternion are passed to the block. The quaternion returned by the block will be used to render the node.
+ */
++ (instancetype)orientationConstraintInWorldSpace:(BOOL)world withBlock:(SCNQuaternion (^)(SCNNode *node, SCNQuaternion quaternion))block API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
@end
+// MARK: -
/*!
@class SCNIKConstraint
@abstract A SCNIKConstraint applies an inverse kinematics constraint
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNIKConstraint : SCNConstraint
/*!
@@ -116,7 +172,7 @@
@param chainRootNode The root node of the kinematic chain.
@discussion "chainRootNode" must be an ancestor of the node on which the constraint is applied.
*/
-- (instancetype)initWithChainRootNode:(SCNNode *)chainRootNode API_AVAILABLE(macosx(10.11), ios(9.0));
+- (instancetype)initWithChainRootNode:(SCNNode *)chainRootNode API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@method inverseKinematicsConstraintWithChainRootNode:
@@ -147,4 +203,228 @@
@end
+// MARK: -
+
+/*!
+ @class SCNDistanceConstraint
+ @abstract A SCNDistanceConstraint ensure a minimum/maximum distance with a target node.
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNDistanceConstraint : SCNConstraint
+
+/*!
+ @method distanceConstraintWithTarget
+ @abstract Creates and returns a SCNDistanceConstraint constraint.
+ */
++ (instancetype)distanceConstraintWithTarget:(nullable SCNNode *)target;
+
+/*!
+ @property target
+ @abstract Defines the target node to keep distance with.
+ */
+@property(nonatomic, retain, nullable) SCNNode *target;
+
+/*!
+ @property minimumDistance
+ @abstract The minimum distance. Defaults to 0. Animatable.
+ */
+@property(nonatomic, assign) CGFloat minimumDistance;
+
+/*!
+ @property maximumDistance
+ @abstract The minimum distance. Defaults to MAXFLOAT. Animatable.
+ */
+@property(nonatomic, assign) CGFloat maximumDistance;
+
+@end
+
+// MARK: -
+
+/*!
+ @class SCNReplicatorConstraint
+ @abstract A SCNReplicatorConstraint replicates the position/orientation/scale of a target node
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNReplicatorConstraint : SCNConstraint
+
+/*!
+ @method replicatorWithTargetNode
+ @abstract Creates and returns a SCNReplicatorConstraint constraint.
+ */
++ (instancetype)replicatorConstraintWithTarget:(nullable SCNNode *)target;
+
+/*!
+ @property target
+ @abstract Defines the target node to replicate
+ */
+@property(nonatomic, retain, nullable) SCNNode *target;
+
+/*!
+ @property replicatesOrientation
+ @abstract Defines whether or not the constraint should replicate the target orientation. Defaults to YES.
+ */
+@property(nonatomic, assign) BOOL replicatesOrientation;
+
+/*!
+ @property replicatesPosition
+ @abstract Defines whether or not the constraint should replicate the target position. Defaults to YES.
+ */
+@property(nonatomic, assign) BOOL replicatesPosition;
+
+/*!
+ @property replicatesScale
+ @abstract Defines whether or not the constraint should replicate the target scale. Defaults to YES.
+ */
+@property(nonatomic, assign) BOOL replicatesScale;
+
+/*!
+ @property orientationOffset
+ @abstract Defines an addition orientation offset. Defaults to no offset. Animatable.
+ */
+@property(nonatomic, assign) SCNQuaternion orientationOffset;
+
+/*!
+ @property positionOffset
+ @abstract Defines an addition orientation offset. Defaults to no offset. Animatable.
+ */
+@property(nonatomic, assign) SCNVector3 positionOffset;
+
+/*!
+ @property scaleOffset
+ @abstract Defines an addition scale offset. Defaults to no offset. Animatable.
+ */
+@property(nonatomic, assign) SCNVector3 scaleOffset;
+
+@end
+
+// MARK: -
+
+/*!
+ @class SCNAccelerationConstraint
+ @abstract A SCNAccelerationConstraint caps the acceleration and velocity of a node
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNAccelerationConstraint : SCNConstraint
+
+/*!
+ @method accelerationConstraint
+ @abstract Creates and returns a SCNAccelerationConstraint object.
+ */
++ (instancetype)accelerationConstraint;
+
+/*!
+ @property maximumLinearAcceleration
+ @abstract Controls the maximum linear acceleration. Defaults to MAXFLOAT. Animatable.
+ @discussion The maximum linear acceleration is in m.s^-2
+ */
+@property(nonatomic, assign) CGFloat maximumLinearAcceleration;
+
+/*!
+ @property maximumLinearVelocity
+ @abstract Controls the maximum linear velocity. Defaults to MAXFLOAT. Animatable.
+ @discussion The maximum linear velocity is in m.s
+ */
+@property(nonatomic, assign) CGFloat maximumLinearVelocity;
+
+/*!
+ @property decelerationDistance
+ @abstract Controls the distance at which the node should start decelerating. Defaults to 0. Animatable.
+ */
+@property(nonatomic, assign) CGFloat decelerationDistance;
+
+/*!
+ @property damping
+ @abstract Specifies the damping factor of the receiver. Optionally reduce the body's linear velocity each frame to simulate fluid/air friction. Value should be zero or greater. Defaults to 0.1. Animatable.
+ */
+@property(nonatomic, assign) CGFloat damping;
+
+@end
+
+// MARK: -
+
+/*!
+ @class SCNSliderConstraint
+ @abstract A SCNSliderConstraint constraint makes a node to collide and slide against a category of nodes
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNSliderConstraint : SCNConstraint
+
+/*!
+ @method accelerationConstraint
+ @abstract Creates and returns a SCNSliderConstraint object.
+ */
++ (instancetype)sliderConstraint;
+
+/*!
+ @property collisionCategoryBitMask
+ @abstract Defines the category of node to collide against. Defaults to 0.
+ */
+@property (nonatomic, assign) NSUInteger collisionCategoryBitMask;
+
+/*!
+ @property radius
+ @abstract Defines the radius of the slider. Defaults to 1.
+ */
+@property (nonatomic, assign) CGFloat radius;
+
+/*!
+ @property offset
+ @abstract Defines the offset of the slider. Defaults to (0,0,0).
+ */
+@property (nonatomic, assign) SCNVector3 offset;
+
+@end
+
+// MARK: -
+
+@class SCNAvoidOccluderConstraint;
+
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@protocol SCNAvoidOccluderConstraintDelegate <NSObject>
+@optional
+- (BOOL)avoidOccluderConstraint:(SCNAvoidOccluderConstraint *)constraint shouldAvoidOccluder:(SCNNode *)occluder forNode:(SCNNode *)node;
+- (void)avoidOccluderConstraint:(SCNAvoidOccluderConstraint *)constraint didAvoidOccluder:(SCNNode *)occluder forNode:(SCNNode *)node;
+@end
+
+/*!
+ @class SCNAvoidOccluderConstraint
+ @abstract A SCNAvoidOccluderConstraint constraints place the receiver at a position that prevent nodes with the specified category to occlude the target.
+ @discussion The target node and it's children are ignored as potential occluders.
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNAvoidOccluderConstraint : SCNConstraint
+
+/*!
+ @method avoidOccluderConstraintWithTarget
+ @abstract Creates and returns a SCNAvoidOccluderConstraint object.
+ */
++ (instancetype)avoidOccluderConstraintWithTarget:(nullable SCNNode *)target;
+
+/*!
+ @property delegate
+ @abstract The receiver's delegate
+ */
+@property (nonatomic, assign) id<SCNAvoidOccluderConstraintDelegate> delegate;
+
+/*!
+ @property target
+ @abstract Defines the target node
+ */
+@property (nonatomic, retain, nullable) SCNNode *target;
+
+/*!
+ @property occluderCategoryBitMask
+ @abstract Defines the category of node to consider as occluder. Defaults to 1.
+ */
+@property (nonatomic, assign) NSUInteger occluderCategoryBitMask;
+
+/*!
+ @property bias
+ @abstract Defines the bias the apply after moving the receiver to avoid occluders. Defaults to 10e-5.
+ @discussion A positive bias will move the receiver closer to the target.
+ */
+@property (nonatomic, assign) CGFloat bias;
+
+@end
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h 2016-08-05 02:35:40.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNGeometry.h 2017-05-19 02:22:15.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNGeometry.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -13,16 +13,17 @@
@class SCNGeometrySource;
@class SCNGeometryElement;
+@class SCNGeometryTessellator;
@class SCNLevelOfDetail;
@protocol MTLBuffer;
typedef NS_ENUM(NSInteger, SCNGeometryPrimitiveType) {
- SCNGeometryPrimitiveTypeTriangles = 0,
- SCNGeometryPrimitiveTypeTriangleStrip = 1,
- SCNGeometryPrimitiveTypeLine = 2,
- SCNGeometryPrimitiveTypePoint = 3,
+ SCNGeometryPrimitiveTypeTriangles = 0,
+ SCNGeometryPrimitiveTypeTriangleStrip = 1,
+ SCNGeometryPrimitiveTypeLine = 2,
+ SCNGeometryPrimitiveTypePoint = 3,
#if defined(SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH) && SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH >= 2
- SCNGeometryPrimitiveTypePolygon API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)) = 4
+ SCNGeometryPrimitiveTypePolygon API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)) = 4
#endif
};
@@ -40,11 +41,13 @@
FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticNormal;
FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticColor;
FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticTexcoord;
-FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticTangent API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
-FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticVertexCrease API_AVAILABLE(macosx(10.10));
-FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticEdgeCrease API_AVAILABLE(macosx(10.10));
-FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticBoneWeights API_AVAILABLE(macosx(10.10));
-FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticBoneIndices API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticTangent API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
+FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticVertexCrease API_AVAILABLE(macos(10.10));
+FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticEdgeCrease API_AVAILABLE(macos(10.10));
+FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticBoneWeights API_AVAILABLE(macos(10.10));
+FOUNDATION_EXTERN SCNGeometrySourceSemantic const SCNGeometrySourceSemanticBoneIndices API_AVAILABLE(macos(10.10));
+
+// MARK: -
/*!
@class SCNGeometry
@@ -58,7 +61,7 @@
@abstract Creates and returns an empty geometry object.
@discussion An empty geometry may be used as the lowest level of detail of a geometry.
*/
-+ (instancetype)geometry API_AVAILABLE(macosx(10.9));
++ (instancetype)geometry API_AVAILABLE(macos(10.9));
/*!
@property name
@@ -123,7 +126,7 @@
@property geometrySources
@abstract The array of geometry sources of the receiver.
*/
-@property(nonatomic, readonly) NSArray<SCNGeometrySource *> *geometrySources API_AVAILABLE(macosx(10.10));
+@property(nonatomic, readonly) NSArray<SCNGeometrySource *> *geometrySources API_AVAILABLE(macos(10.10));
/*!
@method geometrySourcesForSemantic:
@@ -137,7 +140,7 @@
@property geometryElements
@abstract The array of geometry elements of the receiver.
*/
-@property(nonatomic, readonly) NSArray<SCNGeometryElement *> *geometryElements API_AVAILABLE(macosx(10.10));
+@property(nonatomic, readonly) NSArray<SCNGeometryElement *> *geometryElements API_AVAILABLE(macos(10.10));
/*!
@property geometryElementCount
@@ -156,31 +159,47 @@
@property levelsOfDetail
@abstract Determines the receiver's levels of detail. Defaults to nil.
*/
-@property(nonatomic, copy, nullable) NSArray<SCNLevelOfDetail *> *levelsOfDetail API_AVAILABLE(macosx(10.9));
+@property(nonatomic, copy, nullable) NSArray<SCNLevelOfDetail *> *levelsOfDetail API_AVAILABLE(macos(10.9));
+
+/*!
+ @property tessellator
+ @abstract Specifies how the geometry should be tessellated at render time on the GPU. Defaults to nil.
+ */
+#if SCN_ENABLE_METAL
+@property(nonatomic, retain, nullable) SCNGeometryTessellator *tessellator API_AVAILABLE(macos(10.13), ios(11.0)) API_UNAVAILABLE(tvos, watchos);
+#endif
/*!
@property subdivisionLevel
@abstract Specifies the subdivision level of the receiver. Defaults to 0.
- @discussion A subdivision level of 0 means no subdivision.
+ @discussion A subdivision level of 0 means no subdivision. When a SCNGeometrySubdivisionSurfaceTessellator is set the subdivision is done on the GPU and the receiver's subdivisionLevel is added to the tessellator's subdivisionLevel.
*/
-@property(nonatomic) NSUInteger subdivisionLevel API_AVAILABLE(macosx(10.10));
+@property(nonatomic) NSUInteger subdivisionLevel API_AVAILABLE(macos(10.10));
+
+/*!
+ @property wantsAdaptiveSubdivision
+ @abstract Specifies if the subdivision is adaptive or uniform. Defaults to NO.
+ @discussion Setting wantsAdaptiveSubdivision to YES doesn't ensure that the subdivision will be adaptive. Adaptive subdivision are only supported by some topologies (quads only).
+ */
+@property (nonatomic) BOOL wantsAdaptiveSubdivision API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
@property edgeCreasesElement
@abstract Specifies the edges creases that control the subdivision. Defaults to nil.
@discussion The primitive type of this geometry element must be SCNGeometryPrimitiveTypeLine. See subdivisionLevel above to control the level of subdivision. See edgeCreasesElement above to specify edges for edge creases.
*/
-@property(nonatomic, retain, nullable) SCNGeometryElement *edgeCreasesElement API_AVAILABLE(macosx(10.10));
+@property(nonatomic, retain, nullable) SCNGeometryElement *edgeCreasesElement API_AVAILABLE(macos(10.10));
/*!
@property edgeCreasesSource
@abstract Specifies the crease value of the edges specified by edgeCreasesElement. Defaults to nil.
@discussion The semantic of this geometry source must be "SCNGeometrySourceSemanticEdgeCrease". The creases values are floating values between 0 and 10, where 0 means smooth and 10 means infinitely sharp. See subdivisionLevel above to control the level of subdivision. See edgeCreasesElement above to specify edges for edge creases.
*/
-@property(nonatomic, retain, nullable) SCNGeometrySource *edgeCreasesSource API_AVAILABLE(macosx(10.10));
+@property(nonatomic, retain, nullable) SCNGeometrySource *edgeCreasesSource API_AVAILABLE(macos(10.10));
@end
+// MARK: -
/*!
@class SCNGeometrySource
@@ -234,7 +253,7 @@
/*!
@method geometrySourceWithBuffer:semantic:vectorCount:floatComponents:componentsPerVector:bytesPerComponent:dataOffset:dataStride:
@abstract Creates and returns a geometry source from the given data and parameters.
- @param buffer A metal buffer.
+ @param mtlBuffer A metal buffer.
@param vertexFormat The vertex format.
@param semantic The semantic of the geometry source.
@param vertexCount The number of vertex.
@@ -262,7 +281,7 @@
}
*/
-+ (instancetype)geometrySourceWithBuffer:(id <MTLBuffer>)mtlBuffer vertexFormat:(MTLVertexFormat)vertexFormat semantic:(SCNGeometrySourceSemantic)semantic vertexCount:(NSInteger)vertexCount dataOffset:(NSInteger)offset dataStride:(NSInteger)stride API_AVAILABLE(macosx(10.11), ios(9.0));
++ (instancetype)geometrySourceWithBuffer:(id <MTLBuffer>)mtlBuffer vertexFormat:(MTLVertexFormat)vertexFormat semantic:(SCNGeometrySourceSemantic)semantic vertexCount:(NSInteger)vertexCount dataOffset:(NSInteger)offset dataStride:(NSInteger)stride API_AVAILABLE(macos(10.11), ios(9.0));
#endif
/*!
@@ -315,6 +334,7 @@
@end
+// MARK: -
/*!
@class SCNGeometryElement
@@ -352,11 +372,105 @@
@property(nonatomic, readonly) NSInteger primitiveCount;
/*!
+ @property primitiveRange
+ @abstract <#primitiveRange description#>
+ */
+@property(nonatomic) NSRange primitiveRange API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
@property bytesPerIndex
@abstract The number of bytes that represent an index value
*/
@property(nonatomic, readonly) NSInteger bytesPerIndex;
+/*!
+ @property pointSize, in local space.
+ */
+@property(nonatomic) CGFloat pointSize API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property minimumPointScreenSpaceRadius
+ */
+@property(nonatomic) CGFloat minimumPointScreenSpaceRadius API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property maximumPointScreenSpaceRadius
+ */
+@property(nonatomic) CGFloat maximumPointScreenSpaceRadius API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
@end
+// MARK: -
+
+#if SCN_ENABLE_METAL
+
+typedef NS_ENUM(NSInteger, SCNTessellationSmoothingMode) {
+ SCNTessellationSmoothingModeNone = 0,
+ SCNTessellationSmoothingModePNTriangles,
+ SCNTessellationSmoothingModePhong
+} API_AVAILABLE(macos(10.13), ios(11.0)) API_UNAVAILABLE(tvos, watchos);
+
+/*!
+ @class SCNGeometryTessellator
+ @abstract A geometry tessellator describes how a more detailed surface is calculated from the geometry's initial surface.
+ */
+
+API_AVAILABLE(macos(10.13), ios(11.0)) API_UNAVAILABLE(tvos, watchos)
+@interface SCNGeometryTessellator : NSObject <NSCopying, NSSecureCoding>
+
+/*!
+ @property adaptive
+ @abstract Specifies if the tessellation should be uniform or adaptive. Defaults to NO.
+ */
+@property (nonatomic, getter=isAdaptive) BOOL adaptive;
+
+/*!
+ @property screenspace
+ @abstract Specifies if the level of tessellation should be adapted in screenSpace. Defaults to NO.
+ */
+@property (nonatomic, getter=isScreenSpace) BOOL screenSpace;
+
+/*!
+ @property tessellationFactorScale
+ @abstract Specifies the scale factor applied to the per-patch tessellation factors. Defaults to 1.
+ */
+@property (nonatomic) CGFloat tessellationFactorScale;
+
+/*!
+ @property edgeTessellationFactor
+ @abstract Specifies the edge tessellation factor. Defaults to 1.
+ @discussion This has no effect for adaptive subdivision
+ */
+@property (nonatomic) CGFloat edgeTessellationFactor;
+
+/*!
+ @property insideTessellationFactor
+ @abstract Specifies the inside tessellation factor. Defaults to 1.
+ @discussion This has no effect for adaptive subdivision
+ */
+@property (nonatomic) CGFloat insideTessellationFactor;
+
+/*!
+ @property maximumEdgeLength
+ @abstract Specifies the maximum edge length. Defaults to 1.
+ @discussion This has no effect for non-adaptive subdivision
+ */
+@property (nonatomic) CGFloat maximumEdgeLength;
+
+/*!
+ @property tessellationPartitionMode
+ @abstract Specifies the tessellation partition mode. Defaults to MTLTessellationPartitionModePow2.
+ */
+@property (nonatomic) MTLTessellationPartitionMode tessellationPartitionMode;
+
+/*!
+ @property smoothingMode
+ @abstract Defaults to SCNTessellationSmoothingModeNone.
+ */
+@property(nonatomic) SCNTessellationSmoothingMode smoothingMode;
+
+@end
+
+#endif
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h 2016-08-05 02:31:37.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNHitTest.h 2017-05-25 07:28:27.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNHitTest.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -10,6 +10,15 @@
@class SCNNode;
+/*! @enum SCNHitTestSearchMode
+ @abstract hit test modes
+ */
+typedef NS_ENUM(NSInteger, SCNHitTestSearchMode) {
+ SCNHitTestSearchModeClosest = 0, // The closest object found.
+ SCNHitTestSearchModeAll = 1, // All found objects sorted from nearest to farthest.
+ SCNHitTestSearchModeAny = 2 // The first object found. This object is not necessarily the nearest.
+} API_AVAILABLE(macos(10.13), ios(12.0), tvos(12.0), watchos(4.0));
+
/*! @group Hit-test options */
#if defined(SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH) && SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH >= 3
@@ -18,15 +27,17 @@
typedef NSString * SCNHitTestOption;
#endif
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestFirstFoundOnlyKey; // If set to YES, returns the first object found. This object is not necessarily the nearest. Defaults to NO.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestSortResultsKey; // Determines whether the results should be sorted. If set to YES sorts nearest objects first. Defaults to YES.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestClipToZRangeKey; // If set to YES ignores the objects clipped by the zNear/zFar range of the current point of view. Defaults to YES.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestBackFaceCullingKey; // If set to YES ignores the faces not facing to the camera. Defaults to YES.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestBoundingBoxOnlyKey; // If set to YES only tests the bounding boxes of the 3D objects. Defaults to NO.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestIgnoreChildNodesKey; // Determines whether the child nodes are ignored. Defaults to NO.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestRootNodeKey; // Specifies the root node to use for the hit test. Defaults to the root node of the scene.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestIgnoreHiddenNodesKey API_AVAILABLE(macosx(10.9)); // Determines whether hidden nodes should be ignored. Defaults to YES.
-FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestOptionCategoryBitMask API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)); // Determines the node categories to test. Defaults to all bits set.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestClipToZRangeKey; // If set to YES ignores the objects clipped by the zNear/zFar range of the current point of view. Defaults to YES.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestBackFaceCullingKey; // If set to YES ignores the faces not facing to the camera. Defaults to YES.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestBoundingBoxOnlyKey; // If set to YES only tests the bounding boxes of the 3D objects. Defaults to NO.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestIgnoreChildNodesKey; // Determines whether the child nodes are ignored. Defaults to NO.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestRootNodeKey; // Specifies the root node to use for the hit test. Defaults to the root node of the scene.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestIgnoreHiddenNodesKey API_AVAILABLE(macos(10.9)); // Determines whether hidden nodes should be ignored. Defaults to YES.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestOptionCategoryBitMask API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)); // Determines the node categories to test. Defaults to all bits set.
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestOptionSearchMode API_AVAILABLE(macos(10.13), ios(12.0), tvos(12.0), watchos(4.0)); // Determines whether the search should be exhaustive. Defaults to SCNHitTestSearchModeClosest.
+
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestFirstFoundOnlyKey; // Deprecated, use SCNHitTestSearchModeAny for the SCNHitTestOptionSearchMode option instead
+FOUNDATION_EXTERN SCNHitTestOption const SCNHitTestSortResultsKey; // Deprecated, use SCNHitTestSearchModeAll for the SCNHitTestOptionSearchMode option instead
#define SCNHitTestOptionFirstFoundOnly SCNHitTestFirstFoundOnlyKey
#define SCNHitTestOptionSortResults SCNHitTestSortResultsKey
@@ -68,7 +79,7 @@
@property(nonatomic, readonly) SCNMatrix4 modelTransform;
/*! The bone node hit. Only available if the node hit has a SCNSkinner attached. */
-@property(nonatomic, readonly) SCNNode *boneNode API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic, readonly, nullable) SCNNode *boneNode API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@method textureCoordinatesWithMappingChannel:
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNJavascript.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNJavascript.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNJavascript.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNJavascript.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNJavascript.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -52,6 +52,6 @@
aNode.transform = {m11:1, m12:0, m13:0 ... m44:1};
*/
-FOUNDATION_EXTERN void SCNExportJavaScriptModule(JSContext *context) API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN void SCNExportJavaScriptModule(JSContext *context) API_AVAILABLE(macos(10.10));
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLayer.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLayer.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLayer.h 2017-02-10 20:01:50.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLayer.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNLayer.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h 2016-08-04 21:18:30.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLevelOfDetail.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNLevelOfDetail.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -13,7 +13,7 @@
@class SCNLevelOfDetail
@abstract SCNLevelOfDetail represents a level of detail of a geometry.
*/
-API_AVAILABLE(macosx(10.9))
+API_AVAILABLE(macos(10.9))
@interface SCNLevelOfDetail : NSObject <NSCopying, NSSecureCoding>
/*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNLight.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNLight.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -23,24 +23,24 @@
typedef NSString * SCNLightType;
#endif
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeAmbient; // Ambient light
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeOmni; // Omnidirectional light
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeDirectional; // Directional light
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeSpot; // Spot light
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeIES API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)); // IES light
-FOUNDATION_EXTERN SCNLightType const SCNLightTypeProbe API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)); // Light probe
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeAmbient; // Ambient light
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeOmni; // Omnidirectional light
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeDirectional; // Directional light
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeSpot; // Spot light
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeIES API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)); // IES light
+FOUNDATION_EXTERN SCNLightType const SCNLightTypeProbe API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)); // Light probe
/*! @enum SCNShadowMode
@abstract The different modes available to compute shadows.
@discussion When the shadow mode is set to SCNShadowModeForward, shadows are computed while computing the lighting. In this mode only the alpha component of the shadow color is used to alter the lighting contribution.
- When the shadow mode is set to SCNShadowModeDeferred shadows are applied as a post process. Shadows are blend over the final image and can therefor be of any arbitrary color. However it is most of the time less effiscient as SCNShadowModeForward, except when a scene has a lot of overdraw.
- When the shadow mode is set to SCNShadowModeModulated the light doesn't illuminate the scene anymore, it only casts shadows. Therefor setting the light color has no effect. In this mode gobos act as a shadow projector: the gobo image is modulated with the shadow receiver's fragments. The typical usage is to use an image of a radial gradient (black to white) that is projected under a character (and use the categoryBitMask of the light and nodes to exclude the character from the shadow receiver).
+ When the shadow mode is set to SCNShadowModeDeferred shadows are applied as a post process. Shadows are blend over the final image and can therefor be of any arbitrary color. However it is most of the time less efficient than SCNShadowModeForward, except when a scene has a lot of overdraw.
+ When the shadow mode is set to SCNShadowModeModulated the light doesn't illuminate the scene anymore, it only casts shadows. Therefore setting the light color has no effect. In this mode gobos act as a shadow projector: the gobo image is modulated with the shadow receiver's fragments. The typical usage is to use an image of a radial gradient (black to white) that is projected under a character (and use the categoryBitMask of the light and nodes to exclude the character from the shadow receiver).
*/
typedef NS_ENUM(NSInteger, SCNShadowMode) {
SCNShadowModeForward = 0,
SCNShadowModeDeferred = 1,
SCNShadowModeModulated = 2
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
/*!
@class SCNLight
@@ -74,14 +74,14 @@
@abstract Specifies the receiver's temperature.
@discussion This specifies the temperature of the light in Kelvin. The renderer multiplies the light's color by the color derived from the light's temperature. Defaults to 6500 (pure white). Animatable.
*/
-@property(nonatomic) CGFloat temperature API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat temperature API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property intensity
@abstract Specifies the receiver's intensity.
@discussion This intensity is used to modulate the light color. When used with a physically-based material, this corresponds to the luminous flux of the light, expressed in lumens (lm). Defaults to 1000. Animatable.
*/
-@property(nonatomic) CGFloat intensity API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) CGFloat intensity API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property name
@@ -102,7 +102,7 @@
/*!
@property shadowColor
@abstract Specifies the color (CGColorRef or NSColor) of the shadow casted by the receiver. Defaults to black. Animatable.
- @discussion on iOS 9 / macOS 10.11 or earlier, this defaults to black 50% transparent.
+ @discussion On iOS 9 or earlier and macOS 10.11 or earlier, this defaults to black 50% transparent.
*/
@property(nonatomic, retain) id shadowColor;
@@ -117,27 +117,64 @@
@abstract Specifies the size of the shadow map.
@discussion The larger the shadow map is the more precise the shadows are but the slower the computation is. If set to {0,0} the size of the shadow map is automatically chosen. Defaults to {0,0}.
*/
-@property(nonatomic) CGSize shadowMapSize API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGSize shadowMapSize API_AVAILABLE(macos(10.10));
/*!
@property shadowSampleCount
@abstract Specifies the number of sample per fragment to compute the shadow map. Defaults to 0.
- @discussion on macOS 10.11 or lower, the shadowSampleCount defaults to 16. On iOS 9 or lower it defaults to 1.0.
+ @discussion On macOS 10.11 or earlier, the shadowSampleCount defaults to 16. On iOS 9 or earlier it defaults to 1.0.
On macOS 10.12, iOS 10 and greater, when the shadowSampleCount is set to 0, a default sample count is chosen depending on the platform.
*/
-@property(nonatomic) NSUInteger shadowSampleCount API_AVAILABLE(macosx(10.10));
+@property(nonatomic) NSUInteger shadowSampleCount API_AVAILABLE(macos(10.10));
/*!
@property shadowMode
@abstract Specified the mode to use to cast shadows. See above for the available modes and their description. Defaults to SCNShadowModeDefered on 10.9 and before, defaults to SCNShadowModeForward otherwise.
*/
-@property(nonatomic) SCNShadowMode shadowMode API_AVAILABLE(macosx(10.10));
+@property(nonatomic) SCNShadowMode shadowMode API_AVAILABLE(macos(10.10));
/*!
@property shadowBias
- @abstrat Specifies the correction to apply to the shadow map to correct acne artefacts. It is multiplied by an implementation-specific value to create a constant depth offset. Defaults to 1.0
+ @abstract Specifies the correction to apply to the shadow map to correct acne artefacts. It is multiplied by an implementation-specific value to create a constant depth offset. Defaults to 1.0
*/
-@property(nonatomic) CGFloat shadowBias API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat shadowBias API_AVAILABLE(macos(10.10));
+
+/*!
+ @property automaticallyAdjustsShadowProjection
+ @abstract Specifies if the shadow map projection should be done automatically or manually by the user. Defaults to YES.
+ */
+@property(nonatomic) BOOL automaticallyAdjustsShadowProjection API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property maximumShadowDistance
+ @abstract Specifies the maximum distance from the viewpoint from which the shadows for the receiver light won't be computed. Defaults to 100.0.
+ */
+@property(nonatomic) CGFloat maximumShadowDistance API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property forcesBackFaceCasters
+ @abstract Render only back faces of the shadow caster when enabled. Defaults to NO.
+ This is a behavior change from previous releases.
+ */
+@property(nonatomic) BOOL forcesBackFaceCasters API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property sampleDistributedShadowMaps
+ @abstract Use the sample distribution of the main rendering to better fit the shadow frusta. Defaults to NO.
+ */
+@property(nonatomic) BOOL sampleDistributedShadowMaps API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property shadowCascadeCount
+ @abstract Specifies the number of distinct shadow maps that will be computed for the receiver light. Defaults to 1. Maximum is 4.
+ */
+@property(nonatomic) NSUInteger shadowCascadeCount API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property shadowCascadeSplittingFactor
+ @abstract Specifies a factor to interpolate between linear splitting (0) and logarithmic splitting (1). Defaults to 0.15.
+ */
+@property(nonatomic) CGFloat shadowCascadeSplittingFactor API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
#pragma mark - Light projection settings for shadows
@@ -147,19 +184,19 @@
@abstract Specifies the orthographic scale used to render from the directional light into the shadow map. Defaults to 1.
@discussion This is only applicable for directional lights.
*/
-@property(nonatomic) CGFloat orthographicScale API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat orthographicScale API_AVAILABLE(macos(10.10));
/*!
@property zNear
- @abstract Specifies the minimal distance between the light and the surface to cast shadow on. If a surface is closer to the light than this minimal distance, then the surface won't be shadowed. The near value must be different than zero. Animatable. Defaults to 1.
+ @abstract Specifies the minimal distance between the light and the surface to cast shadow on. If a surface is closer to the light than this minimal distance, then the surface won't be shadowed. The near value must be different than zero. Animatable. Defaults to 1.
*/
-@property(nonatomic) CGFloat zNear API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat zNear API_AVAILABLE(macos(10.10));
/*!
@property zFar
@abstract Specifies the maximal distance between the light and a visible surface to cast shadow on. If a surface is further from the light than this maximal distance, then the surface won't be shadowed. Animatable. Defaults to 100.
*/
-@property(nonatomic) CGFloat zFar API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat zFar API_AVAILABLE(macos(10.10));
#pragma mark - Attenuation
@@ -168,19 +205,19 @@
@property attenuationStartDistance
@abstract The distance at which the attenuation starts (Omni or Spot light types only). Animatable. Defaults to 0.
*/
-@property(nonatomic) CGFloat attenuationStartDistance API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat attenuationStartDistance API_AVAILABLE(macos(10.10));
/*!
@property attenuationEndDistance
@abstract The distance at which the attenuation ends (Omni or Spot light types only). Animatable. Defaults to 0.
*/
-@property(nonatomic) CGFloat attenuationEndDistance API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat attenuationEndDistance API_AVAILABLE(macos(10.10));
/*!
@property attenuationFalloffExponent
@abstract Specifies the attenuation between the start and end attenuation distances. 0 means a constant attenuation, 1 a linear attenuation and 2 a quadratic attenuation, but any positive value will work (Omni or Spot light types only). Animatable. Defaults to 2.
*/
-@property(nonatomic) CGFloat attenuationFalloffExponent API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat attenuationFalloffExponent API_AVAILABLE(macos(10.10));
#pragma mark - Spot parameters
@@ -189,13 +226,13 @@
@property spotInnerAngle
@abstract The angle in degrees between the spot direction and the lit element below which the lighting is at full strength. Animatable. Defaults to 0.
*/
-@property(nonatomic) CGFloat spotInnerAngle API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat spotInnerAngle API_AVAILABLE(macos(10.10));
/*!
@property spotOuterAngle
@abstract The angle in degrees between the spot direction and the lit element after which the lighting is at zero strength. Animatable. Defaults to 45 degrees.
*/
-@property(nonatomic) CGFloat spotOuterAngle API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat spotOuterAngle API_AVAILABLE(macos(10.10));
#pragma mark - Other
@@ -205,19 +242,19 @@
@abstract Specifies the gobo (or "cookie") of the light, used to control the shape of emitted light. Defaults to nil.
@discussion Gobos are only supported by spot lights.
*/
-@property(nonatomic, readonly, nullable) SCNMaterialProperty *gobo API_AVAILABLE(macosx(10.9));
+@property(nonatomic, readonly, nullable) SCNMaterialProperty *gobo API_AVAILABLE(macos(10.9));
/*!
@property IESProfileURL
@abstract Specifies the IES file from which the shape, direction, and intensity of illumination is determined. Defaults to nil.
*/
-@property(nonatomic, retain, nullable) NSURL *IESProfileURL API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic, retain, nullable) NSURL *IESProfileURL API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property categoryBitMask
@abstract Determines the node categories that will be lit by the receiver. Defaults to all bit set.
*/
-@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macosx(10.10));
+@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macos(10.10));
#pragma mark - Deprecated
@@ -226,7 +263,7 @@
@param key The key for which to return the corresponding attribute.
@abstract Returns the attribute for the specified key. The valid keys are described in the "Light Attributes" constants.
*/
-- (nullable id)attributeForKey:(NSString *)key API_DEPRECATED("Use SCNLight properties instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+- (nullable id)attributeForKey:(NSString *)key API_DEPRECATED("Use SCNLight properties instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@method setAttribute:forKey:
@@ -234,7 +271,7 @@
@param key The name of a property.
@abstract Set the specified attribute for the specified key. The valid keys are described in the "Light Attributes" constants.
*/
-- (void)setAttribute:(nullable id)attribute forKey:(NSString *)key API_DEPRECATED("Use SCNLight properties instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+- (void)setAttribute:(nullable id)attribute forKey:(NSString *)key API_DEPRECATED("Use SCNLight properties instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
@end
@@ -244,25 +281,25 @@
@discussion These keys are deprecated in 10.10. Please use the properties of SCNLight instead.
*/
/*! @constant SCNLightAttenuationStartKey The distance at which the attenuation starts (Omni or Spot light types only). Animatable as "attenuationStart". Defaults to 0. */
-FOUNDATION_EXTERN NSString * const SCNLightAttenuationStartKey API_DEPRECATED("Use SCNLight.attenuationStartDistance instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+FOUNDATION_EXTERN NSString * const SCNLightAttenuationStartKey API_DEPRECATED("Use SCNLight.attenuationStartDistance instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
/*! @constant SCNLightAttenuationEndKey The distance at which the attenuation ends (Omni or Spot light types only). Animatable as "attenuationEnd". Defaults to 0. */
-FOUNDATION_EXTERN NSString * const SCNLightAttenuationEndKey API_DEPRECATED("Use SCNLight.attenuationEndDistance instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+FOUNDATION_EXTERN NSString * const SCNLightAttenuationEndKey API_DEPRECATED("Use SCNLight.attenuationEndDistance instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
/*! @constant SCNLightAttenuationFalloffExponentKey Controls the attenuation between the start and end attenuation distances. 0 means a constant attenuation, 1 a linear attenuation and 2 a quadratic attenuation, but any positive value will work (Omni or Spot light types only). Animatable as "attenuationFalloffExponent". Defaults to 2. */
-FOUNDATION_EXTERN NSString * const SCNLightAttenuationFalloffExponentKey API_DEPRECATED("Use SCNLight.attenuationFalloffExponent instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+FOUNDATION_EXTERN NSString * const SCNLightAttenuationFalloffExponentKey API_DEPRECATED("Use SCNLight.attenuationFalloffExponent instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
/*! @constant SCNLightSpotInnerAngleKey The angle in degrees between the spot direction and the lit element below which the lighting is at full strength. Animatable as "spotInnerAngle". Defaults to 0. */
-FOUNDATION_EXTERN NSString * const SCNLightSpotInnerAngleKey API_DEPRECATED("Use SCNLight.spotInnerAngle instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+FOUNDATION_EXTERN NSString * const SCNLightSpotInnerAngleKey API_DEPRECATED("Use SCNLight.spotInnerAngle instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
/*! @constant SCNLightSpotOuterAngleKey The angle in degrees between the spot direction and the lit element after which the lighting is at zero strength. Animatable as "spotOuterAngle". Defaults to 45 degrees. */
-FOUNDATION_EXTERN NSString * const SCNLightSpotOuterAngleKey API_DEPRECATED("Use SCNLight.spotOuterAngle instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+FOUNDATION_EXTERN NSString * const SCNLightSpotOuterAngleKey API_DEPRECATED("Use SCNLight.spotOuterAngle instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
-/*! @constant SCNLightShadowNearClippingKey Specifies the minimal distance between the light and the surface to cast shadow on. If a surface is closer to the light than this minimal distance, then the surface won't be shadowed. The near value must be different than zero. Animatable as "zNear". Defaults to 1. */
-FOUNDATION_EXTERN NSString * const SCNLightShadowNearClippingKey API_DEPRECATED("Use SCNLight.zNear instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+/*! @constant SCNLightShadowNearClippingKey Specifies the minimal distance between the light and the surface to cast shadow on. If a surface is closer to the light than this minimal distance, then the surface won't be shadowed. The near value must be different than zero. Animatable as "zNear". Defaults to 1. */
+FOUNDATION_EXTERN NSString * const SCNLightShadowNearClippingKey API_DEPRECATED("Use SCNLight.zNear instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
/*! @constant SCNLightShadowFarClippingKey Specifies the maximal distance between the light and a visible surface to cast shadow on. If a surface is further from the light than this maximal distance, then the surface won't be shadowed. Animatable as "zFar". Defaults to 100. */
-FOUNDATION_EXTERN NSString * const SCNLightShadowFarClippingKey API_DEPRECATED("Use SCNLight.zFar instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+FOUNDATION_EXTERN NSString * const SCNLightShadowFarClippingKey API_DEPRECATED("Use SCNLight.zFar instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterial.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNMaterial.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -88,7 +88,12 @@
FOUNDATION_EXTERN SCNLightingModel const SCNLightingModelBlinn;
FOUNDATION_EXTERN SCNLightingModel const SCNLightingModelLambert;
FOUNDATION_EXTERN SCNLightingModel const SCNLightingModelConstant;
-FOUNDATION_EXTERN SCNLightingModel const SCNLightingModelPhysicallyBased API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+FOUNDATION_EXTERN SCNLightingModel const SCNLightingModelPhysicallyBased API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
+
+typedef NS_ENUM(NSUInteger, SCNFillMode) {
+ SCNFillModeFill = 0,
+ SCNFillModeLines = 1
+} API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
typedef NS_ENUM(NSInteger, SCNCullMode) {
SCNCullModeBack = 0,
@@ -99,8 +104,11 @@
#define SCNCullFront SCNCullModeFront
typedef NS_ENUM(NSInteger, SCNTransparencyMode) {
- SCNTransparencyModeAOne = 0,
- SCNTransparencyModeRGBZero = 1
+ SCNTransparencyModeAOne = 0, // Takes the transparency information from the alpha channel. The value 1.0 is opaque.
+ SCNTransparencyModeRGBZero = 1,
+ SCNTransparencyModeSingleLayer API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 2, // Ensures that one layer of transparency is draw correctly.
+ SCNTransparencyModeDualLayer API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 3, // Ensures that two layers of transparency are ordered and drawn correctly. This should be used for transparent convex objects like cubes and spheres, when you want to see both front and back faces.
+ SCNTransparencyModeDefault API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = SCNTransparencyModeAOne
};
/*!
@@ -108,13 +116,14 @@
@abstract Blend modes that SCNMaterial uses to compose with the framebuffer to produce blended colors.
*/
typedef NS_ENUM(NSInteger, SCNBlendMode) {
- SCNBlendModeAlpha = 0, // Blends the source and destination colors by adding the source multiplied by source alpha and the destination multiplied by one minus source alpha.
- SCNBlendModeAdd = 1, // Blends the source and destination colors by adding them up.
- SCNBlendModeSubtract = 2, // Blends the source and destination colors by subtracting the source from the destination.
- SCNBlendModeMultiply = 3, // Blends the source and destination colors by multiplying them.
- SCNBlendModeScreen = 4, // Blends the source and destination colors by multiplying one minus the source with the destination and adding the source.
- SCNBlendModeReplace = 5 // Replaces the destination with the source (ignores alpha).
-} API_AVAILABLE(macosx(10.11), ios(9.0));
+ SCNBlendModeAlpha = 0, // Blends the source and destination colors by adding the source multiplied by source alpha and the destination multiplied by one minus source alpha.
+ SCNBlendModeAdd = 1, // Blends the source and destination colors by adding them up.
+ SCNBlendModeSubtract = 2, // Blends the source and destination colors by subtracting the source from the destination.
+ SCNBlendModeMultiply = 3, // Blends the source and destination colors by multiplying them.
+ SCNBlendModeScreen = 4, // Blends the source and destination colors by multiplying one minus the source with the destination and adding the source.
+ SCNBlendModeReplace = 5, // Replaces the destination with the source (ignores alpha).
+ SCNBlendModeMax API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 6 // Max the destination with the source (ignores alpha).
+} API_AVAILABLE(macos(10.11), ios(9.0));
@class SCNMaterialProperty;
@class SCNProgram;
@@ -140,6 +149,8 @@
*/
@property(nonatomic, copy, nullable) NSString *name;
+// MARK: - Material Properties
+
/*!
@property diffuse
@abstract Specifies the receiver's diffuse property.
@@ -193,28 +204,37 @@
@property(nonatomic, readonly) SCNMaterialProperty *normal;
/*!
+ @property displacement
+ @abstract <TODO>
+ @discussion <TODO, Needs tessellation>
+ */
+@property(nonatomic, readonly) SCNMaterialProperty *displacement API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
@property ambientOcclusion
@abstract The ambientOcclusion property specifies the ambient occlusion of the surface. The ambient occlusion is multiplied with the ambient light, then the result is added to the lighting contribution. This property has no visual impact on scenes that have no ambient light. When an ambient occlusion map is set, the ambient property is ignored.
*/
-@property(nonatomic, readonly) SCNMaterialProperty *ambientOcclusion API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly) SCNMaterialProperty *ambientOcclusion API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property selfIllumination
@abstract The selfIllumination property specifies a texture or a color that is added to the lighting contribution of the surface. When a selfIllumination is set, the emission property is ignored.
*/
-@property(nonatomic, readonly) SCNMaterialProperty *selfIllumination API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly) SCNMaterialProperty *selfIllumination API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property metalness
@abstract The metalness property specifies how metallic the material's surface appears. Lower values (darker colors) cause the material to appear more like a dielectric surface. Higher values (brighter colors) cause the surface to appear more metallic. This property is only used when 'lightingModelName' is 'SCNLightingModelPhysicallyBased'.
*/
-@property(nonatomic, readonly) SCNMaterialProperty *metalness API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic, readonly) SCNMaterialProperty *metalness API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property roughness
@abstract The roughness property specifies the apparent smoothness of the surface. Lower values (darker colors) cause the material to appear shiny, with well-defined specular highlights. Higher values (brighter colors) cause specular highlights to spread out and the diffuse property of the material to become more retroreflective. This property is only used when 'lightingModelName' is 'SCNLightingModelPhysicallyBased'.
*/
-@property(nonatomic, readonly) SCNMaterialProperty *roughness API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic, readonly) SCNMaterialProperty *roughness API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
+
+// MARK: -
/*!
@property shininess
@@ -247,6 +267,12 @@
*/
@property(nonatomic, getter=isDoubleSided) BOOL doubleSided;
+/*!
+ @property fillMode
+ @abstract Determines of to how to rasterize the receiver's primitives. Defaults to SCNFillModeFill.
+ */
+@property(nonatomic) SCNFillMode fillMode API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
/*!
@property cullMode
@abstract Determines the culling mode of the receiver. Defaults to SCNCullBack. Animatable.
@@ -255,9 +281,7 @@
/*!
@property transparencyMode
- @abstract Determines the transparency mode of the receiver. See above for the transparency modes. Defaults to SCNTransparencyModeAOne.
- @discussion SCNTransparencyModeAOne takes the transparency information from the color's alpha channel. The value 1.0 is opaque.
- SCNTransparencyModeRGBZero takes the transparency information from the color's red, green, and blue channels. The value 0.0 is opaque, with each channel modulated independently. With SCNTransparencyModeRGBZero, the alpha value of the transparent property is ignored.
+ @abstract Determines the transparency mode of the receiver. See above for the transparency modes. Defaults to SCNTransparencyModeDefault.
*/
@property(nonatomic) SCNTransparencyMode transparencyMode;
@@ -274,23 +298,28 @@
@property(nonatomic) BOOL writesToDepthBuffer;
/*!
+ @abstract Determines whether the receiver writes to the color buffer when rendered. Defaults to SCNColorMaskAll.
+ */
+@property(nonatomic) SCNColorMask colorBufferWriteMask API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
@property readsFromDepthBuffer
@abstract Determines whether the receiver reads from the depth buffer when rendered. Defaults to YES.
*/
-@property(nonatomic) BOOL readsFromDepthBuffer API_AVAILABLE(macosx(10.9));
+@property(nonatomic) BOOL readsFromDepthBuffer API_AVAILABLE(macos(10.9));
/*!
@property fresnelExponent
@abstract Specifies the receiver's fresnel exponent value. Defaults to 0.0. Animatable.
@discussion The effect of the reflectivity property is modulated by this property. The fresnelExponent changes the exponent of the reflectance. The bigger the exponent, the more concentrated the reflection is around the edges.
*/
-@property(nonatomic) CGFloat fresnelExponent API_AVAILABLE(macosx(10.9));
+@property(nonatomic) CGFloat fresnelExponent API_AVAILABLE(macos(10.9));
/*!
@property blendMode
@abstract Specifies the receiver's blend mode. Defaults to SCNBlendModeAlpha.
*/
-@property(nonatomic) SCNBlendMode blendMode API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic) SCNBlendMode blendMode API_AVAILABLE(macos(10.11), ios(9.0));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMaterialProperty.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNMaterialProperty.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -16,7 +16,7 @@
SCNFilterModeNone = 0,
SCNFilterModeNearest = 1,
SCNFilterModeLinear = 2
-} API_AVAILABLE(macosx(10.9));
+} API_AVAILABLE(macos(10.9));
/*! @enum SCNWrapeMode
@abstract Wrap modes
@@ -26,7 +26,7 @@
SCNWrapModeRepeat = 2,
SCNWrapModeClampToBorder = 3,
SCNWrapModeMirror = 4
-} API_AVAILABLE(macosx(10.9));
+} API_AVAILABLE(macos(10.9));
/*! @class SCNMaterialProperty
@abstract The contents of a SCNMaterial slot
@@ -39,19 +39,17 @@
@method materialPropertyWithContents:
@abstract Creates and initialize a property instance with the specified contents.
*/
-+ (instancetype)materialPropertyWithContents:(id)contents API_AVAILABLE(macosx(10.9));
++ (instancetype)materialPropertyWithContents:(id)contents API_AVAILABLE(macos(10.9));
/*!
@property contents
- @abstract Specifies the receiver's contents. This can be a color (NSColor, UIColor, CGColorRef), an image (NSImage, UIImage, CGImageRef), a layer (CALayer), a path (NSString or NSURL), a SpriteKit scene (SKScene), a texture (SKTexture, id<MTLTexture> or GLKTextureInfo), or a floating value between 0 and 1 (NSNumber) for metalness and roughness properties. Animatable when set to a color.
+ @abstract Specifies the receiver's contents. This can be a color (NSColor, UIColor, CGColorRef), an image (NSImage, UIImage, CGImageRef), a layer (CALayer), a path (NSString or NSURL), a SpriteKit scene (SKScene), a texture (SKTexture, id<MTLTexture> or GLKTextureInfo), or a floating value between 0 and 1 (NSNumber) for metalness and roughness properties. In macOS 10.13, iOS 11.0, tvOS 11.0 and watchOS 4.0 AVCaptureDevice and AVPlayer are also supported. Animatable when set to a color.
@discussion Setting the contents to an instance of SKTexture will automatically update the wrapS, wrapT, contentsTransform, minification, magnification and mip filters according to the SKTexture settings.
When a cube map is expected (e.g. SCNMaterial.reflective, SCNScene.background, SCNScene.lightingEnvironment) you can use
- 1. A horizontal strip image where `6 * image.height == image.width`
- 2. A vertical strip image where ` image.height == 6 * image.width`
- 3. A horizontal cross image where `4 * image.height == 3 * image.width`
- 4. A vertical cross image where `3 * image.height == 4 * image.width`
- 5. A lat/long image where ` image.height == 2 * image.width`
- 6. A NSArray of 6 images. This array must contain images of the exact same dimensions, in the following order, in a left-handed coordinate system: +X, -X, +Y, -Y, +Z, -Z (or Right, Left, Top, Bottom, Front, Back).
+ 1. A horizontal strip image where `6 * image.height == image.width`
+ 2. A vertical strip image where ` image.height == 6 * image.width`
+ 3. A spherical projection image (latitude/longitude) where `2 * image.height == image.width`
+ 4. A NSArray of 6 images. This array must contain images of the exact same dimensions, in the following order, in a left-handed coordinate system: +X, -X, +Y, -Y, +Z, -Z (or Right, Left, Top, Bottom, Front, Back).
*/
@property(nonatomic, retain, nullable) id contents;
@@ -61,7 +59,7 @@
It dims the diffuse, specular and emission properties, it varies the bumpiness of the normal property and the
filter property is blended with white. Default value is 1.0. Animatable.
*/
-@property(nonatomic) CGFloat intensity API_AVAILABLE(macosx(10.9));
+@property(nonatomic) CGFloat intensity API_AVAILABLE(macos(10.9));
/*!
@property minificationFilter
@@ -80,7 +78,7 @@
/*!
@property mipFilter
@abstract Specifies the mipmap filter to use during minification.
- @discussion Defaults to SCNFilterModeNone on macOS 10.11 and iOS 9 or earlier, SCNFilterModeNearest starting in macOS 10.12 and iOS 10.
+ @discussion Defaults to SCNFilterModeNone on macOS 10.11 or earlier and iOS 9 or earlier, SCNFilterModeNearest starting in macOS 10.12 and iOS 10.
*/
@property(nonatomic) SCNFilterMode mipFilter;
@@ -107,7 +105,7 @@
@abstract Determines the receiver's border color (CGColorRef or NSColor). Animatable.
@discussion The border color is ignored on iOS and is always considered as clear color (0,0,0,0) when the texture has an alpha channel and opaque back (0,0,0,1) otherwise.
*/
-@property(nonatomic, retain, nullable) id borderColor API_DEPRECATED("Deprecated", macosx(10.8, 10.12), ios(8.0, 10.0)) API_UNAVAILABLE(watchos, tvos);
+@property(nonatomic, retain, nullable) id borderColor API_DEPRECATED("Deprecated", macos(10.8, 10.12), ios(8.0, 10.0)) API_UNAVAILABLE(watchos, tvos);
/*!
@property mappingChannel
@@ -117,11 +115,19 @@
@property(nonatomic) NSInteger mappingChannel;
/*!
+ @property textureComponents
+ @abstract Specifies the texture components to sample in the shader. Defaults to SCNTextureComponentAll.
+ @discussion Use this property to when using a texture that combine multiple informations in the different texture components. For example if you pack the roughness in red and metalness in blue etc... You can specify what component to use from the texture for this given material property. This property is only supported by Metal renderers.
+ */
+@property(nonatomic) SCNColorMask textureComponents API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+
+/*!
@property maxAnisotropy
@abstract Specifies the receiver's max anisotropy. Defaults to MAXFLOAT.
@discussion Anisotropic filtering reduces blur and preserves detail at extreme viewing angles.
*/
-@property(nonatomic) CGFloat maxAnisotropy API_AVAILABLE(macosx(10.9));
+@property(nonatomic) CGFloat maxAnisotropy API_AVAILABLE(macos(10.9));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMorpher.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMorpher.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMorpher.h 2016-08-04 21:18:30.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNMorpher.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNMorpher.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -11,17 +11,16 @@
@class SCNGeometry;
-/*!
- @class SCNMorpher
- @abstract SCNMorpher controls the deformation of morphed geometries
- */
-
typedef NS_ENUM(NSInteger, SCNMorpherCalculationMode) {
SCNMorpherCalculationModeNormalized = 0, // (1 - w0 - w1 - ...) * BaseMesh + w0 * Target0 + w1 * Target1 + ...
SCNMorpherCalculationModeAdditive = 1 // BaseMesh + w0 * Target0 + w1 * Target1 + ...
};
-API_AVAILABLE(macosx(10.9))
+/*!
+ @class SCNMorpher
+ @abstract SCNMorpher controls the deformation of morphed geometries
+ */
+API_AVAILABLE(macos(10.9))
@interface SCNMorpher : NSObject <SCNAnimatable, NSSecureCoding>
/*!
@@ -33,7 +32,7 @@
/*!
@method setWeight:forTargetAtIndex:
- @abstract Sets the weight for the target at the specified index. Animatable implicitly or explicitly with the keyPath "weights[index]".
+ @abstract Sets the weight for the target at the specified index. Animatable implicitly or explicitly with the keyPath "weights[index]" or "weights[targetName]" (targetName is the name of the target geometry).
*/
- (void)setWeight:(CGFloat)weight forTargetAtIndex:(NSUInteger)targetIndex;
@@ -49,6 +48,33 @@
*/
@property(nonatomic) SCNMorpherCalculationMode calculationMode;
+/*!
+ @property weights
+ @abstract Access to all the weights of all the targets.
+ */
+@property (nonatomic, retain) NSArray<NSNumber *> *weights API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property unifiesNormals
+ @abstract When set to YES the normals are not morphed but are recomputed after morphing the vertex instead. When set to NO, the morpher will morph the normals if the geometry targets have normals. Defaults to NO.
+ */
+@property BOOL unifiesNormals API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property channelTargetWeights
+ @abstract Specifies the number of target shapes per channel.
+ @discussion Can be NULL if every channel contains only one target shape. Defaults to NULL.
+ @seealso channelTargetWeights
+ */
+@property (nonatomic, retain, nullable) NSArray<NSNumber *> *channelTargetCounts API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property channelTargetWeights
+ @abstract the weights at which the (in-between) target shapes are placed (0..1).
+ @discussion Can be NULL if every channel contains only one target shape.
+ */
+@property (nonatomic, retain, nullable) NSArray<NSNumber *> *channelTargetWeights API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
@end
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNNode.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,12 +1,13 @@
//
// SCNNode.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNAnimation.h>
#import <SceneKit/SCNBoundingVolume.h>
#import <SceneKit/SCNAction.h>
+#include <AvailabilityMacros.h>
NS_ASSUME_NONNULL_BEGIN
@@ -43,7 +44,16 @@
typedef NS_ENUM(NSInteger, SCNMovabilityHint) {
SCNMovabilityHintFixed,
SCNMovabilityHintMovable,
-} API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+} API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
+
+/*! @enum SCNNodeFocusBehavior
+ @abstract Control the focus (UIFocus) behavior.
+ */
+typedef NS_ENUM(NSInteger, SCNNodeFocusBehavior) {
+ SCNNodeFocusBehaviorNone = 0, // Not focusable and node has no impact on other nodes that have focus interaction enabled.
+ SCNNodeFocusBehaviorOccluding, // Not focusable, but will prevent other focusable nodes that this node visually obscures from being focusable.
+ SCNNodeFocusBehaviorFocusable // Focusable and will also prevent other focusable nodes that this node visually obscures from being focusable.
+} API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
/*!
@class SCNNode
@@ -51,7 +61,6 @@
@discussion It encapsulates the position, rotations, and other transforms of a node, which define a coordinate system.
The coordinate systems of all the sub-nodes are relative to the one of their parent node.
*/
-
@interface SCNNode : NSObject <NSCopying, NSSecureCoding, SCNAnimatable, SCNActionable, SCNBoundingVolume>
#pragma mark - Creating a Node
@@ -88,7 +97,7 @@
@abstract Returns a clone of the node containing a geometry that concatenates all the geometries contained in the node hierarchy.
The returned clone is autoreleased.
*/
-- (instancetype)flattenedClone API_AVAILABLE(macosx(10.9));
+- (instancetype)flattenedClone API_AVAILABLE(macos(10.9));
@@ -123,13 +132,13 @@
@property skinner
@abstract Returns the skinner attached to the receiver.
*/
-@property(nonatomic, retain, nullable) SCNSkinner *skinner API_AVAILABLE(macosx(10.9));
+@property(nonatomic, retain, nullable) SCNSkinner *skinner API_AVAILABLE(macos(10.9));
/*!
@property morpher
@abstract Returns the morpher attached to the receiver.
*/
-@property(nonatomic, retain, nullable) SCNMorpher *morpher API_AVAILABLE(macosx(10.9));
+@property(nonatomic, retain, nullable) SCNMorpher *morpher API_AVAILABLE(macos(10.9));
@@ -159,7 +168,14 @@
@property orientation
@abstract Determines the receiver's orientation as a unit quaternion. Animatable.
*/
-@property(nonatomic) SCNQuaternion orientation API_AVAILABLE(macosx(10.10));
+@property(nonatomic) SCNQuaternion orientation API_AVAILABLE(macos(10.10));
+
+/*!
+ @property worldOrientation
+ @abstract Determines the receiver's orientation relative to the scene as a unit quaternion. Animatable.
+ */
+@property(nonatomic) SCNQuaternion worldOrientation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
/*!
@property eulerAngles
@@ -173,7 +189,7 @@
2. then yaw
3. then pitch
*/
-@property(nonatomic) SCNVector3 eulerAngles API_AVAILABLE(macosx(10.10));
+@property(nonatomic) SCNVector3 eulerAngles API_AVAILABLE(macos(10.10));
/*!
@property scale
@@ -188,13 +204,19 @@
@property(nonatomic) SCNMatrix4 pivot;
/*!
+ @property worldPosition
+ @abstract Returns the receiver's world position.
+ @discussion A world position is the position relative to the scene.
+ */
+@property(nonatomic) SCNVector3 worldPosition API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
@property worldTransform
@abstract Returns the receiver's world transform.
@discussion A world transform is the transform relative to the scene.
*/
@property(nonatomic, readonly) SCNMatrix4 worldTransform;
-
-
+- (void)setWorldTransform:(SCNMatrix4)worldTransform API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
#pragma mark - Modifying the Node′s Visibility
@@ -221,13 +243,13 @@
@property castsShadow
@abstract Determines if the node is rendered in shadow maps. Defaults to YES.
*/
-@property(nonatomic) BOOL castsShadow API_AVAILABLE(macosx(10.10));
+@property(nonatomic) BOOL castsShadow API_AVAILABLE(macos(10.10));
/*!
@property movabilityHint
@abstract Give hints oregarding the movability of the receiver. See enum above for details. Defaults to SCNMovabilityHintFixed.
*/
-@property (nonatomic) SCNMovabilityHint movabilityHint API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property (nonatomic) SCNMovabilityHint movabilityHint API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
#pragma mark - Managing the Node Hierarchy
@@ -301,7 +323,7 @@
@discussion The search is recursive and uses a pre-order tree traversal.
@param block The block to apply to child nodes of the receiver. The block takes two arguments: "child" is a child node and "stop" is a reference to a Boolean value. The block can set the value to YES to stop further processing of the node hierarchy. The stop argument is an out-only argument. You should only ever set this Boolean to YES within the Block.
*/
-- (void)enumerateChildNodesUsingBlock:(NS_NOESCAPE void (^)(SCNNode *child, BOOL *stop))block API_AVAILABLE(macosx(10.10));
+- (void)enumerateChildNodesUsingBlock:(NS_NOESCAPE void (^)(SCNNode *child, BOOL *stop))block API_AVAILABLE(macos(10.10));
/*!
@method enumerateHierarchyUsingBlock:
@@ -309,7 +331,7 @@
@discussion The search is recursive and uses a pre-order tree traversal.
@param block The block to apply to the receiver and its child nodes. The block takes two arguments: "node" is a node in the hierarchy of the receiver (including the receiver) and "stop" is a reference to a Boolean value. The block can set the value to YES to stop further processing of the node hierarchy. The stop argument is an out-only argument. You should only ever set this Boolean to YES within the Block.
*/
-- (void)enumerateHierarchyUsingBlock:(NS_NOESCAPE void (^)(SCNNode *node, BOOL *stop))block API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+- (void)enumerateHierarchyUsingBlock:(NS_NOESCAPE void (^)(SCNNode *node, BOOL *stop))block API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
#pragma mark - Converting Between Node Coordinate Systems
@@ -320,7 +342,7 @@
@param position A position specified in the local coordinate system of the receiver.
@param node The node into whose coordinate system "position" is to be converted. If "node" is nil, this method instead converts to world coordinates.
*/
-- (SCNVector3)convertPosition:(SCNVector3)position toNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.9));
+- (SCNVector3)convertPosition:(SCNVector3)position toNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.9));
/*!
@method convertPosition:fromNode:
@@ -328,7 +350,30 @@
@param position A position specified in the local coordinate system of "node".
@param node The node from whose coordinate system "position" is to be converted. If "node" is nil, this method instead converts from world coordinates.
*/
-- (SCNVector3)convertPosition:(SCNVector3)position fromNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.9));
+- (SCNVector3)convertPosition:(SCNVector3)position fromNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.9));
+
+
+/**
+ @abstract Converts a vector from the coordinate system of a given node to that of the receiver.
+
+ @param vector A vector specified in the local coordinate system the receiver.
+ @param node The node defining the space from which the vector should be transformed. If "node" is nil, this method instead converts from world coordinates.
+
+ @return vector transformed from receiver local space to node local space.
+ */
+- (SCNVector3)convertVector:(SCNVector3)vector toNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+
+/**
+ @abstract Converts a vector from the coordinate system of a given node to that of the receiver.
+
+ @param vector A vector specified in the local coordinate system of "node".
+ @param node The node defining the space to which the vector should be transformed to. If "node" is nil, this method instead converts from world coordinates.
+
+ @return vector transformed from node space to reveiver local space.
+ */
+- (SCNVector3)convertVector:(SCNVector3)vector fromNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
/*!
@method convertTransform:toNode:
@@ -336,7 +381,7 @@
@param transform A transform specified in the local coordinate system of the receiver.
@param node The node into whose coordinate system "transform" is to be converted. If "node" is nil, this method instead converts to world coordinates.
*/
-- (SCNMatrix4)convertTransform:(SCNMatrix4)transform toNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.9));
+- (SCNMatrix4)convertTransform:(SCNMatrix4)transform toNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.9));
/*!
@method convertTransform:fromNode:
@@ -344,7 +389,7 @@
@param transform A transform specified in the local coordinate system of "node".
@param node The node from whose coordinate system "transform" is to be converted. If "node" is nil, this method instead converts from world coordinates.
*/
-- (SCNMatrix4)convertTransform:(SCNMatrix4)transform fromNode:(nullable SCNNode *)node API_AVAILABLE(macosx(10.9));
+- (SCNMatrix4)convertTransform:(SCNMatrix4)transform fromNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.9));
#pragma mark - Managing the SCNNode′s physics body
@@ -354,7 +399,7 @@
@abstract The description of the physics body of the receiver.
@discussion Default is nil.
*/
-@property(nonatomic, retain, nullable) SCNPhysicsBody *physicsBody API_AVAILABLE(macosx(10.10));
+@property(nonatomic, retain, nullable) SCNPhysicsBody *physicsBody API_AVAILABLE(macos(10.10));
#pragma mark - Managing the Node′s Physics Field
@@ -364,7 +409,7 @@
@abstract The description of the physics field of the receiver.
@discussion Default is nil.
*/
-@property(nonatomic, retain, nullable) SCNPhysicsField *physicsField API_AVAILABLE(macosx(10.10));
+@property(nonatomic, retain, nullable) SCNPhysicsField *physicsField API_AVAILABLE(macos(10.10));
#pragma mark - Managing the Node′s Constraints
@@ -374,7 +419,7 @@
@abstract An array of SCNConstraint that are applied to the receiver.
@discussion Adding or removing a constraint can be implicitly animated based on the current transaction.
*/
-@property(copy, nullable) NSArray<SCNConstraint *> *constraints API_AVAILABLE(macosx(10.9));
+@property(copy, nullable) NSArray<SCNConstraint *> *constraints API_AVAILABLE(macos(10.9));
#pragma mark - Accessing the Node′s Filters
@@ -384,13 +429,13 @@
@abstract An array of Core Image filters that are applied to the rendering of the receiver and its child nodes. Animatable.
@discussion Defaults to nil. Filter properties should be modified by calling setValue:forKeyPath: on each node that the filter is attached to. If the inputs of the filter are modified directly after the filter is attached to a node, the behavior is undefined.
*/
-@property(nonatomic, copy, nullable) NSArray<CIFilter *> *filters API_AVAILABLE(macosx(10.9)) __WATCHOS_PROHIBITED;
+@property(nonatomic, copy, nullable) NSArray<CIFilter *> *filters API_AVAILABLE(macos(10.9)) __WATCHOS_PROHIBITED;
#pragma mark - Accessing the Presentation Node
/*!
- @method presentationNode
+ @property presentationNode
@abstract Returns the presentation node.
@discussion Returns a copy of the node containing all the properties as they were at the start of the current transaction, with any active animations applied.
This gives a close approximation to the version of the node that is currently displayed.
@@ -405,7 +450,7 @@
@property paused
@abstract Controls whether or not the node's actions and animations are updated or paused. Defaults to NO.
*/
-@property(nonatomic, getter=isPaused) BOOL paused API_AVAILABLE(macosx(10.10));
+@property(nonatomic, getter=isPaused) BOOL paused API_AVAILABLE(macos(10.10));
#pragma mark - Overriding the Rendering with Custom OpenGL Code
@@ -431,7 +476,7 @@
@param options Optional parameters (see the "Hit test options" section in SCNSceneRenderer.h for the available options).
@discussion See SCNSceneRenderer.h for a screen-space hit testing method.
*/
-- (NSArray<SCNHitTestResult *> *)hitTestWithSegmentFromPoint:(SCNVector3)pointA toPoint:(SCNVector3)pointB options:(nullable NSDictionary<NSString *, id> *)options API_AVAILABLE(macosx(10.9));
+- (NSArray<SCNHitTestResult *> *)hitTestWithSegmentFromPoint:(SCNVector3)pointA toPoint:(SCNVector3)pointB options:(nullable NSDictionary<NSString *, id> *)options API_AVAILABLE(macos(10.9));
#pragma mark - Categories
@@ -444,11 +489,97 @@
2. include/exclude nodes from render passes (see SCNTechnique.h)
3. specify which nodes to use when hit-testing (see SCNHitTestOptionCategoryBitMask)
*/
-@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macosx(10.10));
+@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macos(10.10));
+
+#pragma mark - UIFocus support
+
+/*!
+ @property focusBehavior
+ @abstract Controls the behavior of the receiver regarding the UIFocus system. Defaults to SCNNodeFocusBehaviorNone.
+ */
+@property (nonatomic) SCNNodeFocusBehavior focusBehavior API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
@end
+@interface SCNNode (Transforms)
+
+/*!
+ @property up
+ @abstract The local unit Y axis.
+ */
+@property (class, readonly, nonatomic) SCNVector3 localUp API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property right
+ @abstract the local unit X axis.
+ */
+@property (class, readonly, nonatomic) SCNVector3 localRight API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property front
+ @abstract the local unit -Z axis.
+ */
+@property (class, readonly, nonatomic) SCNVector3 localFront API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property up
+ @abstract The local unit Y axis in the world space.
+ */
+@property (readonly, nonatomic) SCNVector3 worldUp API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property right
+ @abstract the local unit X axis in the world space.
+ */
+@property (readonly, nonatomic) SCNVector3 worldRight API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property front
+ @abstract the local unit -Z axis in the world space.
+ */
+@property (readonly, nonatomic) SCNVector3 worldFront API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Convenience for calling lookAt:up:localFront: with worldUp set to [self worldUp]
+ and localFront [SCNNode localFront].
+ @param worldTarget target position in world space.
+ */
+- (void)lookAt:(SCNVector3)worldTarget API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Set the orientation of the node so its front vector is pointing toward a given
+ target. Using a reference up vector in world space and a front vector in
+ local space.
+
+ @param worldTarget position in world space.
+ @param worldUp the up vector in world space.
+ @param localFront the front vector in local space.
+ */
+- (void)lookAt:(SCNVector3)worldTarget up:(SCNVector3)worldUp localFront:(SCNVector3)localFront API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Translate the current node position along the given vector in local space.
+
+ @param translation the translation in local space.
+ */
+- (void)localTranslateBy:(SCNVector3)translation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Apply a the given rotation to the current one.
+
+ @param rotation rotation in local space.
+ */
+- (void)localRotateBy:(SCNQuaternion)rotation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/**
+ Apply a rotation relative to a target point in parent space.
+ @param worldRotation rotation to apply in world space.
+ @param worldTarget position of the target in world space.
+ */
+- (void)rotateBy:(SCNQuaternion)worldRotation aroundTarget:(SCNVector3)worldTarget API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+@end
/*!
@category NSObject (SCNNodeRendererDelegate)
@@ -471,4 +602,103 @@
@end
+
+
+
+#if !defined(MAC_OS_X_VERSION_10_13) && !defined(SCN_SIMD_10_12_COMPATIBILITY)
+typedef struct { vector_float4 vector; } simd_quatf;
+#define simd_float3 vector_float3
+#define simd_float4 vector_float4
+#define simd_float4x4 matrix_float4x4
+#define SCN_SIMD_10_12_COMPATIBILITY 1
+#endif
+
+@interface SCNNode (SIMD)
+
+/*!
+ @abstract Determines the receiver's transform. Animatable.
+ @discussion The transform is the combination of the position, rotation and scale defined below. So when the transform is set, the receiver's position, rotation and scale are changed to match the new transform.
+ */
+@property(nonatomic) simd_float4x4 simdTransform API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's position. Animatable.
+ */
+@property(nonatomic) simd_float3 simdPosition API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's rotation. Animatable.
+ @discussion The rotation is axis angle rotation. The three first components are the axis, the fourth one is the rotation (in radian).
+ */
+@property(nonatomic) simd_float4 simdRotation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's orientation as a unit quaternion. Animatable.
+ */
+@property(nonatomic) simd_quatf simdOrientation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's euler angles. Animatable.
+ @dicussion The order of components in this vector matches the axes of rotation:
+ 1. Pitch (the x component) is the rotation about the node's x-axis (in radians)
+ 2. Yaw (the y component) is the rotation about the node's y-axis (in radians)
+ 3. Roll (the z component) is the rotation about the node's z-axis (in radians)
+ SceneKit applies these rotations in the reverse order of the components:
+ 1. first roll
+ 2. then yaw
+ 3. then pitch
+ */
+@property(nonatomic) simd_float3 simdEulerAngles API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's scale. Animatable.
+ */
+@property(nonatomic) simd_float3 simdScale API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's pivot. Animatable.
+ */
+@property(nonatomic) simd_float4x4 simdPivot API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract A world position is the position relative to the scene.
+ */
+@property(nonatomic) simd_float3 simdWorldPosition API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract Determines the receiver's orientation relative to the scene as a unit quaternion. Animatable.
+ */
+@property(nonatomic) simd_quatf simdWorldOrientation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @abstract A world transform is the transform relative to the scene.
+ */
+@property(nonatomic) simd_float4x4 simdWorldTransform API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (simd_float3)simdConvertPosition:(simd_float3)position toNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float3)simdConvertPosition:(simd_float3)position fromNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (simd_float3)simdConvertVector:(simd_float3)vector toNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float3)simdConvertVector:(simd_float3)vector fromNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (simd_float4x4)simdConvertTransform:(simd_float4x4)transform toNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float4x4)simdConvertTransform:(simd_float4x4)transform fromNode:(nullable SCNNode *)node API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
++ (simd_float3)simdLocalUp API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
++ (simd_float3)simdLocalRight API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
++ (simd_float3)simdLocalFront API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (simd_float3)simdWorldUp API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float3)simdWorldRight API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (simd_float3)simdWorldFront API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (void)simdLookAt:(vector_float3)worldTarget API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (void)simdLookAt:(vector_float3)worldTarget up:(vector_float3)worldUp localFront:(simd_float3)localFront API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (void)simdLocalTranslateBy:(simd_float3)translation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+- (void)simdLocalRotateBy:(simd_quatf)rotation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+- (void)simdRotateBy:(simd_quatf)worldRotation aroundTarget:(simd_float3)worldTarget API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+@end
+
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParametricGeometry.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNParametricGeometry.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNGeometry.h>
@@ -60,14 +60,14 @@
@abstract The corner radius. Animatable.
@discussion If the value is strictly less than 0, the geometry is empty. The default value is 0.
*/
-@property(nonatomic) CGFloat cornerRadius API_AVAILABLE(macosx(10.9));
+@property(nonatomic) CGFloat cornerRadius API_AVAILABLE(macos(10.9));
/*!
@property cornerSegmentCount
@abstract The number of subdivisions for the rounded corners. Animatable.
@discussion If the value is less than 1, the behavior is undefined. The default value is 10.
*/
-@property(nonatomic) NSInteger cornerSegmentCount API_AVAILABLE(macosx(10.9));
+@property(nonatomic) NSInteger cornerSegmentCount API_AVAILABLE(macos(10.9));
@end
@@ -539,21 +539,21 @@
@property reflectionCategoryBitMask
@abstract Determines the node categories to reflect. Defaults to all bits set.
*/
-@property(nonatomic) NSUInteger reflectionCategoryBitMask API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic) NSUInteger reflectionCategoryBitMask API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property width
@abstract The floor extent along the X axis. Animatable.
@discussion If the value is equal to 0, the floor is infinite on the X axis. The default value is 0.
*/
-@property(nonatomic) CGFloat width;
+@property(nonatomic) CGFloat width API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@property length
@abstract The floor extent along the Z axis. Animatable.
@discussion If the value is equal to 0, the floor is infinite on the Z axis. The default value is 0.
*/
-@property(nonatomic) CGFloat length;
+@property(nonatomic) CGFloat length API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@@ -561,7 +561,7 @@
@abstract Specifies the resolution scale factor of the buffer used to render the reflection.
@discussion Defaults to 1.0.
*/
-@property(nonatomic) CGFloat reflectionResolutionScaleFactor API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat reflectionResolutionScaleFactor API_AVAILABLE(macos(10.10));
@end
@@ -647,36 +647,36 @@
@abstract The number of chamfer subdivisions. Animatable.
@discussion If the value is less than 1, the behavior is undefined. The default value is 10.
*/
-@property(nonatomic) NSInteger chamferSegmentCount API_DEPRECATED("Use SCNText.chamferProfile instead", macosx(10.8, 10.9)) API_UNAVAILABLE(ios, watchos, tvos);
+@property(nonatomic) NSInteger chamferSegmentCount API_DEPRECATED("Use SCNText.chamferProfile instead", macos(10.8, 10.9)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@property chamferProfile
@abstract Describes the profile used to when "chamferRadius" is not nil. When "chamferProfile" is nil we fallback on a path representing a quadrant.
@discussion The profile should be a 2D curve beginning at (0,1) and ending at (1,0). The "flatness" property is also used to flatten this path. The default value is nil.
*/
-@property(nonatomic, copy, nullable) NSBezierPath *chamferProfile API_AVAILABLE(macosx(10.9));
+@property(nonatomic, copy, nullable) NSBezierPath *chamferProfile API_AVAILABLE(macos(10.9));
/*!
@property flatness
@abstract Specifies the accuracy (or smoothness) with which fonts are rendered.
@discussion Smaller numbers give smoother curves at the expense of more computation and heavier geometries in terms of vertices. The default value is 0.6, which yields smooth curves.
*/
-@property(nonatomic) CGFloat flatness API_AVAILABLE(macosx(10.9));
+@property(nonatomic) CGFloat flatness API_AVAILABLE(macos(10.9));
@end
-/*!
- @class SCNShape
- @abstract SCNShape represents a 2D shape (cubic Bezier spline) than can be extruded.
- */
typedef NS_ENUM(NSInteger, SCNChamferMode) {
SCNChamferModeBoth,
SCNChamferModeFront,
SCNChamferModeBack
-} API_AVAILABLE(macosx(10.9));
+} API_AVAILABLE(macos(10.9));
-API_AVAILABLE(macosx(10.9))
+/*!
+ @class SCNShape
+ @abstract SCNShape represents a 2D shape (cubic Bezier spline) than can be extruded.
+ */
+API_AVAILABLE(macos(10.9))
@interface SCNShape : SCNGeometry
/*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNParticleSystem.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNParticleSystem.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -19,25 +19,25 @@
typedef NSString * SCNParticleProperty;
#endif
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyPosition API_AVAILABLE(macosx(10.10)); // float3 : {x,y,z} controller animation type : {NSValue(SCNVector3)}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyAngle API_AVAILABLE(macosx(10.10)); // float controller animation type : {NSNumber}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyRotationAxis API_AVAILABLE(macosx(10.10)); // float3 : {x,y,z} controller animation type : {NSValue(SCNVector3)}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyVelocity API_AVAILABLE(macosx(10.10)); // float3 : {x,y,z} controller animation type : {NSValue(SCNVector3)}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyAngularVelocity API_AVAILABLE(macosx(10.10)); // float controller animation type : {NSNumber}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyLife API_AVAILABLE(macosx(10.10)); // float not controllable
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyColor API_AVAILABLE(macosx(10.10)); // float4 : {r,g,b,a} controller animation type : {NSColor}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyOpacity API_AVAILABLE(macosx(10.10)); // float controller animation type : {NSNumber}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertySize API_AVAILABLE(macosx(10.10)); // float controller animation type : {NSNumber}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyFrame API_AVAILABLE(macosx(10.10)); // float controller animation type : {NSNumber}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyFrameRate API_AVAILABLE(macosx(10.10)); // float controller animation type : {NSNumber}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyBounce API_AVAILABLE(macosx(10.10)); // float controller animation type : {NSNumber}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyCharge API_AVAILABLE(macosx(10.10)); // float controller animation type : {NSNumber}
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyFriction API_AVAILABLE(macosx(10.10)); // float controller animation type : {NSNumber}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyPosition API_AVAILABLE(macos(10.10)); // float3 : {x,y,z} controller animation type : {NSValue(SCNVector3)}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyAngle API_AVAILABLE(macos(10.10)); // float controller animation type : {NSNumber}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyRotationAxis API_AVAILABLE(macos(10.10)); // float3 : {x,y,z} controller animation type : {NSValue(SCNVector3)}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyVelocity API_AVAILABLE(macos(10.10)); // float3 : {x,y,z} controller animation type : {NSValue(SCNVector3)}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyAngularVelocity API_AVAILABLE(macos(10.10)); // float controller animation type : {NSNumber}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyLife API_AVAILABLE(macos(10.10)); // float not controllable
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyColor API_AVAILABLE(macos(10.10)); // float4 : {r,g,b,a} controller animation type : {NSColor}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyOpacity API_AVAILABLE(macos(10.10)); // float controller animation type : {NSNumber}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertySize API_AVAILABLE(macos(10.10)); // float controller animation type : {NSNumber}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyFrame API_AVAILABLE(macos(10.10)); // float controller animation type : {NSNumber}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyFrameRate API_AVAILABLE(macos(10.10)); // float controller animation type : {NSNumber}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyBounce API_AVAILABLE(macos(10.10)); // float controller animation type : {NSNumber}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyCharge API_AVAILABLE(macos(10.10)); // float controller animation type : {NSNumber}
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyFriction API_AVAILABLE(macos(10.10)); // float controller animation type : {NSNumber}
// These two properties are only available when handling the events of type SCNParticleEventCollision.
// They are read-only values.
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyContactPoint API_AVAILABLE(macosx(10.10)); // float3 not controllable
-FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyContactNormal API_AVAILABLE(macosx(10.10)); // float3 not controllable
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyContactPoint API_AVAILABLE(macos(10.10)); // float3 not controllable
+FOUNDATION_EXTERN SCNParticleProperty const SCNParticlePropertyContactNormal API_AVAILABLE(macos(10.10)); // float3 not controllable
/*!
@typedef SCNParticleEventBlock
@@ -91,7 +91,7 @@
SCNParticleSortingModeDistance, //particles are sorted by distance from the point of view
SCNParticleSortingModeOldestFirst, //particles are sorted by birth date - oldest first
SCNParticleSortingModeYoungestFirst //particles are sorted by birth date - yougest first
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
// Particle Blend Mode
typedef NS_ENUM(NSInteger, SCNParticleBlendMode) {
@@ -101,43 +101,43 @@
SCNParticleBlendModeScreen,
SCNParticleBlendModeAlpha,
SCNParticleBlendModeReplace
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
// Particle Orientation Mode
typedef NS_ENUM(NSInteger, SCNParticleOrientationMode) {
SCNParticleOrientationModeBillboardScreenAligned, // particles are aligned on screen
SCNParticleOrientationModeBillboardViewAligned, // particles are perpendicular with the vector from the point of view to the particle.
- SCNParticleOrientationModeFree, // free on all axis.
+ SCNParticleOrientationModeFree, // free on all axis.
SCNParticleOrientationModeBillboardYAligned // fixed on Y axis.
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
// Particle Birth Location
typedef NS_ENUM(NSInteger, SCNParticleBirthLocation) {
SCNParticleBirthLocationSurface, //particles are emitted on the surface of the emitter shape.
SCNParticleBirthLocationVolume, //particles are emitted inside the volume of the emitter shape.
SCNParticleBirthLocationVertex //particles are emitted on the vertices of the emitter shape.
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
// Particle Birth Direction
typedef NS_ENUM(NSInteger, SCNParticleBirthDirection) {
SCNParticleBirthDirectionConstant, // Z Direction of the Emitter.
- SCNParticleBirthDirectionSurfaceNormal, // Use the direction induced by the shape
+ SCNParticleBirthDirectionSurfaceNormal, // Use the direction induced by the shape
SCNParticleBirthDirectionRandom // Random direction.
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
// Texture Animation Mode
typedef NS_ENUM(NSInteger, SCNParticleImageSequenceAnimationMode) {
SCNParticleImageSequenceAnimationModeRepeat, // The animation will loop.
SCNParticleImageSequenceAnimationModeClamp, // The animation will stop at both ends.
SCNParticleImageSequenceAnimationModeAutoReverse // The animation will reverse when reaching an end.
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
// Particle Variation Mode
typedef NS_ENUM(NSInteger, SCNParticleInputMode) {
SCNParticleInputModeOverLife, // The input time for the controller animation is the current life duration of the particle
SCNParticleInputModeOverDistance, // The input time for the controller animation is the distance from the variation origin node.
SCNParticleInputModeOverOtherProperty, // The input time for the controller animation is the current value of another specified property.
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
// Particle Modifier Stage
typedef NS_ENUM(NSInteger, SCNParticleModifierStage) {
@@ -145,28 +145,28 @@
SCNParticleModifierStagePostDynamics,
SCNParticleModifierStagePreCollision,
SCNParticleModifierStagePostCollision
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
// Particle Event
typedef NS_ENUM(NSInteger, SCNParticleEvent) {
SCNParticleEventBirth, // Event triggered when a new particle spawns.
SCNParticleEventDeath, // Event triggered when a particle dies.
SCNParticleEventCollision // Event triggered when a particle collides with a collider node.
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
/*!
@class SCNParticlePropertyController
@abstract The SCNParticlePropertyController class controls the variation over time or over distance of a particle property.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNParticlePropertyController: NSObject <NSSecureCoding, NSCopying>
// Creates and initializes a particle property controller with the specified animation.
-+ (instancetype)controllerWithAnimation:(CAAnimation *)animation;
++ (instancetype)controllerWithAnimation:(CAAnimation *)animation __WATCHOS_PROHIBITED;
// Specifies the animation to be applied on the particle system property. The type of the animation will depend of the property controlled.
// See the documentation along property name definition.
-@property(nonatomic, retain) CAAnimation *animation;
+@property(nonatomic, retain) CAAnimation *animation __WATCHOS_PROHIBITED;
// Specify the input mode of the receiver.
// This can be over life, over distance or over the evolution of another proprety.
@@ -191,7 +191,7 @@
@class SCNParticleSystem
@abstract The SCNParticleSystem class represents a system of particles.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNParticleSystem : NSObject <NSCopying, NSSecureCoding, SCNAnimatable>
// Create an instance of a particle system
@@ -242,6 +242,9 @@
// Specifies the emitting direction of newly created particles, used in the SCNParticleBirthDirectionConstant mode. Default to {0, 0, 1}. Animatable.
@property(nonatomic) SCNVector3 emittingDirection;
+// Specifies the orientation direction of newly created particles, used in the SCNParticleOrientationModeFree mode. The particle will rotate around this axis. Default to {0, 0, 0}, which means random. The particle will then rotate arbitraly. Animatable.
+@property(nonatomic) SCNVector3 orientationDirection API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
// Specifies the acceleration applied to particles, in world coordinates.
// Allows to simulate winds or gravity. Default to {0, 0, 0}. Animatable.
@property(nonatomic) SCNVector3 acceleration;
@@ -327,6 +330,12 @@
// Specifies the initial size variation of the particle. Animatable.
@property(nonatomic) CGFloat particleSizeVariation;
+// Specifies the initial intensity of the particle. Animatable.
+@property(nonatomic) CGFloat particleIntensity API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+// Specifies the initial intensity variation of the particle. Animatable.
+@property(nonatomic) CGFloat particleIntensityVariation API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
// Specifies the blend mode to use to render the particle system. Defaults to SCNParticleBlendModeAdditive.
@property(nonatomic) SCNParticleBlendMode blendMode;
@@ -418,16 +427,16 @@
@interface SCNNode (SCNParticleSystemSupport)
// Add a particle system to the receiver.
-- (void)addParticleSystem:(SCNParticleSystem *)system API_AVAILABLE(macosx(10.10));
+- (void)addParticleSystem:(SCNParticleSystem *)system API_AVAILABLE(macos(10.10));
// Remove all particle systems of the receiver.
-- (void)removeAllParticleSystems API_AVAILABLE(macosx(10.10));
+- (void)removeAllParticleSystems API_AVAILABLE(macos(10.10));
// Remove the specified particle system from the receiver.
-- (void)removeParticleSystem:(SCNParticleSystem *)system API_AVAILABLE(macosx(10.10));
+- (void)removeParticleSystem:(SCNParticleSystem *)system API_AVAILABLE(macos(10.10));
// The particle systems attached to the node.
-@property(readonly, nullable) NSArray<SCNParticleSystem *> *particleSystems API_AVAILABLE(macosx(10.10));
+@property(readonly, nullable) NSArray<SCNParticleSystem *> *particleSystems API_AVAILABLE(macos(10.10));
@end
@@ -435,16 +444,16 @@
@interface SCNScene (SCNParticleSystemSupport)
// Add a particle system at the given location.
-- (void)addParticleSystem:(SCNParticleSystem *)system withTransform:(SCNMatrix4)transform API_AVAILABLE(macosx(10.10));
+- (void)addParticleSystem:(SCNParticleSystem *)system withTransform:(SCNMatrix4)transform API_AVAILABLE(macos(10.10));
// Remove all particle systems in the scene.
-- (void)removeAllParticleSystems API_AVAILABLE(macosx(10.10));
+- (void)removeAllParticleSystems API_AVAILABLE(macos(10.10));
// Remove the specified particle system from the receiver.
-- (void)removeParticleSystem:(SCNParticleSystem *)system API_AVAILABLE(macosx(10.10));
+- (void)removeParticleSystem:(SCNParticleSystem *)system API_AVAILABLE(macos(10.10));
// The particle systems attached to the scene.
-@property(readonly, nullable) NSArray<SCNParticleSystem *> *particleSystems API_AVAILABLE(macosx(10.10));
+@property(readonly, nullable) NSArray<SCNParticleSystem *> *particleSystems API_AVAILABLE(macos(10.10));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBehavior.h 2017-05-19 02:34:32.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsBehavior.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -15,7 +15,7 @@
@class SCNPhysicsBehavior
@abstract SCNPhysicsBehavior is an abstract class that represents a behavior in the physics world.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsBehavior : NSObject <NSSecureCoding>
@end
@@ -23,7 +23,7 @@
@class SCNPhysicsHingeJoint
@abstract SCNPhysicsHingeJoint makes two bodies to move like they are connected by a hinge. It is for example suitable for doors, chains...
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsHingeJoint : SCNPhysicsBehavior
//Initializes and returns a physics hinge joint.
@@ -48,7 +48,7 @@
@class SCNPhysicsBallSocketJoint
@abstract SCNPhysicsBallSocketJoint makes two bodies to move like they are connected by a ball-and-socket joint (i.e it allows rotations around all axes).
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsBallSocketJoint : SCNPhysicsBehavior
//Initializes and returns a physics ball-and-socket joint.
@@ -71,7 +71,7 @@
@class SCNPhysicsSliderJoint
@abstract SCNPhysicsSliderJoint provides a linear sliding joint between two bodies.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsSliderJoint : SCNPhysicsBehavior
//Initializes and returns a physics slider joint.
@@ -106,12 +106,40 @@
@end
+/*!
+ @class SCNPhysicsConeTwistJoint
+ */
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@interface SCNPhysicsConeTwistJoint : SCNPhysicsBehavior
+
+//Initializes and returns a physics cone-twist joint.
+//The joint attaches bodyA and bodyB on frameA and frameB respectively.
++ (instancetype)jointWithBodyA:(SCNPhysicsBody *)bodyA frameA:(SCNMatrix4)frameA bodyB:(SCNPhysicsBody *)bodyB frameB:(SCNMatrix4)frameB;
+
+//Initializes and returns a physics cone-twist joint.
+//The joint attaches "body" to the 3d location specified by "frame" and relative to the node that owns the body.
++ (instancetype)jointWithBody:(SCNPhysicsBody *)body frame:(SCNMatrix4)frame;
+
+@property(nonatomic, readonly) SCNPhysicsBody *bodyA; //the first body attached to the slider joint
+@property(nonatomic) SCNMatrix4 frameA;
+
+@property(nonatomic, readonly, nullable) SCNPhysicsBody *bodyB; //the second body attached to the slider joint
+@property(nonatomic) SCNMatrix4 frameB;
+
+//The maximum angular limits in radians in each cone tangent directions
+@property(nonatomic) CGFloat maximumAngularLimit1;
+@property(nonatomic) CGFloat maximumAngularLimit2;
+
+//Maximum twist angle alon the cone axis
+@property(nonatomic) CGFloat maximumTwistAngle;
+
+@end
/*!
@class SCNPhysicsVehicleWheel
@abstract SCNPhysicsVehicleWheel represents a wheel that can be attached to a SCNPhysicsVehicle instance.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsVehicleWheel : NSObject <NSCopying, NSSecureCoding>
//Initializes and returns a wheel.
@@ -159,7 +187,7 @@
@class SCNPhysicsVehicle
@abstract SCNPhysicsVehicle provides a vehicle behavior.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsVehicle : SCNPhysicsBehavior
// Initializes and returns a physics vehicle that applies on the physics body "chassisBody" with the given wheels.
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h 2016-09-26 20:55:17.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsBody.h 2017-05-30 23:11:55.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsBody.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -15,20 +15,20 @@
SCNPhysicsBodyTypeStatic,
SCNPhysicsBodyTypeDynamic,
SCNPhysicsBodyTypeKinematic
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
//Collision default category
typedef NS_OPTIONS(NSUInteger, SCNPhysicsCollisionCategory) {
SCNPhysicsCollisionCategoryDefault = 1 << 0, // default collision group for dynamic and kinematic objects
SCNPhysicsCollisionCategoryStatic = 1 << 1, // default collision group for static objects
SCNPhysicsCollisionCategoryAll = ~0UL // default for collision mask
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
/*!
@class SCNPhysicsBody
@abstract The SCNPhysicsBody class describes the physics properties (such as mass, friction...) of a node.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsBody : NSObject <NSCopying, NSSecureCoding>
//Creates an instance of a static body with default properties.
@@ -50,10 +50,10 @@
@property(nonatomic) CGFloat mass;
//Specifies the moment of inertia of the body as a vector in 3D. Disable usesDefaultMomentOfInertia for this value to be used instead of the default moment of inertia that is calculated from the shape geometry.
-@property(nonatomic) SCNVector3 momentOfInertia API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic) SCNVector3 momentOfInertia API_AVAILABLE(macos(10.11), ios(9.0));
//Permits to disable the use of the default moment of inertia in favor of the one stored in momentOfInertia.
-@property(nonatomic) BOOL usesDefaultMomentOfInertia API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic) BOOL usesDefaultMomentOfInertia API_AVAILABLE(macos(10.11), ios(9.0));
// Specifies the charge on the body. Charge determines the degree to which a body is affected by
// electric and magnetic fields. Note that this is a unitless quantity, it is up to the developer to
@@ -106,10 +106,10 @@
//A mask that defines which categories of bodies cause intersection notifications with this physics body. Defaults to 0.
//On iOS 8 and macOS 10.10 and lower the intersection notifications are always sent when a collision occurs.
-@property(nonatomic) NSUInteger contactTestBitMask API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic) NSUInteger contactTestBitMask API_AVAILABLE(macos(10.11), ios(9.0));
//If set to YES this node will be affected by gravity. The default is YES.
-@property(nonatomic, getter=isAffectedByGravity) BOOL affectedByGravity API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, getter=isAffectedByGravity) BOOL affectedByGravity API_AVAILABLE(macos(10.11), ios(9.0));
//Applies a linear force in the specified direction. The linear force is applied on the center of mass of the receiver. If impulse is set to YES then the force is applied for just one frame, otherwise it applies a continuous force.
- (void)applyForce:(SCNVector3)direction impulse:(BOOL)impulse;
@@ -117,7 +117,7 @@
//Applies a linear force with the specified position and direction. The position is relative to the node that owns the physics body.
- (void)applyForce:(SCNVector3)direction atPosition:(SCNVector3)position impulse:(BOOL)impulse;
-//Applies an angular force (torque). If impulse is set to YES then the force is applied for just one frame, otherwise it applies a continuous force.
+//Applies an angular force (torque). If impulse is set to YES then the force is applied for just one frame, otherwise it applies a continuous force. The torque is specified as an axis angle.
- (void)applyTorque:(SCNVector4)torque impulse:(BOOL)impulse;
//Clears the forces applied one the receiver.
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsContact.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsContact.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -14,7 +14,7 @@
@class SCNPhysicsContact
@abstract SCNPhysicsContact contains information about a physics contact.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsContact : NSObject
//The two nodes in contact
@@ -25,7 +25,8 @@
@property(nonatomic, readonly) SCNVector3 contactPoint;
@property(nonatomic, readonly) SCNVector3 contactNormal;
@property(nonatomic, readonly) CGFloat collisionImpulse; // the collision impulse on nodeA
-@property(nonatomic, readonly) CGFloat penetrationDistance;
+@property(nonatomic, readonly) CGFloat penetrationDistance;
+@property(nonatomic, readonly) CGFloat sweepTestFraction API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0)); // Value between 0 and 1 giving the relative position of the physic shape when performing a convex sweep test.
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h 2016-09-26 20:31:43.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsField.h 2017-05-30 23:11:55.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsField.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -17,17 +17,17 @@
typedef NS_ENUM(NSInteger, SCNPhysicsFieldScope) {
SCNPhysicsFieldScopeInsideExtent,
SCNPhysicsFieldScopeOutsideExtent,
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
/*!
@class SCNPhysicsField
@abstract SCNPhysicsField is an abstract class that describes a force field that applies in the physics world.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsField : NSObject <NSCopying, NSSecureCoding>
// The following properties control the behavior of the field
-@property(nonatomic) CGFloat strength; // The strength factor of the force field. default 1.0.
+@property(nonatomic) CGFloat strength; // The strength factor of the force field. Defaults to 1.0.
@property(nonatomic) CGFloat falloffExponent; // Changes the power of the force based on the distance from the center of the field (1 / distance ^ falloffExponent). Defaults to 0.0.
@property(nonatomic) CGFloat minimumDistance; // Distance from the center of the field where the effect is at full strength. Defaults to 1e-6.
@@ -35,18 +35,18 @@
@property(nonatomic, getter=isExclusive) BOOL exclusive; // If YES, it suppresses any other field in its area. Defaults to NO.
// The following properties control the area of effect
-@property(nonatomic) SCNVector3 halfExtent; // Specifies the half extent of the area of effect. default is FLT_MAX.
+@property(nonatomic) SCNVector3 halfExtent; // Specifies the half extent of the area of effect. Defaults to FLT_MAX.
@property(nonatomic) BOOL usesEllipsoidalExtent; // YES means that the area of effect is rounded within the extent. Defaults to NO.
@property(nonatomic) SCNPhysicsFieldScope scope; // Controls whether the force field should apply inside or outside of the area. Defaults to inside.
-@property(nonatomic) SCNVector3 offset; // Offset of origin effect within the area
-@property(nonatomic) SCNVector3 direction; // Direction of the field. Only applies to linear gravity and vortex fields. Defaults to (0,-1,0)
+@property(nonatomic) SCNVector3 offset; // Offset of origin effect within the area.
+@property(nonatomic) SCNVector3 direction; // Direction of the field. Only applies to linear gravity and vortex fields. Defaults to (0,-1,0).
/*!
@property categoryBitMask
@abstract Determines the node categories that will be influenced by the receiver. Defaults to all bit set.
*/
-@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macosx(10.10));
+@property(nonatomic) NSUInteger categoryBitMask API_AVAILABLE(macos(10.10));
/**
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h 2016-08-04 21:18:30.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsShape.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsShape.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -17,10 +17,10 @@
typedef NSString * SCNPhysicsShapeOption;
#endif
-FOUNDATION_EXTERN SCNPhysicsShapeOption const SCNPhysicsShapeTypeKey API_AVAILABLE(macosx(10.10)); // Type of the physics shape. Default is SCNPhysicsShapeTypeConvexHull. See below for the list of shape types.
-FOUNDATION_EXTERN SCNPhysicsShapeOption const SCNPhysicsShapeKeepAsCompoundKey API_AVAILABLE(macosx(10.10)); // A boolean to decide if a hierarchy is kept as a compound of shapes or flattened as one single volume. Default is true.
-FOUNDATION_EXTERN SCNPhysicsShapeOption const SCNPhysicsShapeScaleKey API_AVAILABLE(macosx(10.10)); // Local scaling of the physics shape (as an SCNVector3 wrapped in a NSValue)
-FOUNDATION_EXTERN SCNPhysicsShapeOption const SCNPhysicsShapeOptionCollisionMargin API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0)); // Collision margin of the physics shape (as an NSNumber)
+FOUNDATION_EXTERN SCNPhysicsShapeOption const SCNPhysicsShapeTypeKey API_AVAILABLE(macos(10.10)); // Type of the physics shape. Default is SCNPhysicsShapeTypeConvexHull. See below for the list of shape types.
+FOUNDATION_EXTERN SCNPhysicsShapeOption const SCNPhysicsShapeKeepAsCompoundKey API_AVAILABLE(macos(10.10)); // A boolean to decide if a hierarchy is kept as a compound of shapes or flattened as one single volume. Default is true.
+FOUNDATION_EXTERN SCNPhysicsShapeOption const SCNPhysicsShapeScaleKey API_AVAILABLE(macos(10.10)); // Local scaling of the physics shape (as an SCNVector3 wrapped in a NSValue)
+FOUNDATION_EXTERN SCNPhysicsShapeOption const SCNPhysicsShapeOptionCollisionMargin API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0)); // Collision margin of the physics shape (as an NSNumber)
#define SCNPhysicsShapeOptionType SCNPhysicsShapeTypeKey
#define SCNPhysicsShapeOptionKeepAsCompound SCNPhysicsShapeKeepAsCompoundKey
@@ -33,15 +33,15 @@
typedef NSString * SCNPhysicsShapeType;
#endif
-FOUNDATION_EXTERN SCNPhysicsShapeType const SCNPhysicsShapeTypeBoundingBox API_AVAILABLE(macosx(10.10));
-FOUNDATION_EXTERN SCNPhysicsShapeType const SCNPhysicsShapeTypeConvexHull API_AVAILABLE(macosx(10.10));
-FOUNDATION_EXTERN SCNPhysicsShapeType const SCNPhysicsShapeTypeConcavePolyhedron API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNPhysicsShapeType const SCNPhysicsShapeTypeBoundingBox API_AVAILABLE(macos(10.10));
+FOUNDATION_EXTERN SCNPhysicsShapeType const SCNPhysicsShapeTypeConvexHull API_AVAILABLE(macos(10.10));
+FOUNDATION_EXTERN SCNPhysicsShapeType const SCNPhysicsShapeTypeConcavePolyhedron API_AVAILABLE(macos(10.10));
/*!
@class SCNPhysicsShape
@abstract SCNPhysicsShape represents the shape of a physics body.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsShape : NSObject <NSCopying, NSSecureCoding>
//Creates an instance of a physics shape based on a geometry. see above for the possible options.
@@ -54,13 +54,13 @@
+ (instancetype)shapeWithShapes:(NSArray<SCNPhysicsShape *> *)shapes transforms:(nullable NSArray<NSValue *> *)transforms;
// Returns the options requested at init time
-@property(readonly, nonatomic, nullable) NSDictionary<SCNPhysicsShapeOption, id> *options API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(readonly, nonatomic, nullable) NSDictionary<SCNPhysicsShapeOption, id> *options API_AVAILABLE(macos(10.11), ios(9.0));
// Returns the object from which this physics shape was created. It can be an SCNGeometry*, an SCNNode* or in NSArray* of subshapes.
-@property(readonly, nonatomic) id sourceObject API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(readonly, nonatomic) id sourceObject API_AVAILABLE(macos(10.11), ios(9.0));
// If the physics shape was created from an array of sub shapes, transforms contains the associated transforms as SCNMatrix4 wrapped in NSValue.
-@property(readonly, nonatomic, nullable) NSArray<NSValue *> *transforms API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(readonly, nonatomic, nullable) NSArray<NSValue *> *transforms API_AVAILABLE(macos(10.11), ios(9.0));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h 2016-08-05 02:35:40.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNPhysicsWorld.h 2017-05-19 02:22:15.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNPhysicsWorld.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -22,9 +22,9 @@
typedef NSString * SCNPhysicsTestOption;
#endif
-FOUNDATION_EXTERN SCNPhysicsTestOption const SCNPhysicsTestCollisionBitMaskKey API_AVAILABLE(macosx(10.10)); // Allows to filter the objects tested by rayTest, contactTest and convexSweep. Default is SCNPhysicsCollisionCategoryAll
-FOUNDATION_EXTERN SCNPhysicsTestOption const SCNPhysicsTestSearchModeKey API_AVAILABLE(macosx(10.10)); // Specifies how to perform the ray/contact/sweep test. Values are defined below. If not defined, then defaults to SCNPhysicsTestSearchModeAny
-FOUNDATION_EXTERN SCNPhysicsTestOption const SCNPhysicsTestBackfaceCullingKey API_AVAILABLE(macosx(10.10)); // Specifies whether the back faces should be ignored or not. Defaults to YES.
+FOUNDATION_EXTERN SCNPhysicsTestOption const SCNPhysicsTestCollisionBitMaskKey API_AVAILABLE(macos(10.10)); // Allows to filter the objects tested by rayTest, contactTest and convexSweep. Default is SCNPhysicsCollisionCategoryAll
+FOUNDATION_EXTERN SCNPhysicsTestOption const SCNPhysicsTestSearchModeKey API_AVAILABLE(macos(10.10)); // Specifies how to perform the ray/contact/sweep test. Values are defined below. If not defined, then defaults to SCNPhysicsTestSearchModeAny
+FOUNDATION_EXTERN SCNPhysicsTestOption const SCNPhysicsTestBackfaceCullingKey API_AVAILABLE(macos(10.10)); // Specifies whether the back faces should be ignored or not. Defaults to YES.
#define SCNPhysicsTestOptionCollisionBitMask SCNPhysicsTestCollisionBitMaskKey
#define SCNPhysicsTestOptionSearchMode SCNPhysicsTestSearchModeKey
@@ -37,15 +37,15 @@
typedef NSString * SCNPhysicsTestSearchMode;
#endif
-FOUNDATION_EXTERN SCNPhysicsTestSearchMode const SCNPhysicsTestSearchModeAny API_AVAILABLE(macosx(10.10)); // Returns the first contact found.
-FOUNDATION_EXTERN SCNPhysicsTestSearchMode const SCNPhysicsTestSearchModeClosest API_AVAILABLE(macosx(10.10)); // Returns the nearest contact found only.
-FOUNDATION_EXTERN SCNPhysicsTestSearchMode const SCNPhysicsTestSearchModeAll API_AVAILABLE(macosx(10.10)); // All contacts are returned.
+FOUNDATION_EXTERN SCNPhysicsTestSearchMode const SCNPhysicsTestSearchModeAny API_AVAILABLE(macos(10.10)); // Returns the first contact found.
+FOUNDATION_EXTERN SCNPhysicsTestSearchMode const SCNPhysicsTestSearchModeClosest API_AVAILABLE(macos(10.10)); // Returns the nearest contact found only.
+FOUNDATION_EXTERN SCNPhysicsTestSearchMode const SCNPhysicsTestSearchModeAll API_AVAILABLE(macos(10.10)); // All contacts are returned.
/*!
@protocol SCNPhysicsContactDelegate
@abstract The SCNPhysicsContactDelegate protocol is to be implemented by delegates that want to be notified when a contact occured.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@protocol SCNPhysicsContactDelegate <NSObject>
@optional
- (void)physicsWorld:(SCNPhysicsWorld *)world didBeginContact:(SCNPhysicsContact *)contact;
@@ -58,7 +58,7 @@
@abstract The SCNPhysicsWorld class describes and allows to control the physics simulation of a 3d scene.
@discussion The SCNPhysicsWorld class should not be allocated directly but retrieved from the SCNScene class using the physicsWorld property.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNPhysicsWorld : NSObject <NSSecureCoding>
//A global 3D vector specifying the field force acceleration due to gravity. The unit is meter per second. Default is {0, -9.8, 0}.
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNReferenceNode.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNReferenceNode.h
//
-// Copyright (c) 2015-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2015-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNNode.h>
@@ -16,13 +16,13 @@
typedef NS_ENUM(NSInteger, SCNReferenceLoadingPolicy) {
SCNReferenceLoadingPolicyImmediate = 0,
SCNReferenceLoadingPolicyOnDemand = 1
-} API_AVAILABLE(macosx(10.11), ios(9.0));
+} API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@class SCNReferenceNode
@abstract Node that references an external file.
*/
-API_AVAILABLE(macosx(10.11), ios(9.0))
+API_AVAILABLE(macos(10.11), ios(9.0))
@interface SCNReferenceNode : SCNNode
/*!
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNRenderer.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNRenderer.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNSceneRenderer.h>
@@ -35,7 +35,7 @@
@param device The metal device to use. Pass nil to let SceneKit choose a default device.
@param options An optional dictionary for future extensions.
*/
-+ (instancetype)rendererWithDevice:(nullable id <MTLDevice>)device options:(nullable NSDictionary *)options API_AVAILABLE(macosx(10.11), ios(9.0));
++ (instancetype)rendererWithDevice:(nullable id <MTLDevice>)device options:(nullable NSDictionary *)options API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property scene
@@ -44,37 +44,43 @@
@property(nonatomic, retain, nullable) SCNScene *scene;
/*!
+ @method renderAtTime:viewport:commandBuffer:passDescriptor:
+ @abstract updates and renders the receiver's scene at the specified time (system time) viewport, Metal command buffer and pass descriptor.
+ @discussion Use this method to render using Metal.
+ */
+- (void)renderAtTime:(CFTimeInterval)time viewport:(CGRect)viewport commandBuffer:(id <MTLCommandBuffer>)commandBuffer passDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor API_AVAILABLE(macos(10.11), ios(9.0));
+
+/*!
@method renderAtTime:
- @abstract renders the receiver's scene at the specified time (system time).
+ @abstract updates and renders the receiver's scene at the specified time (system time).
@discussion This method only work if the receiver was allocated with an OpenGL context. Use renderAtTime:withEncoder:pass:commandQueue: to render with Metal.
*/
-- (void)renderAtTime:(CFTimeInterval)time API_AVAILABLE(macosx(10.10));
+- (void)renderAtTime:(CFTimeInterval)time API_AVAILABLE(macos(10.10));
/*!
- @method snapshotAtTime:withSize:antialiasingMode:
- @abstract renders the receiver's scene at the specified time (system time) into an image.
+ @method updateAtTime:
+ @abstract updates the receiver's scene at the specified time (system time).
*/
-- (NSImage *)snapshotAtTime:(CFTimeInterval)time withSize:(CGSize)size antialiasingMode:(SCNAntialiasingMode)antialiasingMode API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+- (void)updateAtTime:(CFTimeInterval)time API_AVAILABLE(macos(10.13), ios(11_0), tvos(11_0), watchos(4_0));
/*!
- @method renderAtTime:viewport:commandBuffer:passDescriptor:
- @abstract renders the receiver's scene at the specified time (system time) viewport, metal command buffer and pass descriptor.
- @discussion Use this method to render using Metal.
+ @method renderWithViewport:viewport:commandBuffer:passDescriptor:
+ @abstract renders the receiver's scene with the specified viewport, Metal command buffer and pass descriptor.
+ @discussion Use this method to render using Metal. This method doesn't update the scene's animations, physics, particles etc... It's up to you to call "updateAtTime:" to update the scene.
*/
-- (void)renderAtTime:(CFTimeInterval)time viewport:(CGRect)viewport commandBuffer:(id <MTLCommandBuffer>)commandBuffer passDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor API_AVAILABLE(macosx(10.11), ios(9.0));
+- (void)renderWithViewport:(CGRect)viewport commandBuffer:(id <MTLCommandBuffer>)commandBuffer passDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor API_AVAILABLE(macos(10.13), ios(11_0), tvos(11_0), watchos(4_0));
/*!
@property nextFrameTime
@abstract Returns the time at which the next update should happen. If infinite no update needs to be scheduled yet. If the current frame time, a continuous animation is running and an update should be scheduled after a "natural" delay.
*/
-@property(nonatomic, readonly) CFTimeInterval nextFrameTime API_AVAILABLE(macosx(10.10));
+@property(nonatomic, readonly) CFTimeInterval nextFrameTime API_AVAILABLE(macos(10.10));
/*!
- @method render
- @abstract renders the receiver's scene at the current system time.
- @discussion This method only work if the receiver was allocated with an OpenGL context and it is deprecated (use renderAtTime: instead). Use renderAtTime:withEncoder:pass:commandQueue: to render with Metal.
+ @method snapshotAtTime:withSize:antialiasingMode:
+ @abstract renders the receiver's scene at the specified time (system time) into an image.
*/
-- (void)render API_DEPRECATED_WITH_REPLACEMENT("-renderAtTime:withEncoder:pass:commandQueue:", macosx(10.8, 10.11), ios(8.0, 9.0)) API_UNAVAILABLE(watchos, tvos);
+- (NSImage *)snapshotAtTime:(CFTimeInterval)time withSize:(CGSize)size antialiasingMode:(SCNAntialiasingMode)antialiasingMode API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
/*!
@method updateProbes:atTime:
@@ -83,8 +89,16 @@
@param time The time used to render the scene when computing the light probes irradiance.
@discussion Light probes are only supported with Metal. This method is observable using NSProgress.
*/
-- (void)updateProbes:(NSArray<SCNNode*> *)lightProbes atTime:(CFTimeInterval)time API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+- (void)updateProbes:(NSArray<SCNNode*> *)lightProbes atTime:(CFTimeInterval)time API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
+
+// Deprecated
+/*!
+ @method render
+ @abstract renders the receiver's scene at the current system time.
+ @discussion This method only work if the receiver was allocated with an OpenGL context and it is deprecated (use renderAtTime: instead). Use renderAtTime:withEncoder:pass:commandQueue: to render with Metal.
+ */
+- (void)render API_DEPRECATED_WITH_REPLACEMENT("-renderAtTime:withEncoder:pass:commandQueue:", macos(10.8, 10.11), ios(8.0, 9.0)) API_UNAVAILABLE(watchos, tvos);
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNScene.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNScene.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -31,7 +31,7 @@
@abstract Specifies the final destination (as a NSURL) of the scene being exported.
@discussion The destination URL is required if the scene is exported to a temporary directory and then moved to a final destination. This enables the exported document to get correct relative paths to referenced images.
*/
-FOUNDATION_EXTERN NSString * const SCNSceneExportDestinationURL API_AVAILABLE(macosx(10.9));
+FOUNDATION_EXTERN NSString * const SCNSceneExportDestinationURL API_AVAILABLE(macos(10.9));
/*! @group Scene attributes
@@ -43,10 +43,10 @@
typedef NSString * SCNSceneAttribute;
#endif
-FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneStartTimeAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the start time of the scene.
-FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneEndTimeAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the end time of the scene.
-FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneFrameRateAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the framerate of the scene.
-FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneUpAxisAttributeKey API_AVAILABLE(macosx(10.10)); // A vector3 value, encapsulated in a NSValue, containing the up axis of the scene. This is just for information, setting the up axis as no effect.
+FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneStartTimeAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the start time of the scene.
+FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneEndTimeAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the end time of the scene.
+FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneFrameRateAttributeKey; // A floating point value, encapsulated in a NSNumber, containing the framerate of the scene.
+FOUNDATION_EXTERN SCNSceneAttribute const SCNSceneUpAxisAttributeKey API_AVAILABLE(macos(10.10)); // A vector3 value, encapsulated in a NSValue, containing the up axis of the scene. This is just for information, setting the up axis as no effect.
#define SCNSceneAttributeStartTime SCNSceneStartTimeAttributeKey
#define SCNSceneAttributeEndTime SCNSceneEndTimeAttributeKey
@@ -76,7 +76,7 @@
@abstract Specifies the physics world of the receiver.
@discussion Every scene automatically creates a physics world object to simulate physics on nodes in the scene. You use this property to access the scene’s global physics properties, such as gravity. To add physics to a particular node, see physicsBody.
*/
-@property(nonatomic, readonly) SCNPhysicsWorld *physicsWorld API_AVAILABLE(macosx(10.10));
+@property(nonatomic, readonly) SCNPhysicsWorld *physicsWorld API_AVAILABLE(macos(10.10));
/*!
@method attributeForKey:
@@ -100,16 +100,18 @@
@abstract Specifies the background of the receiver.
@discussion The background is rendered before the rest of the scene.
The background can be rendered as a skybox by setting a cube map as described in SCNMaterialProperty.h
- Colors are supported starting macOS 10.12 and iOS 10. Prior to that you can use SCNView.backgroundColor.
+ Colors are supported starting in macOS 10.12 and iOS 10. Prior to that you can use SCNView.backgroundColor.
+ MDLSkyCubeTexture is supported starting in macOS 10.13 and iOS 11.
*/
-@property(nonatomic, readonly) SCNMaterialProperty *background API_AVAILABLE(macosx(10.9));
+@property(nonatomic, readonly) SCNMaterialProperty *background API_AVAILABLE(macos(10.9));
/*!
@property lightingEnvironment
@abstract Specifies the receiver's environment for image-based lighting (IBL).
- @discussion The environment should be a cube map as described in SCNMaterialProperty.h
+ @discussion The environment should be a cube map as described in SCNMaterialProperty.h.
+ MDLSkyCubeTexture is supported starting in macOS 10.13 and iOS 11.
*/
-@property(nonatomic, readonly) SCNMaterialProperty *lightingEnvironment API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+@property(nonatomic, readonly) SCNMaterialProperty *lightingEnvironment API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
#pragma mark - Loading
@@ -120,7 +122,7 @@
@param name The name of the file. The method looks for a file with the specified name in the application’s main bundle.
@discussion This method initializes with no options and does not check for errors. The resulting object is not cached.
*/
-+ (nullable instancetype)sceneNamed:(NSString *)name API_AVAILABLE(macosx(10.9));
++ (nullable instancetype)sceneNamed:(NSString *)name API_AVAILABLE(macos(10.9));
/*!
@method sceneNamed:options:
@@ -130,7 +132,7 @@
@param options An options dictionary. The relevant keys are documented in the SCNSceneSource class.
@discussion This method initializes with no options and does not check for errors. The resulting object is not cached.
*/
-+ (nullable instancetype)sceneNamed:(NSString *)name inDirectory:(nullable NSString *)directory options:(nullable NSDictionary<SCNSceneSourceLoadingOption, id> *)options API_AVAILABLE(macosx(10.10));
++ (nullable instancetype)sceneNamed:(NSString *)name inDirectory:(nullable NSString *)directory options:(nullable NSDictionary<SCNSceneSourceLoadingOption, id> *)options API_AVAILABLE(macos(10.10));
/*!
@method sceneWithURL:options:error:
@@ -158,7 +160,7 @@
Starting macOS 10.11 exporting supports .dae, .scn as well as file all formats supported by Model I/O.
Starting iOS 10 exporting supports .scn as well as all file formats supported by Model I/O.
*/
-- (BOOL)writeToURL:(NSURL *)url options:(nullable NSDictionary<NSString *, id> *)options delegate:(nullable id <SCNSceneExportDelegate>)delegate progressHandler:(nullable SCNSceneExportProgressHandler)progressHandler API_AVAILABLE(macosx(10.9), ios(10.0), tvos(10.0)) API_UNAVAILABLE(watchos);
+- (BOOL)writeToURL:(NSURL *)url options:(nullable NSDictionary<NSString *, id> *)options delegate:(nullable id <SCNSceneExportDelegate>)delegate progressHandler:(nullable SCNSceneExportProgressHandler)progressHandler API_AVAILABLE(macos(10.9), ios(10.0), tvos(10.0)) API_UNAVAILABLE(watchos);
#pragma mark - Fog
@@ -166,27 +168,27 @@
@property fogStartDistance
@abstract Specifies the receiver's fog start distance. Animatable. Defaults to 0.
*/
-@property(nonatomic) CGFloat fogStartDistance API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat fogStartDistance API_AVAILABLE(macos(10.10));
/*!
@property fogEndDistance
@abstract Specifies the receiver's fog end distance. Animatable. Defaults to 0.
*/
-@property(nonatomic) CGFloat fogEndDistance API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat fogEndDistance API_AVAILABLE(macos(10.10));
/*!
@property fogDensityExponent
@abstract Specifies the receiver's fog power exponent. Animatable. Defaults to 1.
@discussion Controls the attenuation between the start and end fog distances. 0 means a constant fog, 1 a linear fog and 2 a quadratic fog, but any positive value will work.
*/
-@property(nonatomic) CGFloat fogDensityExponent API_AVAILABLE(macosx(10.10));
+@property(nonatomic) CGFloat fogDensityExponent API_AVAILABLE(macos(10.10));
/*!
@property fogColor
@abstract Specifies the receiver's fog color (NSColor or CGColorRef). Animatable. Defaults to white.
@discussion The initial value is a NSColor.
*/
-@property(nonatomic, retain) id fogColor API_AVAILABLE(macosx(10.10));
+@property(nonatomic, retain) id fogColor API_AVAILABLE(macos(10.10));
#pragma mark - Pause
@@ -196,12 +198,12 @@
@abstract Controls whether or not the scene is paused. Defaults to NO.
@discussion Pausing a scene will pause animations, actions, particles and physics.
*/
-@property(nonatomic, getter=isPaused) BOOL paused API_AVAILABLE(macosx(10.10));
+@property(nonatomic, getter=isPaused) BOOL paused API_AVAILABLE(macos(10.10));
@end
-API_AVAILABLE(macosx(10.9), ios(10.0), tvos(10.0)) API_UNAVAILABLE(watchos)
+API_AVAILABLE(macos(10.9), ios(10.0), tvos(10.0)) API_UNAVAILABLE(watchos)
@protocol SCNSceneExportDelegate <NSObject>
@optional
/*!
@@ -212,7 +214,7 @@
@param originalImageURL The original url for the image. May be nil if the image was not previously loaded from a url.
@return The delegate must returns the url of the image that was exported or nil if it didn't export any image. If the returned value is nil, the image will be exported to a default destination in a default format.
*/
-- (nullable NSURL *)writeImage:(NSImage *)image withSceneDocumentURL:(NSURL *)documentURL originalImageURL:(nullable NSURL *)originalImageURL API_AVAILABLE(macosx(10.9), ios(10.0), tvos(10.0)) API_UNAVAILABLE(watchos);
+- (nullable NSURL *)writeImage:(NSImage *)image withSceneDocumentURL:(NSURL *)documentURL originalImageURL:(nullable NSURL *)originalImageURL API_AVAILABLE(macos(10.9), ios(10.0), tvos(10.0)) API_UNAVAILABLE(watchos);
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneRenderer.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNSceneRenderer.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -30,7 +30,7 @@
SCNAntialiasingModeMultisampling4X,
SCNAntialiasingModeMultisampling8X,
SCNAntialiasingModeMultisampling16X
-} API_AVAILABLE(macosx(10.10));
+} API_AVAILABLE(macos(10.10));
/*!
@enum SCNRenderingAPI
@@ -43,24 +43,27 @@
SCNRenderingAPIOpenGLLegacy,
SCNRenderingAPIOpenGLCore32,
SCNRenderingAPIOpenGLCore41
-} API_AVAILABLE(macosx(10.11), ios(9.0));
+} API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@enum SCNDebugOptions
@abstract Debug options.
*/
typedef NS_OPTIONS(NSUInteger, SCNDebugOptions) {
- SCNDebugOptionNone = 0,
- SCNDebugOptionShowPhysicsShapes = 1 << 0,
- SCNDebugOptionShowBoundingBoxes = 1 << 1,
- SCNDebugOptionShowLightInfluences = 1 << 2,
- SCNDebugOptionShowLightExtents = 1 << 3,
- SCNDebugOptionShowPhysicsFields = 1 << 4,
- SCNDebugOptionShowWireframe = 1 << 5
+ SCNDebugOptionNone = 0,
+ SCNDebugOptionShowPhysicsShapes = 1 << 0, //show physics shape
+ SCNDebugOptionShowBoundingBoxes = 1 << 1, //show object bounding boxes
+ SCNDebugOptionShowLightInfluences = 1 << 2, //show objects's light influences
+ SCNDebugOptionShowLightExtents = 1 << 3, //show light extents
+ SCNDebugOptionShowPhysicsFields = 1 << 4, //show SCNPhysicsFields forces and extents
+ SCNDebugOptionShowWireframe = 1 << 5, //show wireframe on top of objects
+ SCNDebugOptionRenderAsWireframe API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 6, //render objects as wireframe
+ SCNDebugOptionShowSkeletons API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 7, //show skinning bones
+ SCNDebugOptionShowCreases API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 8, //show subdivision creases
+ SCNDebugOptionShowConstraints API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 9, //show slider constraint
+ SCNDebugOptionShowCameras API_AVAILABLE(macosx(10.13), ios(11.0), tvos(11.0), watchos(4.0)) = 1 << 10 //show cameras
} API_AVAILABLE(macosx(10.11), ios(9.0));
-
-
/*! @protocol SCNSceneRenderer
@abstract Protocol adopted by the various renderers (SCNView, SCNLayer, SCNRenderer)
*/
@@ -81,14 +84,14 @@
@param pointOfView the point of view to use to render the new scene.
@param completionHandler the block invoked on completion.
*/
-- (void)presentScene:(SCNScene *)scene withTransition:(SKTransition *)transition incomingPointOfView:(nullable SCNNode *)pointOfView completionHandler:(nullable void (^)())completionHandler API_AVAILABLE(macosx(10.11), ios(9.0));
+- (void)presentScene:(SCNScene *)scene withTransition:(SKTransition *)transition incomingPointOfView:(nullable SCNNode *)pointOfView completionHandler:(nullable void (^)())completionHandler API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property sceneTime
@abstract Specifies the current "scene time" to display the scene.
@discussion The scene time only affect scene time based animations (see SCNAnimation.h "usesSceneTimeBase" and SCNSceneSource.h "SCNSceneSourceAnimationImportPolicyKey" for how to create scene time based animations). Scene time based animations and this property are typically used by tools and viewer to ease seeking in time while previewing a scene.
*/
-@property(nonatomic) NSTimeInterval sceneTime API_AVAILABLE(macosx(10.10));
+@property(nonatomic) NSTimeInterval sceneTime API_AVAILABLE(macos(10.10));
/*!
@property delegate
@@ -111,15 +114,15 @@
@param pointOfView The point of view used to test the visibility.
@discussion Return YES if the node is inside or intersects the clipping planes of the point of view. This method doesn't test if 'node' is occluded by another node.
*/
-- (BOOL)isNodeInsideFrustum:(SCNNode *)node withPointOfView:(SCNNode *)pointOfView API_AVAILABLE(macosx(10.9));
+- (BOOL)isNodeInsideFrustum:(SCNNode *)node withPointOfView:(SCNNode *)pointOfView API_AVAILABLE(macos(10.9));
/*!
@method nodesInsideFrustumWithPointOfView:
@abstract Returns an array containing the nodes visible from the specified point of view.
@param pointOfView The point of view used to test the visibility.
- @discussion Returns an array of all the nodes that are inside or intersects the clipping planes of the point of view.
+ @discussion Returns an array of all the nodes that are inside or intersects the clipping planes of the point of view. Starting in macOS10.13/iOS11 this method work with the presentation tree.
*/
-- (NSArray<SCNNode *> *)nodesInsideFrustumWithPointOfView:(SCNNode *)pointOfView API_AVAILABLE(macosx(10.11), ios(9.0));
+- (NSArray<SCNNode *> *)nodesInsideFrustumWithPointOfView:(SCNNode *)pointOfView API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@method projectPoint
@@ -127,7 +130,7 @@
@param point The world position to be projected.
@discussion A point projected from the near (resp. far) clip plane will have a z component of 0 (resp. 1).
*/
-- (SCNVector3)projectPoint:(SCNVector3)point API_AVAILABLE(macosx(10.9));
+- (SCNVector3)projectPoint:(SCNVector3)point API_AVAILABLE(macos(10.9));
/*!
@method unprojectPoint
@@ -135,7 +138,7 @@
@param point The screenspace position to be unprojected.
@discussion A point whose z component is 0 (resp. 1) is unprojected on the near (resp. far) clip plane.
*/
-- (SCNVector3)unprojectPoint:(SCNVector3)point API_AVAILABLE(macosx(10.9));
+- (SCNVector3)unprojectPoint:(SCNVector3)point API_AVAILABLE(macos(10.9));
/*!
@property playing
@@ -178,7 +181,7 @@
@param block This block will be called repeatedly while the object is prepared. Return YES if you want the operation to abort.
@discussion Returns YES if the object was prepared successfully, NO if it was canceled. This method may be triggered from a secondary thread. This method is observable using NSProgress.
*/
-- (BOOL)prepareObject:(id)object shouldAbortBlock:(nullable NS_NOESCAPE BOOL (^)())block API_AVAILABLE(macosx(10.9));
+- (BOOL)prepareObject:(id)object shouldAbortBlock:(nullable NS_NOESCAPE BOOL (^)())block API_AVAILABLE(macos(10.9));
/*!
@method prepareObjects:withCompletionHandler:
@@ -187,33 +190,33 @@
@param completionHandler This block will be called when all objects has been prepared, or on failure.
@discussion This method is observable using NSProgress.
*/
-- (void)prepareObjects:(NSArray *)objects withCompletionHandler:(nullable void (^)(BOOL success))completionHandler API_AVAILABLE(macosx(10.10));
+- (void)prepareObjects:(NSArray *)objects withCompletionHandler:(nullable void (^)(BOOL success))completionHandler API_AVAILABLE(macos(10.10));
/*!
@property showsStatistics
@abstract Determines whether the receiver should display statistics info like FPS. Defaults to NO.
@discussion When set to YES, statistics are displayed in a overlay on top of the rendered scene.
*/
-@property(nonatomic) BOOL showsStatistics API_AVAILABLE(macosx(10.9));
+@property(nonatomic) BOOL showsStatistics API_AVAILABLE(macos(10.9));
/*!
@property debugOptions
@abstract Specifies the debug options of the receiver. Defaults to SCNDebugOptionNone.
*/
-@property(nonatomic) SCNDebugOptions debugOptions API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic) SCNDebugOptions debugOptions API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property overlaySKScene
@abstract Specifies the overlay of the receiver as a SpriteKit scene instance. Defaults to nil.
*/
-@property(nonatomic, retain, nullable) SKScene *overlaySKScene API_AVAILABLE(macosx(10.10));
+@property(nonatomic, retain, nullable) SKScene *overlaySKScene API_AVAILABLE(macos(10.10));
/*!
@property renderingAPI
@abstract Specifies the rendering API associated to the receiver.
@discussion This is the rendering API effectively used by the receiver. You can specify a preferred rendering API when initializing a view programmatically (see SCNPreferredRenderingAPI in SCNSceneRenderer.h) or using Interface Builder's SCNView inspector.
*/
-@property(nonatomic, readonly) SCNRenderingAPI renderingAPI API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly) SCNRenderingAPI renderingAPI API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property context
@@ -227,37 +230,37 @@
@property currentRenderCommandEncoder
@abstract The current render command encoder if any. This property is only valid within the SCNSceneRendererDelegate methods and when renderering with Metal. Otherwise it is set to nil.
*/
-@property(nonatomic, readonly, nullable) id <MTLRenderCommandEncoder> currentRenderCommandEncoder API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly, nullable) id <MTLRenderCommandEncoder> currentRenderCommandEncoder API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property device
@abstract The metal device of the renderer. This property is only valid on a renderer created with a Metal device. Otherwise it is set to nil.
*/
-@property(nonatomic, readonly, nullable) id <MTLDevice> device API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly, nullable) id <MTLDevice> device API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property colorPixelFormat
@abstract The pixel format of the color attachment 0 of the renderer. This property is only valid on a renderer created with a Metal device.
*/
-@property(nonatomic, readonly) MTLPixelFormat colorPixelFormat API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly) MTLPixelFormat colorPixelFormat API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property depthPixelFormat
@abstract The pixel format of the depth attachment of the renderer. This property is only valid on a renderer created with a Metal device.
*/
-@property(nonatomic, readonly) MTLPixelFormat depthPixelFormat API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly) MTLPixelFormat depthPixelFormat API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property stencilPixelFormat
@abstract The pixel format of the stencil attachment of the renderer. This property is only valid on a renderer created with a Metal device.
*/
-@property(nonatomic, readonly) MTLPixelFormat stencilPixelFormat API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly) MTLPixelFormat stencilPixelFormat API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property commandQueue
@abstract The command queue of the renderer. This property is only valid on a renderer created with a Metal device. Otherwise it is set to nil.
*/
-@property(nonatomic, readonly, nullable) id <MTLCommandQueue> commandQueue API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly, nullable) id <MTLCommandQueue> commandQueue API_AVAILABLE(macos(10.11), ios(9.0));
#endif
@@ -266,19 +269,19 @@
@abstract Contains the instance of audio engine used by the scene.
@discussion The audio engine can be used to add custom nodes to the audio graph.
*/
-@property(nonatomic, readonly) AVAudioEngine *audioEngine API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, readonly) AVAudioEngine *audioEngine API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property audioEnvironmentNode
@abstract Contains the instance of audio environment node used by the scene to spacialize sounds.
*/
-@property(nonatomic, readonly) AVAudioEnvironmentNode *audioEnvironmentNode API_AVAILABLE(macosx(10.11), ios(9.0)) __WATCHOS_PROHIBITED;
+@property(nonatomic, readonly) AVAudioEnvironmentNode *audioEnvironmentNode API_AVAILABLE(macos(10.11), ios(9.0)) __WATCHOS_PROHIBITED;
/*!
@property audioListener
@abstract Use this property to set the audio node to use as the listener position and orientation when rendering positional audio for this scene. The default is nil which means that the current point of view will be used dynamically.
*/
-@property(nonatomic, retain, nullable) SCNNode *audioListener API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, retain, nullable) SCNNode *audioListener API_AVAILABLE(macos(10.11), ios(9.0));
#pragma mark Deprecated
@@ -288,7 +291,7 @@
@abstract Specifies the current time to display the scene.
@discussion Deprecated, use "sceneTime" instead.
*/
-@property(nonatomic) NSTimeInterval currentTime API_DEPRECATED_WITH_REPLACEMENT("sceneTime", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+@property(nonatomic) NSTimeInterval currentTime API_DEPRECATED_WITH_REPLACEMENT("sceneTime", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
@end
@@ -304,34 +307,34 @@
/*!
@method renderer:updateAtTime:
@abstract Implement this to perform per-frame game logic. Called exactly once per frame before any animation and actions are evaluated and any physics are simulated.
- @param aRenderer The renderer that will render the scene.
+ @param renderer The renderer that will render the scene.
@param time The time at which to update the scene.
@discussion All modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
*/
-- (void)renderer:(id <SCNSceneRenderer>)renderer updateAtTime:(NSTimeInterval)time API_AVAILABLE(macosx(10.10));
+- (void)renderer:(id <SCNSceneRenderer>)renderer updateAtTime:(NSTimeInterval)time API_AVAILABLE(macos(10.10));
/*!
@method renderer:didApplyAnimationsAtTime:
@abstract Invoked on the delegate once the scene renderer did apply the animations.
- @param aRenderer The renderer that did render the scene.
+ @param renderer The renderer that did render the scene.
@param time The time at which the animations were applied.
@discussion All modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
*/
-- (void)renderer:(id <SCNSceneRenderer>)renderer didApplyAnimationsAtTime:(NSTimeInterval)time API_AVAILABLE(macosx(10.10));
+- (void)renderer:(id <SCNSceneRenderer>)renderer didApplyAnimationsAtTime:(NSTimeInterval)time API_AVAILABLE(macos(10.10));
/*!
@method renderer:didSimulatePhysicsAtTime:
@abstract Invoked on the delegate once the scene renderer did simulate the physics.
- @param aRenderer The renderer that did render the scene.
+ @param renderer The renderer that did render the scene.
@param time The time at which the physics were simulated.
@discussion All modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
*/
-- (void)renderer:(id <SCNSceneRenderer>)renderer didSimulatePhysicsAtTime:(NSTimeInterval)time API_AVAILABLE(macosx(10.10));
+- (void)renderer:(id <SCNSceneRenderer>)renderer didSimulatePhysicsAtTime:(NSTimeInterval)time API_AVAILABLE(macos(10.10));
/*!
@method renderer:willRenderScene:atTime:
@abstract Invoked on the delegate before the scene renderer renders the scene. At this point the openGL context and the destination framebuffer are bound.
- @param aRenderer The renderer that will render the scene.
+ @param renderer The renderer that will render the scene.
@param scene The scene to be rendered.
@param time The time at which the scene is to be rendered.
@discussion Starting in 10.10 all modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
@@ -341,7 +344,7 @@
/*!
@method renderer:didRenderScene:atTime:
@abstract Invoked on the delegate once the scene renderer did render the scene.
- @param aRenderer The renderer that did render the scene.
+ @param renderer The renderer that did render the scene.
@param scene The rendered scene.
@param time The time at which the scene was rendered.
@discussion Starting in 10.10 all modifications done within this method don't go through the transaction model, they are directly applied on the presentation tree.
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h 2016-09-26 20:31:43.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSceneSource.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNSceneSource.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -113,7 +113,7 @@
For better physics simulation it is recommended to use 1 unit equals to 1 meter.
This option has no effect if the asset is already compressed by Xcode (use the compression options instead).
*/
-FOUNDATION_EXTERN SCNSceneSourceLoadingOption const SCNSceneSourceConvertUnitsToMetersKey API_AVAILABLE(macosx(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
+FOUNDATION_EXTERN SCNSceneSourceLoadingOption const SCNSceneSourceConvertUnitsToMetersKey API_AVAILABLE(macos(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
/*!
@constant SCNSceneSourceConvertToYUpKey
@@ -121,21 +121,21 @@
@discussion Use this with a boolean value encapsulated in a NSNumber. The default value is NO.
This option has no effect if the asset is already compressed by Xcode (use the compression options instead).
*/
-FOUNDATION_EXTERN SCNSceneSourceLoadingOption const SCNSceneSourceConvertToYUpKey API_AVAILABLE(macosx(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
+FOUNDATION_EXTERN SCNSceneSourceLoadingOption const SCNSceneSourceConvertToYUpKey API_AVAILABLE(macos(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
/*!
@constant SCNSceneSourceAnimationImportPolicyKey
@abstract Pass one of the value below to specify what to do with loaded animations.
@discussion See below for the description of each individual key. Defaults to SCNSceneSourceAnimationImportPolicyPlayRepeatedly. On 10.9 and before the behavior is SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase. For compatibility reason if the application was built on 10.9 or before the default behavior is SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase.
*/
-FOUNDATION_EXTERN SCNSceneSourceLoadingOption const SCNSceneSourceAnimationImportPolicyKey API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNSceneSourceLoadingOption const SCNSceneSourceAnimationImportPolicyKey API_AVAILABLE(macos(10.10));
/*!
@constant SCNSceneSourceLoadingOptionPreserveOriginalTopology
@abstract Pass YES to make SceneKit preserve the original topology instead of triangulating at load time.
This can be useful to get better results when subdividing a geometry. Defaults to NO.
*/
-FOUNDATION_EXTERN SCNSceneSourceLoadingOption const SCNSceneSourceLoadingOptionPreserveOriginalTopology API_AVAILABLE(macosx(10.12), ios(10.0), tvos(10.0));
+FOUNDATION_EXTERN SCNSceneSourceLoadingOption const SCNSceneSourceLoadingOptionPreserveOriginalTopology API_AVAILABLE(macos(10.12), ios(10.0), tvos(10.0));
#define SCNSceneSourceLoadingOptionCreateNormalsIfAbsent SCNSceneSourceCreateNormalsIfAbsentKey
#define SCNSceneSourceLoadingOptionCheckConsistency SCNSceneSourceCheckConsistencyKey
@@ -159,25 +159,25 @@
@constant SCNSceneSourceAnimationImportPolicyPlay
@abstract Add animations to the scene and play them once (repeatCount set to 1).
*/
-FOUNDATION_EXTERN SCNSceneSourceAnimationImportPolicy const SCNSceneSourceAnimationImportPolicyPlay API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNSceneSourceAnimationImportPolicy const SCNSceneSourceAnimationImportPolicyPlay API_AVAILABLE(macos(10.10));
/*!
@constant SCNSceneSourceAnimationImportPolicyPlayRepeatedly
@abstract Add animations to the scene and play them repeatedly (repeatCount set to infinity).
*/
-FOUNDATION_EXTERN SCNSceneSourceAnimationImportPolicy const SCNSceneSourceAnimationImportPolicyPlayRepeatedly API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNSceneSourceAnimationImportPolicy const SCNSceneSourceAnimationImportPolicyPlayRepeatedly API_AVAILABLE(macos(10.10));
/*!
@constant SCNSceneSourceAnimationImportPolicyDoNotPlay
@abstract Only keep animations in the SCNSceneSource and don't add to the animatable elements of the scene.
*/
-FOUNDATION_EXTERN SCNSceneSourceAnimationImportPolicy const SCNSceneSourceAnimationImportPolicyDoNotPlay API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNSceneSourceAnimationImportPolicy const SCNSceneSourceAnimationImportPolicyDoNotPlay API_AVAILABLE(macos(10.10));
/*!
@constant SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase
@abstract Add animations to the scene and play them using the SCNView/SCNRenderer's scene time (usesSceneTimeBase set to YES)
*/
-FOUNDATION_EXTERN SCNSceneSourceAnimationImportPolicy const SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNSceneSourceAnimationImportPolicy const SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase API_AVAILABLE(macos(10.10));
/*!
@@ -351,7 +351,7 @@
@param predicate The block to apply to entries in the library. The block takes three arguments: "entry" is an entry in the library, "identifier" is the ID of this entry and "stop" is a reference to a Boolean value. The block can set the value to YES to stop further processing of the library. The stop argument is an out-only argument. You should only ever set this Boolean to YES within the Block. The Block returns a Boolean value that indicates whether "entry" passed the test.
@discussion The entry is an instance of one of following classes: SCNMaterial, SCNScene, SCNGeometry, SCNNode, CAAnimation, SCNLight, SCNCamera, SCNSkinner, SCNMorpher, NSImage.
*/
-- (NSArray<id> *)entriesPassingTest:(NS_NOESCAPE BOOL (^)(id entry, NSString *identifier, BOOL *stop))predicate API_AVAILABLE(macosx(10.9));
+- (NSArray<id> *)entriesPassingTest:(NS_NOESCAPE BOOL (^)(id entry, NSString *identifier, BOOL *stop))predicate API_AVAILABLE(macos(10.9));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h 2016-08-04 21:18:30.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNShadable.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNShadable.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -32,7 +32,7 @@
SCNBufferFrequencyPerFrame = 0,
SCNBufferFrequencyPerNode = 1,
SCNBufferFrequencyPerShadable = 2 // SCNMaterial or SCNGeometry
-} API_AVAILABLE(macosx(10.11), ios(9.0));
+} API_AVAILABLE(macos(10.11), ios(9.0));
@protocol SCNBufferStream <NSObject>
- (void)writeBytes:(void *)bytes length:(NSUInteger)length;
@@ -80,7 +80,7 @@
@param block The block to call to bind the specified symbol.
@discussion This method can only be used with OpenGL and OpenGLES based programs.
*/
-- (void)handleBindingOfSymbol:(NSString *)symbol usingBlock:(nullable SCNBindingBlock)block API_AVAILABLE(macosx(10.9)) __WATCHOS_PROHIBITED;
+- (void)handleBindingOfSymbol:(NSString *)symbol usingBlock:(nullable SCNBindingBlock)block API_AVAILABLE(macos(10.9)) __WATCHOS_PROHIBITED;
/*!
@method handleUnbindingOfSymbol:usingBlock:
@@ -89,7 +89,7 @@
@param block The block to call to unbind the specified symbol.
@discussion This method can only be used with OpenGL and OpenGLES based programs.
*/
-- (void)handleUnbindingOfSymbol:(NSString *)symbol usingBlock:(nullable SCNBindingBlock)block API_AVAILABLE(macosx(10.9)) __WATCHOS_PROHIBITED;
+- (void)handleUnbindingOfSymbol:(NSString *)symbol usingBlock:(nullable SCNBindingBlock)block API_AVAILABLE(macos(10.9)) __WATCHOS_PROHIBITED;
/*!
@property shaderModifiers
@@ -106,6 +106,17 @@
| #pragma arguments
| float myGrayAmount;
|
+ | In Metal, you can also tranfert varying values from the vertex shader (geometry modifier) to the fragment shader (surface/fragment modifier)
+ | In one (or both) of the modifier, declare the varying values
+ | #pragma varying
+ | half3 myVec;
+ |
+ | Output them in the geometry modifier
+ | out.myVec = _geometry.normal.xyz * 0.5h + 0.5h;
+ |
+ | And use them in the fragment modifier for example
+ | _output.color.rgb = saturate(in.myVec);
+ |
| // Optional global function definitions (for Metal: references to arguments from global functions are not supported).
| float mySin(float t) {
| return sin(t);
@@ -131,6 +142,12 @@
The SCNGeometry and SCNMaterial classes are key-value coding compliant classes, which means that you can set values for arbitrary keys. Even if the key `myAmplitude` is not a declared property of the class, you can still set a value for it.
Declaring a `myAmplitude` uniform in the shader modifier makes SceneKit observe the reveiver's `myAmplitude` key. Any change to that key will make SceneKit bind the uniform with the new value.
+ Common scalar types wrapped by NSValue are supported.
+ Metal Only:
+ - MTLBuffer are also supported as values (introduced in macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+ - Complex data types (struct) declared in the metal shader are supported.
+ - You can set them as a whole using NSData.
+ - Or you can set individual struct members using the member name as key and a value compatible with the member type.
Custom uniforms can be animated using explicit animations.
@@ -181,7 +198,7 @@
Shader modifiers can be written in GLSL or Metal. Metal shaders won't run on iOS 8 and macOS 10.10 or below.
*/
-@property(nonatomic, copy, nullable) NSDictionary<SCNShaderModifierEntryPoint, NSString *> *shaderModifiers API_AVAILABLE(macosx(10.9));
+@property(nonatomic, copy, nullable) NSDictionary<SCNShaderModifierEntryPoint, NSString *> *shaderModifiers API_AVAILABLE(macos(10.9));
@end
@@ -221,33 +238,33 @@
@property tessellationControlShader
@abstract Determines the receiver's tessellation control shader. Tessellation shaders require OpenGL Core Profile.
*/
-@property(nonatomic, copy, nullable) NSString *tessellationControlShader API_AVAILABLE(macosx(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
+@property(nonatomic, copy, nullable) NSString *tessellationControlShader API_AVAILABLE(macos(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
/*!
@property tessellationEvaluationShader
@abstract Determines the receiver's tessellation evaluation shader. Tessellation shaders require OpenGL Core Profile.
*/
-@property(nonatomic, copy, nullable) NSString *tessellationEvaluationShader API_AVAILABLE(macosx(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
+@property(nonatomic, copy, nullable) NSString *tessellationEvaluationShader API_AVAILABLE(macos(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
/*!
@property geometryShader
@abstract Determines the receiver's geometry shader. Geometry shaders require OpenGL Core Profile.
*/
-@property(nonatomic, copy, nullable) NSString *geometryShader API_AVAILABLE(macosx(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
+@property(nonatomic, copy, nullable) NSString *geometryShader API_AVAILABLE(macos(10.10)) API_UNAVAILABLE(ios, tvos, watchos);
/*!
@property vertexFunctionName
@abstract Determines the receiver's vertex function name.
@discussion The name of the vertex function (for Metal programs).
*/
-@property(nonatomic, copy, nullable) NSString *vertexFunctionName API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, copy, nullable) NSString *vertexFunctionName API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property fragmentFunctionName
@abstract Determines the receiver's fragment function name.
@discussion The name of the fragment function (for Metal programs).
*/
-@property(nonatomic, copy, nullable) NSString *fragmentFunctionName API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, copy, nullable) NSString *fragmentFunctionName API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@method handleBindingOfBufferNamed:frequency:usingBlock:
@@ -257,14 +274,14 @@
@param block The block that binds the buffer.
@discussion This method can only be used with Metal based programs.
*/
-- (void)handleBindingOfBufferNamed:(NSString *)name frequency:(SCNBufferFrequency)frequency usingBlock:(SCNBufferBindingBlock)block API_AVAILABLE(macosx(10.11), ios(9.0));
+- (void)handleBindingOfBufferNamed:(NSString *)name frequency:(SCNBufferFrequency)frequency usingBlock:(SCNBufferBindingBlock)block API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@property opaque
@abstract Determines the receiver's fragment are opaque or not. Defaults to YES.
*/
-@property(nonatomic, getter=isOpaque) BOOL opaque API_AVAILABLE(macosx(10.10));
+@property(nonatomic, getter=isOpaque) BOOL opaque API_AVAILABLE(macos(10.10));
/*!
@method setSemantic:forSymbol:options:
@@ -290,11 +307,11 @@
@property(nonatomic, assign, nullable) id <SCNProgramDelegate> delegate;
/*!
- @method library
+ @property library
@abstract Specifies the metal library to use to locate the function names specified above.
@discussion If set to nil the default library is used. Defaults to nil.
*/
-@property(nonatomic, retain, nullable) id <MTLLibrary> library API_AVAILABLE(macosx(10.11), ios(9.0));
+@property(nonatomic, retain, nullable) id <MTLLibrary> library API_AVAILABLE(macos(10.11), ios(9.0));
@end
@@ -315,7 +332,7 @@
@param programID The program object.
@param renderer The renderer that is currently rendering the scene.
*/
-- (BOOL)program:(SCNProgram *)program bindValueForSymbol:(NSString *)symbol atLocation:(unsigned int)location programID:(unsigned int)programID renderer:(SCNRenderer *)renderer API_DEPRECATED("Use -[SCNShadable handleBindingOfSymbol:usingBlock:] instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+- (BOOL)program:(SCNProgram *)program bindValueForSymbol:(NSString *)symbol atLocation:(unsigned int)location programID:(unsigned int)programID renderer:(SCNRenderer *)renderer API_DEPRECATED("Use -[SCNShadable handleBindingOfSymbol:usingBlock:] instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@method program:withID:bindValueForSymbol:atLocation:renderer:
@@ -326,7 +343,7 @@
@param programID The program object.
@param renderer The renderer that is currently rendering the scene.
*/
-- (void)program:(SCNProgram *)program unbindValueForSymbol:(NSString *)symbol atLocation:(unsigned int)location programID:(unsigned int)programID renderer:(SCNRenderer *)renderer API_DEPRECATED("Use -[SCNShadable handleUnbindingOfSymbol:usingBlock:] instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+- (void)program:(SCNProgram *)program unbindValueForSymbol:(NSString *)symbol atLocation:(unsigned int)location programID:(unsigned int)programID renderer:(SCNRenderer *)renderer API_DEPRECATED("Use -[SCNShadable handleUnbindingOfSymbol:usingBlock:] instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
/*!
@method handleError
@@ -343,7 +360,7 @@
@param program The queried program.
@discussion This is deprecated. Use SCNProgram's opaque property instead.
*/
-- (BOOL)programIsOpaque:(SCNProgram *)program API_DEPRECATED("Use SCNProgram.opaque instead", macosx(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
+- (BOOL)programIsOpaque:(SCNProgram *)program API_DEPRECATED("Use SCNProgram.opaque instead", macos(10.8, 10.10)) API_UNAVAILABLE(ios, watchos, tvos);
@end
@@ -381,12 +398,11 @@
uniform float Amplitude = 0.1
_geometry.position.xyz += _geometry.normal * (Amplitude*_geometry.position.y*_geometry.position.x) * sin(u_time);
*/
-FOUNDATION_EXTERN SCNShaderModifierEntryPoint const SCNShaderModifierEntryPointGeometry API_AVAILABLE(macosx(10.9));
+FOUNDATION_EXTERN SCNShaderModifierEntryPoint const SCNShaderModifierEntryPointGeometry API_AVAILABLE(macos(10.9));
/*!
@constant SCNShaderModifierEntryPointSurface
@abstract This is the entry point to alter the surface representation of the material, before the lighting has taken place.
- @discussion
Structures available from this entry point:
@@ -413,9 +429,10 @@
| float metalness; // Metalness property of the fragment
| vec2 metalnessTexcoord; // Metalness texture coordinates
| float roughness; // Roughness property of the fragment
- | vec2 roughnessTexcoord; // Metalness texture coordinates
+ | vec2 roughnessTexcoord; // Roughness texture coordinates
| float shininess; // Shininess property of the fragment
| float fresnel; // Fresnel property of the fragment
+ | float ambientOcclusion; // Ambient occlusion term of the fragment
| } _surface;
|
| Access: ReadWrite
@@ -438,13 +455,12 @@
f1 = f1 * f1 * 2.0 * (3. * 2. * f1);
_surface.diffuse = mix(vec4(1.0), vec4(0.0), f1);
*/
-FOUNDATION_EXTERN SCNShaderModifierEntryPoint const SCNShaderModifierEntryPointSurface API_AVAILABLE(macosx(10.9));
+FOUNDATION_EXTERN SCNShaderModifierEntryPoint const SCNShaderModifierEntryPointSurface API_AVAILABLE(macos(10.9));
/*!
@constant SCNShaderModifierEntryPointLightingModel
@abstract This is the entry point to provide custom lighting equation. The fragment will be called for each active light
of the scene and will need to accumulate lighting contribution for the vertex or the fragment in the _lightingContribution structure, using the light structure given.
- @discussion
Structures available from the this entry point:
@@ -479,7 +495,7 @@
dotProduct = max(0.0, pow(max(0.0, dot(_surface.normal, halfVector)), _surface.shininess));
_lightingContribution.specular += (dotProduct * _light.intensity.rgb);
*/
-FOUNDATION_EXTERN SCNShaderModifierEntryPoint const SCNShaderModifierEntryPointLightingModel API_AVAILABLE(macosx(10.9));
+FOUNDATION_EXTERN SCNShaderModifierEntryPoint const SCNShaderModifierEntryPointLightingModel API_AVAILABLE(macos(10.9));
/*!
@constant SCNShaderModifierEntryPointFragment
@@ -504,6 +520,6 @@
_output.color.rgb = vec3(1.0) - _output.color.rgb;
*/
-FOUNDATION_EXTERN SCNShaderModifierEntryPoint const SCNShaderModifierEntryPointFragment API_AVAILABLE(macosx(10.9));
+FOUNDATION_EXTERN SCNShaderModifierEntryPoint const SCNShaderModifierEntryPointFragment API_AVAILABLE(macos(10.9));
NS_ASSUME_NONNULL_END
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSkinner.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSkinner.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSkinner.h 2016-08-04 21:18:30.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNSkinner.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNSkinner.h
//
-// Copyright (c) 2013-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2013-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SceneKitTypes.h>
@@ -16,7 +16,7 @@
@class SCNSkinner
@abstract SCNSkinner controls the deformation of skinned geometries */
-API_AVAILABLE(macosx(10.9))
+API_AVAILABLE(macos(10.9))
@interface SCNSkinner : NSObject <NSSecureCoding>
/*!
@@ -24,7 +24,7 @@
@abstract Specifies the skeleton of the receiver.
@discussion When setting a new skeleton, the new skeleton must have the same hierarchy of joints.
*/
-@property(nonatomic, retain, nullable) SCNNode *skeleton;
+@property(nonatomic, weak, nullable) SCNNode *skeleton;
/*!
@method skinnerWithBaseGeometry:bones:boneInverseBindTransforms:boneWeights:boneIndices:
@@ -35,7 +35,7 @@
@param boneWeights A buffer of weights. This contains the weights of every influence of every vertex. The number of influence per vertex is controlled by the number of component in the geometry source.
@param boneIndices A buffer of bone indexes. This buffer contains the corresponding index in the bones array for every weight in the weights buffer.
*/
-+ (instancetype)skinnerWithBaseGeometry:(nullable SCNGeometry *)baseGeometry bones:(NSArray<SCNNode *> *)bones boneInverseBindTransforms:(nullable NSArray<NSValue *> *)boneInverseBindTransforms boneWeights:(SCNGeometrySource *)boneWeights boneIndices:(SCNGeometrySource *)boneIndices API_AVAILABLE(macosx(10.10));
++ (instancetype)skinnerWithBaseGeometry:(nullable SCNGeometry *)baseGeometry bones:(NSArray<SCNNode *> *)bones boneInverseBindTransforms:(nullable NSArray<NSValue *> *)boneInverseBindTransforms boneWeights:(SCNGeometrySource *)boneWeights boneIndices:(SCNGeometrySource *)boneIndices API_AVAILABLE(macos(10.10));
/*!
@property baseGeometry
@@ -45,38 +45,38 @@
Access this property if you want a whole new geometry (which will necessarily be shared among the skinner instances), with
different sources, for instance.
*/
-@property(retain, nonatomic, nullable) SCNGeometry *baseGeometry API_AVAILABLE(macosx(10.9));
+@property(retain, nonatomic, nullable) SCNGeometry *baseGeometry API_AVAILABLE(macos(10.9));
/*!
@property baseGeometryBindTransform
@abstract Specifies the transform of the baseGeometry at the time when the mesh was bound to a skeleton. This transforms the baseGeometry from object space to a space on which the skinning then applies.
*/
-@property(nonatomic) SCNMatrix4 baseGeometryBindTransform API_AVAILABLE(macosx(10.10));
+@property(nonatomic) SCNMatrix4 baseGeometryBindTransform API_AVAILABLE(macos(10.10));
/*!
@property boneInverseBindTransforms
@abstract The inverse of the bone’s bind-space transformation matrix at the time the bind shape was bound to this bone.
@discussion boneInverseBindTransforms is an array of SCNMatrix4 wrapped into instances of NSValue.
*/
-@property(readonly, nonatomic, nullable) NSArray<NSValue *> *boneInverseBindTransforms API_AVAILABLE(macosx(10.10));
+@property(readonly, nonatomic, nullable) NSArray<NSValue *> *boneInverseBindTransforms API_AVAILABLE(macos(10.10));
/*!
@property bones
@abstract The bones of the skinner.
*/
-@property(readonly, nonatomic) NSArray<SCNNode *> *bones API_AVAILABLE(macosx(10.10));
+@property(readonly, nonatomic) NSArray<SCNNode *> *bones API_AVAILABLE(macos(10.10));
/*!
@property boneWeights
@abstract The bone weights of the receiver.
*/
-@property(readonly, nonatomic) SCNGeometrySource *boneWeights API_AVAILABLE(macosx(10.10));
+@property(readonly, nonatomic) SCNGeometrySource *boneWeights API_AVAILABLE(macos(10.10));
/*!
@property boneIndices
@abstract The bone indices of the receiver.
*/
-@property(readonly, nonatomic) SCNGeometrySource *boneIndices API_AVAILABLE(macosx(10.10));
+@property(readonly, nonatomic) SCNGeometrySource *boneIndices API_AVAILABLE(macos(10.10));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h 2016-08-04 21:18:30.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTechnique.h 2017-05-30 23:11:55.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNTechnique.h
//
-// Copyright (c) 2014-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2014-2017 Apple Inc. All rights reserved.
//
#import <SceneKit/SCNShadable.h>
@@ -14,7 +14,7 @@
@abstract SCNTechnique represents a rendering process that may require multiple passes.
@discussion A technique is generally initialized from a Property List file. It can be set to any object that conforms to the SCNTechniqueSupport protocol.
*/
-API_AVAILABLE(macosx(10.10))
+API_AVAILABLE(macos(10.10))
@interface SCNTechnique : NSObject <SCNAnimatable, NSCopying, NSSecureCoding>
/*!
@@ -258,8 +258,8 @@
For example:
myTechnique[@"myAmplitude"] = aValue;
*/
-- (nullable id)objectForKeyedSubscript:(id)key API_AVAILABLE(macosx(10.11), ios(9.0));
-- (void)setObject:(nullable id)obj forKeyedSubscript:(id <NSCopying>)key API_AVAILABLE(macosx(10.11), ios(9.0));
+- (nullable id)objectForKeyedSubscript:(id)key API_AVAILABLE(macos(10.11), ios(9.0));
+- (void)setObject:(nullable id)obj forKeyedSubscript:(id <NSCopying>)key API_AVAILABLE(macos(10.11), ios(9.0));
@end
@@ -275,7 +275,7 @@
@property technique
@abstract Specifies the technique of the receiver. Defaults to nil.
*/
-@property(nonatomic, copy, nullable) SCNTechnique *technique API_AVAILABLE(macosx(10.10));
+@property(nonatomic, copy, nullable) SCNTechnique *technique API_AVAILABLE(macos(10.10));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h 2016-08-04 21:18:30.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNTransaction.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNTransaction.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SCNView.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SCNView.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <AppKit/AppKit.h>
@@ -9,6 +9,8 @@
#import <SceneKit/SCNSceneRenderer.h>
#import <SceneKit/SCNTechnique.h>
+@class SCNCameraController;
+
NS_ASSUME_NONNULL_BEGIN
#if defined(SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH) && SWIFT_SDK_OVERLAY2_SCENEKIT_EPOCH >= 3
@@ -21,24 +23,36 @@
@constant SCNViewOptionPreferredRenderingAPI Specifies the preferred rendering API to be used by the renderer.
@discussion Pass it as the key in the options dictionary given to initWithFrame:options:. The value is a NSNumber wrapping a SCNRenderingAPI. You can also select the preferred rendering API directly from the SCNView inspector in InterfaceBuilder.
*/
-FOUNDATION_EXTERN SCNViewOption const SCNPreferredRenderingAPIKey API_AVAILABLE(macosx(10.11), ios(9.0)) __WATCHOS_UNAVAILABLE;
+FOUNDATION_EXTERN SCNViewOption const SCNPreferredRenderingAPIKey API_AVAILABLE(macos(10.11), ios(9.0)) __WATCHOS_UNAVAILABLE;
/*!
@constant SCNViewOptionPreferredDevice Specifies the preferred metal device to be used by the renderer.
@discussion The value is directly a id <MTLDevice>.
*/
-FOUNDATION_EXTERN SCNViewOption const SCNPreferredDeviceKey API_AVAILABLE(macosx(10.11), ios(9.0));
+FOUNDATION_EXTERN SCNViewOption const SCNPreferredDeviceKey API_AVAILABLE(macos(10.11), ios(9.0));
/*!
@constant SCNViewOptionPreferLowPowerDevice Specifies if the renderer should prefer a low power metal device.
@discussion The value is a NSNumber wrapping a BOOL. Defaults to NO.
*/
-FOUNDATION_EXTERN SCNViewOption const SCNPreferLowPowerDeviceKey API_AVAILABLE(macosx(10.11), ios(9.0));
+FOUNDATION_EXTERN SCNViewOption const SCNPreferLowPowerDeviceKey API_AVAILABLE(macos(10.11), ios(9.0));
#define SCNViewOptionPreferredRenderingAPI SCNPreferredRenderingAPIKey
#define SCNViewOptionPreferredDevice SCNPreferredDeviceKey
#define SCNViewOptionPreferLowPowerDevice SCNPreferLowPowerDeviceKey
+API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0))
+@protocol SCNCameraControlConfiguration <NSObject>
+
+@property(nonatomic, assign) BOOL autoSwitchToFreeCamera;
+@property(nonatomic, assign) BOOL allowsTranslation;
+@property(nonatomic, assign) CGFloat flyModeVelocity; // in m/s
+@property(nonatomic, assign) CGFloat panSensitivity;
+@property(nonatomic, assign) CGFloat truckSensitivity;
+@property(nonatomic, assign) CGFloat rotationSensitivity;
+
+@end
+
/*!
@class SCNView
@abstract A SCNView is a subclass of NSView that can display a SCNScene
@@ -60,6 +74,13 @@
@property(nonatomic, retain, nullable) SCNScene *scene;
/*!
+ @property rendersContinuously
+ @abstract When set to YES, the view continously redraw at the display link frame rate. When set to NO the view will only redraw when something change or animates in the receiver's scene. Defaults to NO.
+ */
+@property(nonatomic, assign) BOOL rendersContinuously;
+
+
+/*!
@property backgroundColor
@abstract Specifies the background color of the receiver. Defaults to opaque white.
*/
@@ -82,17 +103,27 @@
*/
@property(nonatomic) BOOL allowsCameraControl;
+/*!
+ @property cameraControlConfiguration
+ @abstract An object describing the current configuration of the event handler.
+ @discussion This object can be used to configure the event handler used when allowCameraControl is set to YES.
+ */
+@property(nonatomic, readonly) id<SCNCameraControlConfiguration> cameraControlConfiguration API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
+/*!
+ @property defaultCameraController
+ @abstract If allowCameraController is set to YES, returns the default SCNCameraController used to drive the current point of view otherwise returns nil.
+ */
+@property(nullable, nonatomic, readonly) SCNCameraController* defaultCameraController API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
/*!
@property snapshot
@abstract Draws the contents of the view and returns them as a new image object
@discussion This method is thread-safe and may be called at any time.
*/
-- (NSImage *)snapshot API_AVAILABLE(macosx(10.10));
+- (NSImage *)snapshot API_AVAILABLE(macos(10.10));
-/*!
- @functiongroup Actions
- */
-/*!
+/*!
@method play:
@abstract This action method begins playing the scene at its current location.
@param sender The object (such as a button or menu item) sending the message to play the scene.
@@ -119,9 +150,9 @@
@property preferredFramesPerSecond
@abstract The rate you want the view to redraw its contents.
@discussion When your application sets its preferred frame rate, the view chooses a frame rate as close to that as possible based on the capabilities of the screen the view is displayed on. The actual frame rate chosen is usually a factor of the maximum refresh rate of the screen to provide a consistent frame rate. For example, if the maximum refresh rate of the screen is 60 frames per second, that is also the highest frame rate the view sets as the actual frame rate. However, if you ask for a lower frame rate, it might choose 30, 20, 15 or some other factor to be the actual frame rate. Your application should choose a frame rate that it can consistently maintain.
- The default value is 0 which means the display link will fire at the native cadence of the display hardware.
+ The default value is 0 which means the display link will fire at the native cadence of the display hardware.
*/
-@property(nonatomic) NSInteger preferredFramesPerSecond API_AVAILABLE(macosx(10.12));
+@property(nonatomic) NSInteger preferredFramesPerSecond API_AVAILABLE(macos(10.12));
/*!
@property openGLContext
@@ -134,7 +165,8 @@
@property antialiasingMode
@abstract Defaults to SCNAntialiasingModeMultisampling4X on macOS and SCNAntialiasingModeNone on iOS.
*/
-@property(nonatomic) SCNAntialiasingMode antialiasingMode API_AVAILABLE(macosx(10.10));
+@property(nonatomic) SCNAntialiasingMode antialiasingMode API_AVAILABLE(macos(10.10));
+
/*!
@property pixelFormat
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes 1969-12-31 19:00:00.000000000 -0500
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.apinotes 2017-05-18 17:39:18.000000000 -0400
@@ -0,0 +1,372 @@
+---
+Name: SceneKit
+
+Protocols:
+# The below are methods for which overlays provide better implementations
+- Name: SCNBoundingVolume
+ Methods:
+ - Selector: 'getBoundingBoxMin:max:'
+ SwiftPrivate: true
+ MethodKind: Instance
+ - Selector: 'setBoundingBoxMin:max:'
+ SwiftPrivate: true
+ MethodKind: Instance
+ - Selector: 'getBoundingSphereCenter:radius:'
+ SwiftPrivate: true
+ MethodKind: Instance
+
+#
+# New wrapper types will be made for these typedefs, and we want to nest them
+#
+Typedefs:
+- Name: SCNGeometrySourceSemantic
+ SwiftName: SCNGeometrySource.Semantic
+- Name: SCNLightType
+ SwiftName: SCNLight.LightType
+- Name: SCNLightingModel
+ SwiftName: SCNMaterial.LightingModel
+- Name: SCNParticleProperty
+ SwiftName: SCNParticleSystem.ParticleProperty
+- Name: SCNPhysicsShapeOption
+ SwiftName: SCNPhysicsShape.Option
+- Name: SCNPhysicsShapeType
+ SwiftName: SCNPhysicsShape.ShapeType
+- Name: SCNPhysicsTestOption
+ SwiftName: SCNPhysicsWorld.TestOption
+- Name: SCNPhysicsTestSearchMode
+ SwiftName: SCNPhysicsWorld.TestSearchMode
+- Name: SCNSceneAttribute
+ SwiftName: SCNScene.Attribute
+- Name: SCNSceneSourceAnimationImportPolicy
+ SwiftName: SCNSceneSource.AnimationImportPolicy
+- Name: SCNSceneSourceLoadingOption
+ SwiftName: SCNSceneSource.LoadingOption
+- Name: SCNViewOption
+ SwiftName: SCNView.Option
+
+#
+# Name overrides for globals that we will be nesting onto our new wrapper types
+#
+Globals:
+- Name: SCNHitTestFirstFoundOnlyKey
+ SwiftName: SCNHitTestOption.firstFoundOnly
+- Name: SCNHitTestSortResultsKey
+ SwiftName: SCNHitTestOption.sortResults
+- Name: SCNHitTestClipToZRangeKey
+ SwiftName: SCNHitTestOption.clipToZRange
+- Name: SCNHitTestBackFaceCullingKey
+ SwiftName: SCNHitTestOption.backFaceCulling
+- Name: SCNHitTestBoundingBoxOnlyKey
+ SwiftName: SCNHitTestOption.boundingBoxOnly
+- Name: SCNHitTestIgnoreChildNodesKey
+ SwiftName: SCNHitTestOption.ignoreChildNodes
+- Name: SCNHitTestRootNodeKey
+ SwiftName: SCNHitTestOption.rootNode
+- Name: SCNHitTestIgnoreHiddenNodesKey
+ SwiftName: SCNHitTestOption.ignoreHiddenNodes
+# FIXME: All of these are on nested types, which is not supported by swift_name
+# yet. Once it is, make these fully qualified
+- Name: SCNPhysicsShapeTypeKey
+ SwiftName: type
+- Name: SCNPhysicsShapeKeepAsCompoundKey
+ SwiftName: keepAsCompound
+- Name: SCNPhysicsShapeScaleKey
+ SwiftName: scale
+- Name: SCNPhysicsTestCollisionBitMaskKey
+ SwiftName: collisionBitMask
+- Name: SCNPhysicsTestSearchModeKey
+ SwiftName: searchMode
+- Name: SCNPhysicsTestBackfaceCullingKey
+ SwiftName: backfaceCulling
+- Name: SCNSceneStartTimeAttributeKey
+ SwiftName: startTime
+- Name: SCNSceneEndTimeAttributeKey
+ SwiftName: endTime
+- Name: SCNSceneFrameRateAttributeKey
+ SwiftName: frameRate
+- Name: SCNSceneUpAxisAttributeKey
+ SwiftName: upAxis
+- Name: SCNSceneSourceCreateNormalsIfAbsentKey
+ SwiftName: createNormalsIfAbsent
+- Name: SCNSceneSourceCheckConsistencyKey
+ SwiftName: checkConsistency
+- Name: SCNSceneSourceFlattenSceneKey
+ SwiftName: flattenScene
+- Name: SCNSceneSourceUseSafeModeKey
+ SwiftName: useSafeMode
+- Name: SCNSceneSourceAssetDirectoryURLsKey
+ SwiftName: assetDirectoryURLs
+- Name: SCNSceneSourceOverrideAssetURLsKey
+ SwiftName: overrideAssetURLs
+- Name: SCNSceneSourceStrictConformanceKey
+ SwiftName: strictConformance
+- Name: SCNSceneSourceConvertUnitsToMetersKey
+ SwiftName: convertUnitsToMeters
+- Name: SCNSceneSourceConvertToYUpKey
+ SwiftName: convertToYUp
+- Name: SCNSceneSourceAnimationImportPolicyKey
+ SwiftName: animationImportPolicy
+- Name: SCNPreferredRenderingAPIKey
+ SwiftName: preferredRenderingAPI
+- Name: SCNPreferredDeviceKey
+ SwiftName: preferredDevice
+- Name: SCNPreferLowPowerDeviceKey
+ SwiftName: preferLowPowerDevice
+
+#
+# API Renaming
+#
+Protocols:
+- Name: SCNActionable
+ Methods:
+ - Selector: 'runAction:'
+ MethodKind: Instance
+ SwiftName: runAction(_:)
+ - Selector: 'runAction:completionHandler:'
+ MethodKind: Instance
+ SwiftName: runAction(_:completionHandler:)
+ - Selector: 'runAction:forKey:'
+ MethodKind: Instance
+ SwiftName: runAction(_:forKey:)
+ - Selector: 'runAction:forKey:completionHandler:'
+ MethodKind: Instance
+ SwiftName: runAction(_:forKey:completionHandler:)
+- Name: SCNAnimatable
+ Methods:
+ - Selector: 'addAnimation:forKey:'
+ MethodKind: Instance
+ SwiftName: addAnimation(_:forKey:)
+ - Selector: 'addAnimationPlayer:forKey:'
+ MethodKind: Instance
+ SwiftName: addAnimationPlayer(_:forKey:)
+ - Selector: 'isAnimationForKeyPaused:'
+ MethodKind: Instance
+ SwiftName: isAnimationPaused(forKey:)
+ - Selector: 'setSpeed:forAnimationKey:'
+ MethodKind: Instance
+ SwiftName: setAnimationSpeed(_:forKey:)
+- Name: SCNSceneRenderer
+ Methods:
+ - Selector: 'hitTest:options:'
+ MethodKind: Instance
+ SwiftName: hitTest(_:options:)
+ - Selector: 'isNodeInsideFrustum:withPointOfView:'
+ MethodKind: Instance
+ SwiftName: isNode(_:insideFrustumOf:)
+ - Selector: 'nodesInsideFrustumWithPointOfView:'
+ MethodKind: Instance
+ SwiftName: nodesInsideFrustum(of:)
+ - Selector: 'prepareObjects:withCompletionHandler:'
+ MethodKind: Instance
+ SwiftName: prepare(_:completionHandler:)
+- Name: SCNBufferStream
+ Methods:
+ - Selector: 'writeBytes:length:'
+ MethodKind: Instance
+ SwiftName: writeBytes(_:count:)
+- Name: SCNShadable
+ Methods:
+ - Selector: 'handleBindingOfSymbol:usingBlock:'
+ MethodKind: Instance
+ SwiftName: handleBinding(ofSymbol:handler:)
+ - Selector: 'handleUnbindingOfSymbol:usingBlock:'
+ MethodKind: Instance
+ SwiftName: handleUnbinding(ofSymbol:handler:)
+
+Classes:
+- Name: SCNAction
+ Methods:
+ - Selector: 'rotateToX:y:z:duration:shortestUnitArc:'
+ MethodKind: Class
+ SwiftName: rotateTo(x:y:z:duration:usesShortestUnitArc:)
+ - Selector: 'rotateByAngle:aroundAxis:duration:'
+ MethodKind: Class
+ SwiftName: rotate(by:around:duration:)
+ - Selector: 'fadeInWithDuration:'
+ MethodKind: Class
+ SwiftName: fadeIn(duration:)
+ - Selector: 'fadeOutWithDuration:'
+ MethodKind: Class
+ SwiftName: fadeOut(duration:)
+ - Selector: 'waitForDuration:'
+ MethodKind: Class
+ SwiftName: wait(duration:)
+ - Selector: 'waitForDuration:withRange:'
+ MethodKind: Class
+ SwiftName: wait(duration:withRange:)
+ - Selector: 'customActionWithDuration:actionBlock:'
+ MethodKind: Class
+ SwiftName: customAction(duration:action:)
+ - Selector: 'playAudioSource:waitForCompletion:'
+ MethodKind: Class
+ SwiftName: playAudio(_:waitForCompletion:)
+- Name: SCNLookAtConstraint
+ Properties:
+ - Name: gimbalLockEnabled
+ SwiftName: isGimbalLockEnabled
+- Name: SCNIKConstraint
+ Methods:
+ - Selector: 'inverseKinematicsConstraintWithChainRootNode:'
+ MethodKind: Class
+ SwiftName: inverseKinematicsConstraint(chainRootNode:)
+- Name: SCNGeometry
+ Properties:
+ - Name: geometrySources
+ SwiftName: sources
+ - Name: geometryElements
+ SwiftName: elements
+ - Name: geometryElementCount
+ SwiftName: elementCount
+ Methods:
+ - Selector: 'materialWithName:'
+ MethodKind: Instance
+ SwiftName: material(named:)
+ - Selector: 'geometrySourcesForSemantic:'
+ MethodKind: Instance
+ SwiftName: sources(for:)
+ - Selector: 'geometryElementAtIndex:'
+ MethodKind: Instance
+ SwiftName: element(at:)
+- Name: SCNGeometrySource
+ Methods:
+ - Selector: 'geometrySourceWithData:semantic:vectorCount:floatComponents:componentsPerVector:bytesPerComponent:dataOffset:dataStride:'
+ MethodKind: Class
+ SwiftName: 'init(data:semantic:vectorCount:usesFloatComponents:componentsPerVector:bytesPerComponent:dataOffset:dataStride:)'
+ - Selector: 'geometrySourceWithTextureCoordinates:count:'
+ MethodKind: Class
+ Availability: nonswift
+ AvailabilityMsg: "Use init(textureCoordinates:) instead"
+ - Selector: 'geometrySourceWithNormals:count:'
+ MethodKind: Class
+ Availability: nonswift
+ AvailabilityMsg: "Use init(normals:) instead"
+ - Selector: 'geometrySourceWithVertices:count:'
+ MethodKind: Class
+ Availability: nonswift
+ AvailabilityMsg: "Use init(vertices:) instead"
+ Properties:
+ - Name: floatComponents
+ SwiftName: usesFloatComponents
+- Name: SCNMaterial
+ Properties:
+ - Name: lightingModelName
+ SwiftName: lightingModel
+- Name: SCNMorpher
+ Methods:
+ - Selector: 'weightForTargetAtIndex:'
+ MethodKind: Instance
+ SwiftName: weight(forTargetAt:)
+- Name: SCNNode
+ Methods:
+ - Selector: 'hitTestWithSegmentFromPoint:toPoint:options:'
+ MethodKind: Instance
+ SwiftName: hitTestWithSegment(from:to:options:)
+ - Selector: 'convertVector:fromNode:'
+ MethodKind: Instance
+ SwiftName: convertVector(_:from:)
+ - Selector: 'convertVector:toNode:'
+ MethodKind: Instance
+ SwiftName: convertVector(_:to:)
+- Name: SCNParticleSystem
+ Properties:
+ - Name: affectedByGravity
+ SwiftName: isAffectedByGravity
+ - Name: affectedByPhysicsFields
+ SwiftName: isAffectedByPhysicsFields
+ Methods:
+ - Selector: 'handleEvent:forProperties:withBlock:'
+ MethodKind: Instance
+ SwiftName: handle(_:forProperties:handler:)
+ - Selector: 'addModifierForProperties:atStage:withBlock:'
+ MethodKind: Instance
+ SwiftName: addModifier(forProperties:at:modifier:)
+ - Selector: 'removeModifiersOfStage:'
+ MethodKind: Instance
+ SwiftName: removeModifiers(at:)
+- Name: SCNScene
+ Methods:
+ - Selector: 'addParticleSystem:withTransform:'
+ MethodKind: Instance
+ SwiftName: addParticleSystem(_:transform:)
+- Name: SCNPhysicsBody
+ Methods:
+ - Selector: 'applyForce:impulse:'
+ MethodKind: Instance
+ SwiftName: applyForce(_:asImpulse:)
+ - Selector: 'applyForce:atPosition:impulse:'
+ MethodKind: Instance
+ SwiftName: applyForce(_:at:asImpulse:)
+ - Selector: 'applyTorque:impulse:'
+ MethodKind: Instance
+ SwiftName: applyTorque(_:asImpulse:)
+- Name: SCNPhysicsField
+ Methods:
+ - Selector: 'noiseFieldWithSmoothness:animationSpeed:'
+ MethodKind: Class
+ SwiftName: noiseField(smoothness:animationSpeed:)
+ - Selector: 'turbulenceFieldWithSmoothness:animationSpeed:'
+ MethodKind: Class
+ SwiftName: turbulenceField(smoothness:animationSpeed:)
+- Name: SCNPhysicsWorld
+ Methods:
+ - Selector: 'addBehavior:'
+ MethodKind: Instance
+ SwiftName: addBehavior(_:)
+ - Selector: 'removeBehavior:'
+ MethodKind: Instance
+ SwiftName: removeBehavior(_:)
+ - Selector: 'rayTestWithSegmentFromPoint:toPoint:options:'
+ MethodKind: Instance
+ SwiftName: rayTestWithSegment(from:to:options:)
+ - Selector: 'contactTestBetweenBody:andBody:options:'
+ MethodKind: Instance
+ SwiftName: contactTestBetween(_:_:options:)
+ - Selector: 'contactTestWithBody:options:'
+ MethodKind: Instance
+ SwiftName: contactTest(with:options:)
+ - Selector: 'convexSweepTestWithShape:fromTransform:toTransform:options:'
+ MethodKind: Instance
+ SwiftName: convexSweepTest(with:from:to:options:)
+- Name: SCNSceneSource
+ Methods:
+ - Selector: 'identifiersOfEntriesWithClass:'
+ MethodKind: Instance
+ SwiftName: identifiersOfEntries(withClass:)
+- Name: SCNProgram
+ Methods:
+ - Selector: 'handleBindingOfBufferNamed:frequency:usingBlock:'
+ MethodKind: Instance
+ SwiftName: handleBinding(ofBufferNamed:frequency:handler:)
+
+#
+# Swift 3 Source Compatibility
+#
+SwiftVersions:
+- Version: 3.0
+ Classes:
+ - Name: SCNGeometry
+ Properties:
+ - Name: geometrySources
+ SwiftName: geometrySources
+ - Name: geometryElements
+ SwiftName: geometryElements
+ - Name: geometryElementCount
+ SwiftName: geometryElementCount
+ Methods:
+ - Selector: 'geometrySourcesForSemantic:'
+ MethodKind: Instance
+ SwiftName: getGeometrySources(for:)
+ - Selector: 'geometryElementAtIndex:'
+ MethodKind: Instance
+ SwiftName: geometryElement(at:)
+ - Name: SCNGeometrySource
+ Methods:
+ - Selector: 'geometrySourceWithTextureCoordinates:count:'
+ MethodKind: Class
+ SwiftPrivate: false
+ - Selector: 'geometrySourceWithNormals:count:'
+ MethodKind: Class
+ SwiftPrivate: false
+ - Selector: 'geometrySourceWithVertices:count:'
+ MethodKind: Class
+ SwiftPrivate: false
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h 2016-08-04 21:18:28.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKit.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SceneKit.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
/*! @framework SceneKit
@@ -49,6 +49,7 @@
#import <SceneKit/SCNReferenceNode.h>
#import <SceneKit/SCNAudioSource.h>
#import <SceneKit/SCNHitTest.h>
+#import <SceneKit/SCNCameraController.h>
//scripting
#import <SceneKit/SCNJavascript.h>
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/SceneKitTypes.h 2017-05-18 17:39:18.000000000 -0400
@@ -1,7 +1,7 @@
//
// SceneKitTypes.h
//
-// Copyright (c) 2012-2016 Apple Inc. All rights reserved.
+// Copyright (c) 2012-2017 Apple Inc. All rights reserved.
//
#import <Foundation/Foundation.h>
@@ -22,6 +22,31 @@
#endif
+// Color
+#define SCNColor NSColor
+
+/*! @enum SCNActionTimingMode
+ @abstract The modes that an action can use to adjust the apparent timing of the action.
+ */
+typedef NS_ENUM(NSInteger, SCNActionTimingMode) {
+ SCNActionTimingModeLinear,
+ SCNActionTimingModeEaseIn,
+ SCNActionTimingModeEaseOut,
+ SCNActionTimingModeEaseInEaseOut
+} API_AVAILABLE(macos(10.10), ios(8.0));
+
+/*! @enum SCNColorComponent
+ @abstract Color components
+ */
+typedef NS_OPTIONS(NSInteger, SCNColorMask) {
+ SCNColorMaskNone = 0,
+ SCNColorMaskRed = 0x1 << 3,
+ SCNColorMaskGreen = 0x1 << 2,
+ SCNColorMaskBlue = 0x1 << 1,
+ SCNColorMaskAlpha = 0x1 << 0,
+ SCNColorMaskAll = 0xf
+} API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0), watchos(4.0));
+
#pragma mark - Vectors
typedef struct SCNVector3 {
@@ -33,10 +58,10 @@
} SCNVector4;
/* The null vector: [0 0 0]. */
-FOUNDATION_EXTERN const SCNVector3 SCNVector3Zero API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN const SCNVector3 SCNVector3Zero API_AVAILABLE(macos(10.10));
/* The null vector: [0 0 0 0]. */
-FOUNDATION_EXTERN const SCNVector4 SCNVector4Zero API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN const SCNVector4 SCNVector4Zero API_AVAILABLE(macos(10.10));
/* Returns true if 'a' is exactly equal to 'b'. */
FOUNDATION_EXTERN bool SCNVector3EqualToVector3 (SCNVector3 a, SCNVector3 b);
@@ -67,13 +92,13 @@
typedef CATransform3D SCNMatrix4;
/* The identity matrix: [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]. */
-FOUNDATION_EXTERN const SCNMatrix4 SCNMatrix4Identity API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN const SCNMatrix4 SCNMatrix4Identity API_AVAILABLE(macos(10.10));
/* Returns true if 'm' is the identity matrix. */
-FOUNDATION_EXTERN bool SCNMatrix4IsIdentity(SCNMatrix4 m) API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN bool SCNMatrix4IsIdentity(SCNMatrix4 m) API_AVAILABLE(macos(10.10));
/* Returns true if 'a' is exactly equal to 'b'. */
-FOUNDATION_EXTERN bool SCNMatrix4EqualToMatrix4(SCNMatrix4 a, SCNMatrix4 b) API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN bool SCNMatrix4EqualToMatrix4(SCNMatrix4 a, SCNMatrix4 b) API_AVAILABLE(macos(10.10));
/* Returns a transform that translates by '(tx, ty, tz)':
* m' = [1 0 0 0; 0 1 0 0; 0 0 1 0; tx ty tz 1]. */
@@ -96,7 +121,7 @@
}
/* Returns a matrix that rotates by 'angle' radians about the vector '(x, y, z)'. */
-FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4MakeRotation(CGFloat angle, CGFloat x, CGFloat y, CGFloat z) API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4MakeRotation(CGFloat angle, CGFloat x, CGFloat y, CGFloat z) API_AVAILABLE(macos(10.10));
/* Translate 'm' by '(tx, ty, tz)' and return the result:
* m' = translate(tx, ty, tz) * m. */
@@ -109,17 +134,17 @@
/* Scale 'm' by '(sx, sy, sz)' and return the result:
* m' = scale(sx, sy, sz) * m. */
-FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4Scale(SCNMatrix4 m, CGFloat sx, CGFloat sy, CGFloat sz) API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4Scale(SCNMatrix4 m, CGFloat sx, CGFloat sy, CGFloat sz) API_AVAILABLE(macos(10.10));
/* Rotate 'm' by 'angle' radians about the vector '(x, y, z)' and return the result:
* m' = rotation(angle, x, y, z) * m. */
-FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4Rotate(SCNMatrix4 m, CGFloat angle, CGFloat x, CGFloat y, CGFloat z) API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4Rotate(SCNMatrix4 m, CGFloat angle, CGFloat x, CGFloat y, CGFloat z) API_AVAILABLE(macos(10.10));
/* Invert 'm' and return the result. */
-FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4Invert(SCNMatrix4 m) API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4Invert(SCNMatrix4 m) API_AVAILABLE(macos(10.10));
/* Concatenate 'b' to 'a' and return the result: m' = a * b. */
-FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4Mult(SCNMatrix4 a, SCNMatrix4 b) API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4Mult(SCNMatrix4 a, SCNMatrix4 b) API_AVAILABLE(macos(10.10));
#pragma mark - GLKit Bridge
@@ -160,8 +185,8 @@
#endif
}
-FOUNDATION_EXTERN GLKMatrix4 SCNMatrix4ToGLKMatrix4(SCNMatrix4 mat) API_AVAILABLE(macosx(10.10));
-FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4FromGLKMatrix4(GLKMatrix4 mat) API_AVAILABLE(macosx(10.10));
+FOUNDATION_EXTERN GLKMatrix4 SCNMatrix4ToGLKMatrix4(SCNMatrix4 mat) API_AVAILABLE(macos(10.10));
+FOUNDATION_EXTERN SCNMatrix4 SCNMatrix4FromGLKMatrix4(GLKMatrix4 mat) API_AVAILABLE(macos(10.10));
#define GLKMatrix4FromCATransform3D(X) SCNMatrix4ToGLKMatrix4(X)
#define GLKMatrix4ToCATransform3D(X) SCNMatrix4FromGLKMatrix4(X)
@@ -221,11 +246,11 @@
+ (NSValue *)valueWithSCNVector3:(SCNVector3)v;
+ (NSValue *)valueWithSCNVector4:(SCNVector4)v;
-+ (NSValue *)valueWithSCNMatrix4:(SCNMatrix4)v API_AVAILABLE(macosx(10.10));
++ (NSValue *)valueWithSCNMatrix4:(SCNMatrix4)v API_AVAILABLE(macos(10.10));
@property(nonatomic, readonly) SCNVector3 SCNVector3Value;
@property(nonatomic, readonly) SCNVector4 SCNVector4Value;
-@property(nonatomic, readonly) SCNMatrix4 SCNMatrix4Value API_AVAILABLE(macosx(10.10));
+@property(nonatomic, readonly) SCNMatrix4 SCNMatrix4Value API_AVAILABLE(macos(10.10));
@end
diff -ruN /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/scn_metal /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/scn_metal
--- /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/SceneKit.framework/Headers/scn_metal 2016-08-04 21:18:29.000000000 -0400
+++ /Applications/Xcode9-beta1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/SceneKit.framework/Headers/scn_metal 2017-05-18 17:39:18.000000000 -0400
@@ -26,6 +26,7 @@
float4x4 projectionTransform;
float4x4 viewProjectionTransform;
float4x4 viewToCubeTransform; // transform from view space to cube texture space (canonical Y Up space)
+ float4x4 lastFrameViewProjectionTransform;
float4 ambientLightingColor;
float4 fogColor;
float3 fogParameters; // x:-1/(end-start) y:1-start*x z:exp
@@ -34,10 +35,14 @@
float sinTime;
float cosTime;
float random01;
+ float motionBlurIntensity;
// new in macOS 10.12 and iOS 10
float environmentIntensity;
float4x4 inverseProjectionTransform;
float4x4 inverseViewProjectionTransform;
+ // new in macOS 10.13 and iOS 11
+ float2 nearFar; // x: near, y: far
+ float4 viewportSize; // xy:size, zw:size / tan(fov/2)
};
// In custom shaders or in shader modifiers, you also have access to node relative information.