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; }
Crafon
相关分类