static TriTreeNode *AllocateTri(); //TriTreeNode为一个已经定义的结构体
TriTreeNode *Landscape::AllocateTri() //AllocateTri()作用是返回一个指针
{
TriTreeNode *pTri;
if ( m_NextTriNode >= POOL_SIZE )
return NULL;
pTri = &(m_TriPool[m_NextTriNode++]);
pTri->LeftChild = pTri->RightChild = NULL;
return pTri;
}
添加回答
举报
0/150
提交
取消