本文整理汇总了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;
}
示例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());
}