Swift ARCore在语义上是否与ARKit';s";“让飞机锚定”吗;?
我想知道在Swift ARCore在语义上是否与ARKit';s";“让飞机锚定”吗;?,swift,kotlin,augmented-reality,arkit,arcore,Swift,Kotlin,Augmented Reality,Arkit,Arcore,我想知道在ARCore/Kotlin中是否有类似的语义结构,比如ARKit/Swift中的guard let语句 let anchor: ARAnchor? guard let planeAnchor = anchor as? ARPlaneAnchor else { print("condition not met") return } 我想我已经找到了ARCore的planeAnchor与Elvis操作符和safe cast操作符所需的语义: public class
ARCore
/Kotlin
中是否有类似的语义结构,比如ARKit
/Swift
中的guard let
语句
let anchor: ARAnchor?
guard let planeAnchor = anchor as? ARPlaneAnchor else {
print("condition not met")
return
}
我想我已经找到了ARCore的
planeAnchor
与Elvis操作符和safe cast操作符所需的语义:
public class CenterPosePlaneAnchor { ... }
val anchor: Anchor?
val info = "condition not met"
val planeAnchor = anchor as? CenterPosePlaneAnchor ?: return println(info)