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 }); } } } }
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 }); } } }); } }
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()); }