标签:
// perform very basic sanity-check validation on a heightfield.
bool validateHeightField(osg::HeightField* hf)
{
if (!hf)
return false;
if (hf->getNumRows() < 2 || hf->getNumRows() > 1024)
return false;
if (hf->getNumColumns() < 2 || hf->getNumColumns() > 1024)
return false;
if (hf->getHeightList().size() != hf->getNumColumns() * hf->getNumRows())
return false;
if (hf->getXInterval() < 1e-5 || hf->getYInterval() < 1e-5)
return false;
return true;
}
osg三维重建的两种方法剖析:三角面片(osgUtil::DelaunayTriangulator)和四角面片(osg::HeightField) (2)
标签:
原文地址:http://www.cnblogs.com/blogofwu/p/5108682.html