Skip to content

[SceneKit] Add apinotes to swift_private some decls #3420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apinotes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ set(SWIFT_API_NOTES_INPUTS
PassKit
QuartzCore
QuickLook
SceneKit
SpriteKit
StoreKit
TVMLKit
Expand Down
17 changes: 17 additions & 0 deletions apinotes/SceneKit.apinotes
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
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

6 changes: 3 additions & 3 deletions stdlib/public/SDK/SceneKit/SceneKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -199,19 +199,19 @@ extension SCNBoundingVolume {
get {
var min = SCNVector3Zero
var max = SCNVector3Zero
getBoundingBoxMin(&min, max: &max)
__getBoundingBoxMin(&min, max: &max)
return (min: min, max: max)
}
set {
var min = newValue.min
var max = newValue.max
setBoundingBoxMin(&min, max: &max)
__setBoundingBoxMin(&min, max: &max)
}
}
public var boundingSphere: (center: SCNVector3, radius: Float) {
var center = SCNVector3Zero
var radius = CGFloat(0.0)
getBoundingSphereCenter(&center, radius: &radius)
__getBoundingSphereCenter(&center, radius: &radius)
return (center: center, radius: Float(radius))
}
}
Expand Down