public void dtcsClearFlag(DetourNode.dtNodeFlags flag) { unchecked { flags &= (byte)(~flag); } }
public dtNode findNode(dtPolyRef id) { uint bucket = (uint)(DetourNode.dtHashRef(id) & (m_hashSize - 1)); dtNodeIndex i = m_first[bucket]; while (i != DetourNode.DT_NULL_IDX) { if (m_nodes[i].id == id) { return(m_nodes[i]); } i = m_next[i]; } return(null); }
public List <dtNode> findNodes(dtPolyRef id, int maxNodes) { List <dtNode> ret = new List <dtNode>(); uint bucket = (uint)(DetourNode.dtHashRef(id) & (m_hashSize - 1)); dtNodeIndex i = m_first[bucket]; while (i != DetourNode.DT_NULL_IDX) { if (m_nodes[i].id == id) { if (ret.Count >= maxNodes) { return(ret); } ret.Add(m_nodes[i]); } i = m_next[i]; } return(ret); }
public dtNode getNode(dtPolyRef id, uint state) { uint bucket = (uint)(DetourNode.dtHashRef(id) & (m_hashSize - 1)); dtNodeIndex i = m_first[bucket]; dtNode node = null; while (i != DetourNode.DT_NULL_IDX) { if (m_nodes[i].id == id && m_nodes[i].state == state) { return(m_nodes[i]); } i = m_next[i]; } if (m_nodeCount >= m_maxNodes) { return(null); } i = (dtNodeIndex)m_nodeCount; m_nodeCount++; node = m_nodes[i]; node.pidx = 0; node.cost = 0; node.total = 0; node.id = id; node.state = state; node.flags = 0; m_next[i] = m_first[bucket]; m_first[bucket] = i; return(node); }
public bool dtcsTestFlag(DetourNode.dtNodeFlags flag) { return (flags & (byte)flag) != 0; }
public void dtcsSetFlag(DetourNode.dtNodeFlags flag) { flags |= (byte)flag; }