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


C++ TriMesh::computeSphereUVs方法代码示例

本文整理汇总了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();
}
开发者ID:MSemjon,项目名称:cg1,代码行数:83,代码来源:Texture.cpp


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