57 return (
unsigned int)(node - m_nodes)+1;
63 return &m_nodes[idx-1];
69 return &m_nodes[idx-1];
74 return sizeof(*this) +
75 sizeof(
dtNode)*m_maxNodes +
115 dtNode* result = m_heap[0];
117 trickleDown(0, m_heap[m_size]);
124 bubbleUp(m_size-1, node);
129 for (
int i = 0; i < m_size; ++i)
131 if (m_heap[i] == node)
139 inline bool empty()
const {
return m_size == 0; }
143 return sizeof(*this) +
144 sizeof(
dtNode*)*(m_capacity+1);
150 void bubbleUp(
int i,
dtNode* node);
151 void trickleDown(
int i,
dtNode* node);
154 const int m_capacity;
159 #endif // DETOURNODE_H
unsigned int dtPolyRef
A handle to a polygon within a navigation mesh tile.
float pos[3]
Position of the node.
unsigned int getNodeIdx(const dtNode *node) const
const dtNode * getNodeAtIdx(unsigned int idx) const
unsigned int flags
Node flags 0/open/closed.
void operator=(dtNodeQueue &)
dtPolyRef id
Polygon ref the node corresponds to.
void operator=(const dtNodePool &)
unsigned int pidx
Index to parent node.
dtNodeIndex getNext(int i) const
dtNode * getNodeAtIdx(unsigned int idx)
static const dtNodeIndex DT_NULL_IDX
dtNodeIndex getFirst(int bucket) const
float cost
Cost from previous node to current node.
void modify(dtNode *node)
float total
Cost up to the node.
unsigned short dtNodeIndex