Table of Contents

Class MotionInputData

命名空間
easyar

運動輸入數據。 包含、時間戳、相對於世界座標系的變換和跟踪狀態。

MotionInputData

方法

tryCreateSixDof

創建包含旋轉和平移的6DOF變換的數據。rotation為四元數,排列順序為wxyz。

void easyar_MotionInputData_tryCreateSixDof(double timestamp, easyar_Vec3F position, easyar_Vec4F rotation, easyar_MotionTrackingStatus tracking_status, easyar_OptionalOfMotionInputData * Return)
static std::optional<std::shared_ptr<MotionInputData>> tryCreateSixDof(double timestamp, Vec3F position, Vec4F rotation, MotionTrackingStatus tracking_status)
public static @Nullable MotionInputData tryCreateSixDof(double timestamp, @Nonnull Vec3F position, @Nonnull Vec4F rotation, int tracking_status)
companion object fun tryCreateSixDof(timestamp: Double, position: Vec3F, rotation: Vec4F, tracking_status: Int): MotionInputData?
+ (easyar_MotionInputData *)tryCreateSixDof:(double)timestamp position:(easyar_Vec3F *)position rotation:(easyar_Vec4F *)rotation tracking_status:(easyar_MotionTrackingStatus)tracking_status
public static func tryCreateSixDof(_ timestamp: Double, _ position: Vec3F, _ rotation: Vec4F, _ tracking_status: MotionTrackingStatus) -> MotionInputData?
public static Optional<MotionInputData> tryCreateSixDof(double timestamp, Vec3F position, Vec4F rotation, MotionTrackingStatus tracking_status)

參數

名稱 類型 描述
timestamp Double
position Vec3F
rotation Vec4F
tracking_status MotionTrackingStatus

傳回值

類型 描述
Optional<MotionInputData>

tryCreateFiveDofRotXZ

創建包含旋轉和2D平移的5DOF變換的數據。rotation為四元數,排列順序為wxyz。

void easyar_MotionInputData_tryCreateFiveDofRotXZ(double timestamp, easyar_Vec3F position, easyar_Vec4F rotation, easyar_OptionalOfMotionInputData * Return)
static std::optional<std::shared_ptr<MotionInputData>> tryCreateFiveDofRotXZ(double timestamp, Vec3F position, Vec4F rotation)
public static @Nullable MotionInputData tryCreateFiveDofRotXZ(double timestamp, @Nonnull Vec3F position, @Nonnull Vec4F rotation)
companion object fun tryCreateFiveDofRotXZ(timestamp: Double, position: Vec3F, rotation: Vec4F): MotionInputData?
+ (easyar_MotionInputData *)tryCreateFiveDofRotXZ:(double)timestamp position:(easyar_Vec3F *)position rotation:(easyar_Vec4F *)rotation
public static func tryCreateFiveDofRotXZ(_ timestamp: Double, _ position: Vec3F, _ rotation: Vec4F) -> MotionInputData?
public static Optional<MotionInputData> tryCreateFiveDofRotXZ(double timestamp, Vec3F position, Vec4F rotation)

參數

名稱 類型 描述
timestamp Double
position Vec3F
rotation Vec4F

傳回值

類型 描述
Optional<MotionInputData>

tryCreateThreeDofRotOnly

創建僅包含3自由度旋轉變換的數據。rotation為四元數,排列順序為wxyz。

void easyar_MotionInputData_tryCreateThreeDofRotOnly(double timestamp, easyar_Vec4F rotation, easyar_OptionalOfMotionInputData * Return)
static std::optional<std::shared_ptr<MotionInputData>> tryCreateThreeDofRotOnly(double timestamp, Vec4F rotation)
public static @Nullable MotionInputData tryCreateThreeDofRotOnly(double timestamp, @Nonnull Vec4F rotation)
companion object fun tryCreateThreeDofRotOnly(timestamp: Double, rotation: Vec4F): MotionInputData?
+ (easyar_MotionInputData *)tryCreateThreeDofRotOnly:(double)timestamp rotation:(easyar_Vec4F *)rotation
public static func tryCreateThreeDofRotOnly(_ timestamp: Double, _ rotation: Vec4F) -> MotionInputData?
public static Optional<MotionInputData> tryCreateThreeDofRotOnly(double timestamp, Vec4F rotation)

參數

名稱 類型 描述
timestamp Double
rotation Vec4F

傳回值

類型 描述
Optional<MotionInputData>

timestamp

時間戳。單位為秒。

double easyar_MotionInputData_timestamp(const easyar_MotionInputData * This)
double timestamp()
public double timestamp()
fun timestamp(): Double
- (double)timestamp
public func timestamp() -> Double
public virtual double timestamp()

傳回值

類型 描述
Double

transformType

變換類型。

easyar_CameraTransformType easyar_MotionInputData_transformType(const easyar_MotionInputData * This)
CameraTransformType transformType()
public int transformType()
fun transformType(): Int
- (easyar_CameraTransformType)transformType
public func transformType() -> CameraTransformType
public virtual CameraTransformType transformType()

傳回值

類型 描述
CameraTransformType

transform

相對於世界座標系的變換。

easyar_Matrix44F easyar_MotionInputData_transform(const easyar_MotionInputData * This)
Matrix44F transform()
public @Nonnull Matrix44F transform()
fun transform(): Matrix44F
- (easyar_Matrix44F *)transform
public func transform() -> Matrix44F
public virtual Matrix44F transform()

傳回值

類型 描述
Matrix44F

trackingStatus

取得裝置運動追蹤狀態: MotionTrackingStatus 。僅用於6DOF。

easyar_MotionTrackingStatus easyar_MotionInputData_trackingStatus(const easyar_MotionInputData * This)
MotionTrackingStatus trackingStatus()
public int trackingStatus()
fun trackingStatus(): Int
- (easyar_MotionTrackingStatus)trackingStatus
public func trackingStatus() -> MotionTrackingStatus
public virtual MotionTrackingStatus trackingStatus()

傳回值

類型 描述
MotionTrackingStatus