本文整理汇总了C++中Tesselator::getTexCoords方法的典型用法代码示例。如果您正苦于以下问题:C++ Tesselator::getTexCoords方法的具体用法?C++ Tesselator::getTexCoords怎么用?C++ Tesselator::getTexCoords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tesselator
的用法示例。
在下文中一共展示了Tesselator::getTexCoords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Output
void Output(double* OutputCoords[3], int* OutputIndices[3])
{
if (tess.getIndices().size() == 0 ||OutputIndices == NULL || OutputIndices == NULL)
{
return;
}
std::vector<TVec3d>::iterator itr = tess.getVertices().begin();
for (int i = 0;itr != tess.getVertices().end(); itr++, i++)
{
OutputCoords[i][0] = itr->x;
OutputCoords[i][1] = itr->y;
OutputCoords[i][2] = itr->z;
#ifdef _DEBUG
//test
std::cout<<OutputCoords[i][0]<<OutputCoords[i][1]<<OutputCoords[i][2]<<std::endl;
#endif
}
#ifdef _DEBUG
//test
std::cout<<"good5"<<std::endl;
#endif
std::vector<unsigned int>::iterator itr2 = tess.getIndices().begin();
for (int i = 0; itr2 != tess.getIndices().end(); itr2 += 3, i++)
{
OutputIndices[i][0] = *itr2;
OutputIndices[i][1] = *(itr2 + 1);
OutputIndices[i][2] = *(itr2 + 2);
#ifdef _DEBUG
//test
std::cout<<OutputIndices[i][0]<<OutputIndices[i][1]<<OutputIndices[i][2]<<std::endl;
#endif
}
//very important
tess.getIndices().clear();
tess.getVertices().clear();
tess.getTexCoords().clear();
std::vector<Vec3*>::iterator itr3 = IntRingCoords.begin();
for (;itr3 != IntRingCoords.end(); itr3++)
{
delete *itr3;
*itr3 = NULL;
}
IntRingCoords.clear();
IntRingCoordsNum.clear();
#ifdef _DEBUG
//test
std::cout<<"good6"<<std::endl;
#endif
}