예제 #1
0
        public MotionTrackingManager()
        {
            ApiCoordinateFramePair[] framePairs = new ApiCoordinateFramePair[]
            {
                new ApiCoordinateFramePair()
                {
                    baseFrame   = ApiCoordinateFrameType.AreaDescription,
                    targetFrame = ApiCoordinateFrameType.StartOfService,
                }
            };

            TangoClientApi.ConnectOnPoseAvailable(framePairs, m_poseQueue, m_poseQueueLock);
        }
예제 #2
0
 /// <summary>
 /// Constructs an ApiPoseData equivalent to a unity PoseData.
 /// </summary>
 public ApiPoseData(UnityTango.PoseData unityPoseData)
 {
     // TODO (mtsmall): Tell unity version and accuracy should be uint.
     version     = (int)unityPoseData.version;
     timestamp   = unityPoseData.timestamp;
     orientation = new DVector4(unityPoseData.orientation_x, unityPoseData.orientation_y,
                                unityPoseData.orientation_z, unityPoseData.orientation_w);
     translation = new DVector3(unityPoseData.orientation_x, unityPoseData.orientation_y,
                                unityPoseData.orientation_z);
     statusCode = unityPoseData.statusCode.ToApiType();
     framePair  = new ApiCoordinateFramePair(unityPoseData.frame);
     confidence = (int)unityPoseData.confidence;
     accuracy   = unityPoseData.accuracy;
 }