我正在尝试从 DAE 文件中提取动画,如何快速使用此方法?
谢谢,
Objective-C 代码是:
//CAAnimation *animation = [sceneSource entryWithIdentifier:animationIDs[index] withClass:[CAAnimation class]];
func extractAnimationsFromSceneSource(sceneSource: SCNSceneSource) {
let animationsIDs: NSArray = [sceneSource.isKindOfClass(CAAnimation)]
let animationCount: Int = animationsIDs.count
var longAnimations = NSMutableArray(capacity: animationCount)
let maxDuration: CFTimeInterval = 0
for index in 0..animationCount {
// gets error CAAnimation is not convertible to 'AnyClass'
let animation = sceneSource.entryWithIdentifier(animationsIDs[index], withClass:CAAnimation())
}
}