本文整理汇总了C++中NzString::IsNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ NzString::IsNumber方法的具体用法?C++ NzString::IsNumber怎么用?C++ NzString::IsNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NzString
的用法示例。
在下文中一共展示了NzString::IsNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Parse
//.........这里部分代码省略.........
m_mtlLib = m_currentLine.SubString(m_currentLine.GetWordPosition(1));
break;
case 'g':
case 'o':
{
if (m_currentLine.GetSize() <= 2 || m_currentLine[1] != ' ')
{
#if NAZARA_UTILITY_STRICT_RESOURCE_PARSING
UnrecognizedLine();
#endif
break;
}
NzString objectName = m_currentLine.SubString(m_currentLine.GetWordPosition(1));
if (objectName.IsEmpty())
{
#if NAZARA_UTILITY_STRICT_RESOURCE_PARSING
UnrecognizedLine();
#endif
break;
}
meshName = objectName;
currentMesh = &meshes[meshName][matName];
break;
}
#if NAZARA_UTILITY_STRICT_RESOURCE_PARSING
case 's':
if (m_currentLine.GetSize() <= 2 || m_currentLine[1] == ' ')
{
NzString param = m_currentLine.SubString(2);
if (param != "all" && param != "on" && param != "off" && !param.IsNumber())
UnrecognizedLine();
}
else
UnrecognizedLine();
break;
#endif
case 'u':
#if NAZARA_UTILITY_STRICT_RESOURCE_PARSING
if (m_currentLine.GetWord(0) != "usemtl")
UnrecognizedLine();
#endif
matName = m_currentLine.SubString(m_currentLine.GetWordPosition(1));
if (matName.IsEmpty())
{
#if NAZARA_UTILITY_STRICT_RESOURCE_PARSING
UnrecognizedLine();
#endif
break;
}
currentMesh = &meshes[meshName][matName];
break;
case 'v':
{
NzString word = m_currentLine.GetWord(0).ToLower();
if (word == 'v')
{
NzVector4f vertex(NzVector3f::Zero(), 1.f);
unsigned int paramCount = std::sscanf(&m_currentLine[2], "%f %f %f %f", &vertex.x, &vertex.y, &vertex.z, &vertex.w);