本文整理汇总了C++中TriMesh::computeSphereUVs方法的典型用法代码示例。如果您正苦于以下问题:C++ TriMesh::computeSphereUVs方法的具体用法?C++ TriMesh::computeSphereUVs怎么用?C++ TriMesh::computeSphereUVs使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TriMesh
的用法示例。
在下文中一共展示了TriMesh::computeSphereUVs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: menu
// menu callback
// XXX: NEEDS TO BE IMPLEMENTED
void World::menu(int value){
switch(value){
case 24:
reset();
break;
case 1:
// load rectangle
mesh.loadOff(models[value]);
drawRect= true;
break;
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
mesh.correctTexture(textureCorrection);
if(models[value] == "data/bunny2.off" || models[value] == "data/cow.off" || models[value] == "data/cone.off"){ mesh.setWinding(TriMesh::CCW); }
else mesh.setWinding(TriMesh::CW);
mesh.loadOff(models[value]);
mesh.center();
mesh.unitize();
mesh.computeNormals();
mesh.computeSphereUVs();
drawRect= false;
drawMesh= true;
break;
case 14:
drawMesh= false;
break;
case 15:
lighting= !lighting;
break;
case 16:
showTexture= !showTexture;
break;
case 17:
showCoordinates= !showCoordinates;
break;
case 18:
showOrigin= !showOrigin;
break;
case 19:
textureCorrection= !textureCorrection;
// enable/disable texture correction in Image (not obligatory, but useful for debugging)
textureCorrection= !textureCorrection;
mesh.correctTexture(textureCorrection);
mesh.reload();
mesh.center();
mesh.unitize();
mesh.computeNormals();
mesh.computeSphereUVs();
break;
case 20:
// set texture wrapping in Image (not obligatory, but useful for debugging)
if(wrap==GL_REPEAT) wrap= GL_CLAMP_TO_BORDER;
else wrap= GL_REPEAT;
texture.setWrap(wrap);
break;
break;
case 21:
environmentMapping= !environmentMapping;
if(!environmentMapping) moveEnvironment= false;
break;
case 22:
reset();
moveEnvironment= !moveEnvironment;
break;
default:
break;
}
Context::displayWorldWindow();
}