public OctProjectorMesh() { m_VertexList = new List <Vector3>(); m_Indexes = new List <int>(); m_UVList = new List <Vector2>(); m_Mesh = new Mesh(); m_Mesh.MarkDynamic(); m_Lock = new object(); m_Handle = OcTreeTriggerHandle; }
public void Trigger(ITrigger trigger, OctProjectorMesh mesh, MeshOcTreeTriggerHandle handle) { if (handle == null) { return; } if (m_NodeLists != null && m_NodeLists.Count > 0) { m_NodeLists[0].Trigger(trigger, mesh, m_NodeLists, handle); } }
public void Trigger(ITrigger trigger, OctProjectorMesh mesh, List <MeshOcTreeNode> nodeList, MeshOcTreeTriggerHandle handle) { if (handle == null) { return; } for (int i = 0; i < m_ChildNodes.Length; i++) { if (m_ChildNodes[i] > 0) { nodeList[m_ChildNodes[i]].Trigger(trigger, mesh, nodeList, handle); } } if (trigger.IsDetected(this.bounds)) { for (int i = 0; i < m_ItemList.Count; i++) { if (trigger.IsDetected(m_ItemList[i].bounds)) { handle(mesh, m_ItemList[i]); } } } }