当前位置: 首页>>代码示例>>C++>>正文


C++ Tesselator::getTexCoords方法代码示例

本文整理汇总了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
}
开发者ID:johnzjq,项目名称:mySVN,代码行数:49,代码来源:Interface.cpp


注:本文中的Tesselator::getTexCoords方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。