本文整理汇总了C++中KString::Buffer方法的典型用法代码示例。如果您正苦于以下问题:C++ KString::Buffer方法的具体用法?C++ KString::Buffer怎么用?C++ KString::Buffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KString
的用法示例。
在下文中一共展示了KString::Buffer方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitializeSdkObjects
void InitializeSdkObjects(KFbxSdkManager*& pSdkManager, KFbxScene*& pScene)
{
// The first thing to do is to create the FBX SDK manager which is the
// object allocator for almost all the classes in the SDK.
pSdkManager = KFbxSdkManager::Create();
if (!pSdkManager)
{
printf("Unable to create the FBX SDK manager\n");
exit(0);
}
// create an IOSettings object
KFbxIOSettings * ios = KFbxIOSettings::Create(pSdkManager, IOSROOT );
pSdkManager->SetIOSettings(ios);
// Load plugins from the executable directory
KString lPath = KFbxGetApplicationDirectory();
#if defined(KARCH_ENV_WIN)
KString lExtension = "dll";
#elif defined(KARCH_ENV_MACOSX)
KString lExtension = "dylib";
#elif defined(KARCH_ENV_LINUX)
KString lExtension = "so";
#endif
pSdkManager->LoadPluginsDirectory(lPath.Buffer(), lExtension.Buffer());
// Create the entity that will hold the scene.
pScene = KFbxScene::Create(pSdkManager,"");
}
示例2: PrintAttribute
/**
* Print an attribute.
*/
void PrintAttribute(FbxNodeAttribute* pAttribute) {
if(!pAttribute) return;
KString typeName = GetAttributeTypeName(pAttribute->GetAttributeType());
KString attrName = pAttribute->GetName();
PrintTabs();
// Note: to retrieve the chararcter array of a KString, use its Buffer() method.
printf("<attribute type='%s' name='%s'/>\n", typeName.Buffer(), attrName.Buffer());
}
示例3: printAttribute
// Print an attribute
void FBXParser::printAttribute(KFbxNodeAttribute const & pAttribute) const{
if(!&pAttribute){ return; }
KString typeName = getAttributeTypeName(pAttribute.GetAttributeType());
KString attrName = pAttribute.GetName();
printTabs();
cout << "<attribute type= " << typeName.Buffer() << " name= " << attrName.Buffer();
cout << "/>" << endl;
}
示例4: DisplayDouble
void DisplayDouble(const char* pHeader, double pValue, const char* pSuffix /* = "" */)
{
KString lString;
KString lFloatValue = (float) pValue;
lFloatValue = pValue <= -HUGE_VAL ? "-INFINITY" : lFloatValue.Buffer();
lFloatValue = pValue >= HUGE_VAL ? "INFINITY" : lFloatValue.Buffer();
lString = pHeader;
lString += lFloatValue;
lString += pSuffix;
lString += "\n";
printf(lString);
}