Пример #1
0
 /// <summary>
 /// Raises the Tango pose available event.
 /// </summary>
 /// <param name="poseData">Pose data.</param>
 public void OnTangoPoseAvailable(Tango.TangoPoseData poseData)
 {
     if (m_enableUXLibrary)
     {
         AndroidHelper.ParseTangoPoseStatus((int)poseData.status_code);
     }
 }
Пример #2
0
        /// <summary>
        /// Sends the pose if available.
        /// </summary>
        /// <returns>The pose status if available.</returns>
        public void SendPoseIfAvailable(bool usingUXLibrary)
        {
            if (m_isDirty)
            {
                if (usingUXLibrary)
                {
                    AndroidHelper.ParseTangoPoseStatus((int)m_latestPoseStatus);
                }

                if (m_onTangoPoseAvailable != null)
                {
                    if (m_motionTrackingData != null)
                    {
                        m_onTangoPoseAvailable(m_motionTrackingData);
                        m_poseDataPool.Push(m_motionTrackingData);
                        m_motionTrackingData = null;
                    }
                    if (m_areaLearningData != null)
                    {
                        m_onTangoPoseAvailable(m_areaLearningData);
                        m_poseDataPool.Push(m_areaLearningData);
                        m_areaLearningData = null;
                    }
                    if (m_relocalizationData != null)
                    {
                        m_onTangoPoseAvailable(m_relocalizationData);
                        m_poseDataPool.Push(m_relocalizationData);
                        m_relocalizationData = null;
                    }
                }

                m_isDirty = false;
            }
        }