コード例 #1
0
 public void ShowSemanticColliderByType(SceneUnderstandingObjectType type)
 {
     foreach (GameObject go in semanticList)
     {
         ViveSR_StaticColliderPool pool = go.GetComponent <ViveSR_StaticColliderPool>();
         if (type != SceneUnderstandingObjectType.NONE && pool.GetSemanticType() == type)
         {
             if (pool == null)
             {
                 _WaitForSemanticCldPoolToShow(go);
             }
             else
             {
                 pool.ShowAllColliderWithPropsAndCondition(new uint[] { (uint)ColliderShapeType.MESH_SHAPE });
             }
         }
     }
 }
コード例 #2
0
        public void ShowSemanticColliderByType(SceneUnderstandingObjectType type)
        {
            if (type == SceneUnderstandingObjectType.NONE)
            {
                return;
            }

            foreach (GameObject go in semanticList)
            {
                WaitForSemanticCldPool(go, () => {
                    ViveSR_StaticColliderPool pool = go.GetComponent <ViveSR_StaticColliderPool>();
                    {
                        if (pool.GetSemanticType() == type)
                        {
                            pool.ShowAllColliderWithPropsAndCondition(new uint[] { (uint)ColliderShapeType.MESH_SHAPE });
                        }
                    }
                });
            }
        }
コード例 #3
0
        public GameObject[] GetSemanticObjects(SceneUnderstandingObjectType type)
        {
            List <GameObject> objList = new List <GameObject>();

            if (type != SceneUnderstandingObjectType.NONE)
            {
                foreach (GameObject go in semanticList)
                {
                    ViveSR_StaticColliderPool pool = go.GetComponent <ViveSR_StaticColliderPool>();
                    if (pool == null)
                    {
                        Debug.Log("[SemanticSegmentation] Semantic object is not loaded completely.");
                        break;
                    }
                    if (pool.GetSemanticType() == type)
                    {
                        objList.Add(go);
                    }
                }
            }
            return(objList.ToArray());
        }