本文整理汇总了C++中KeyedArchive::DeleteKey方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyedArchive::DeleteKey方法的具体用法?C++ KeyedArchive::DeleteKey怎么用?C++ KeyedArchive::DeleteKey使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyedArchive
的用法示例。
在下文中一共展示了KeyedArchive::DeleteKey方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConvertLightmapSizeFromProperty
void SceneValidator::ConvertLightmapSizeFromProperty(Entity *ownerNode, InstanceMaterialState *materialState)
{
KeyedArchive * props = ownerNode->GetCustomProperties();
Map<String, VariantType*> map = props->GetArchieveData();
for(Map<String, VariantType*>::iterator it = map.begin(); it != map.end(); it++)
{
String key = it->first;
if(key.find("lightmap.size") != String::npos && ((RenderComponent*)ownerNode->GetComponent(Component::RENDER_COMPONENT))->GetRenderObject()->GetType() != RenderObject::TYPE_LANDSCAPE)
{
materialState->SetLightmapSize(props->GetInt32(key, 128));
props->DeleteKey(key);
break;
}
}
}
示例2: OnCellSelected
void NodesPropertyControl::OnCellSelected(UIList *, UIListCell *selectedCell)
{
if(currentSceneNode)
{
int32 index = selectedCell->GetIndex();
KeyedArchive *customProperties = currentSceneNode->GetCustomProperties();
Map<String, VariantType*> propsData = customProperties->GetArchieveData();
int32 i = 0;
for (Map<String, VariantType*>::iterator it = propsData.begin(); it != propsData.end(); ++it, ++i)
{
if(i == index)
{
customProperties->DeleteKey(it->first);
OnCancel(NULL, NULL, NULL);
ReadFrom(currentSceneNode);
break;
}
}
}
}
示例3: ImportShadowColor
void Scene::ImportShadowColor(Entity * rootNode)
{
if(NULL != sceneGlobalMaterial)
{
Entity * landscapeNode = FindLandscapeEntity(rootNode);
if(NULL != landscapeNode)
{
// try to get shadow color for landscape
KeyedArchive * props = GetCustomPropertiesArchieve(landscapeNode);
if (props->IsKeyExists("ShadowColor"))
{
Color shadowColor = props->GetVariant("ShadowColor")->AsColor();
sceneGlobalMaterial->SetPropertyValue(NMaterial::PARAM_SHADOW_COLOR,
Shader::UT_FLOAT_VEC4,
1,
shadowColor.color);
props->DeleteKey("ShadowColor");
}
}
}
}