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


C++ TCollection_AsciiString::IsIntegerValue方法代码示例

本文整理汇总了C++中TCollection_AsciiString::IsIntegerValue方法的典型用法代码示例。如果您正苦于以下问题:C++ TCollection_AsciiString::IsIntegerValue方法的具体用法?C++ TCollection_AsciiString::IsIntegerValue怎么用?C++ TCollection_AsciiString::IsIntegerValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TCollection_AsciiString的用法示例。


在下文中一共展示了TCollection_AsciiString::IsIntegerValue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Texturize

//////////////////////////////////////////////////////////////////////
// Sample functions
//////////////////////////////////////////////////////////////////////
//================================================================
// Function : TexturesExt_Presentation::Texturize
// display an AIS_TexturedShape based on a given shape with texture with given filename
// filename can also be an integer value ("2", "5", etc.), in this case
// a predefined texture from Graphic3d_NameOfTexture2D with number = this value
// is loaded.
//================================================================
Handle_AIS_TexturedShape TexturesExt_Presentation::Texturize(const TopoDS_Shape& aShape,
                                                        TCollection_AsciiString aTFileName,
                                                        Standard_Real toScaleU,
                                                        Standard_Real toScaleV,
                                                        Standard_Real toRepeatU,
                                                        Standard_Real toRepeatV,
                                                        Standard_Real originU,
                                                        Standard_Real originV)
{
  // create a textured presentation object for aShape
  Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);
  TCollection_AsciiString TFileName;
  // load texture from file if it is not an integer value
  // integer value indicates a number of texture in predefined TexturesExt enumeration
  CString initfile(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir());
  initfile += "\\Data\\";
  if (!aTFileName.IsIntegerValue())
  {
	initfile += aTFileName.ToCString();
  }

  aTShape->SetTextureFileName((Standard_CString)(LPCTSTR)initfile);

  // do other initialization of AIS_TexturedShape
  aTShape->SetTextureMapOn();
  aTShape->SetTextureScale(Standard_True, toScaleU, toScaleV);
  aTShape->SetTextureRepeat(Standard_True, toRepeatU, toRepeatV);
  aTShape->SetTextureOrigin(Standard_True, originU, originV);
  
  aTShape->SetDisplayMode(3); // mode 3 is "textured" mode

  return aTShape;
}
开发者ID:jilott,项目名称:occsamplemfc,代码行数:43,代码来源:TexturesExt_Presentation.cpp

示例2: SetParameter

void  ShHealOper_ShapeProcess::SetParameter(const TCollection_AsciiString& theNameParam,
                                    const TCollection_AsciiString& theVal)
{
  TCollection_AsciiString anameParam(myPrefix);
  anameParam += ".";
  anameParam+= theNameParam;
  if(theVal.IsIntegerValue())
    myOperations.Context()->ResourceManager()->
      SetResource(anameParam.ToCString(),theVal.IntegerValue());
  else if(theVal.IsRealValue())
    myOperations.Context()->ResourceManager()->
      SetResource(anameParam.ToCString(),theVal.RealValue());
  else
    myOperations.Context()->ResourceManager()->
      SetResource(anameParam.ToCString(),theVal.ToCString());

}
开发者ID:triggerfish1,项目名称:pythonocc,代码行数:17,代码来源:ShHealOper_ShapeProcess.cpp


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