本文整理汇总了C++中TerrainBlock::Tessellate_NonRecursive方法的典型用法代码示例。如果您正苦于以下问题:C++ TerrainBlock::Tessellate_NonRecursive方法的具体用法?C++ TerrainBlock::Tessellate_NonRecursive怎么用?C++ TerrainBlock::Tessellate_NonRecursive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TerrainBlock
的用法示例。
在下文中一共展示了TerrainBlock::Tessellate_NonRecursive方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Tessellate
void TerrainBlock::Tessellate(uint32 *pCountStrips, Terrain * pTerrain)
{
//GeoMipmapCode
if(m_useGeoMipmap)
{
TessellateGeoMipmap(pTerrain);
return;
}
/** define to use depth first transversing*/
#define USE_DEPTH_FIRST_TESSELLATE
#ifdef USE_DEPTH_FIRST_TESSELLATE
// depth first using recursive functions.
if(Tessellate_NonRecursive(pCountStrips, pTerrain))
{
m_pChildren[0]->Tessellate(pCountStrips, pTerrain);
m_pChildren[1]->Tessellate(pCountStrips, pTerrain);
m_pChildren[2]->Tessellate(pCountStrips, pTerrain);
m_pChildren[3]->Tessellate(pCountStrips, pTerrain);
}
#else
queue_TerrainBlockPtr_Type queueBlocks;
queueBlocks.push((TerrainBlock*)this);
/// breadth first transversing the quad tree
while(!queueBlocks.empty())
{
TerrainBlock* pBlock = queueBlocks.front();
queueBlocks.pop();
if(pBlock->Tessellate_NonRecursive(pCountStrips, pTerrain))
{
queueBlocks.push(pBlock->m_pChildren[0]);
queueBlocks.push(pBlock->m_pChildren[1]);
queueBlocks.push(pBlock->m_pChildren[2]);
queueBlocks.push(pBlock->m_pChildren[3]);
}
}
#endif
}