本文整理汇总了C++中PropertyList::GetInt方法的典型用法代码示例。如果您正苦于以下问题:C++ PropertyList::GetInt方法的具体用法?C++ PropertyList::GetInt怎么用?C++ PropertyList::GetInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropertyList
的用法示例。
在下文中一共展示了PropertyList::GetInt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: make_pair
pair<IParticleGroup*,IRenderNode*> ParticleGroupBuilder::BuildGroup(PropertyList& plist, string group) {
string type = plist.GetString(group + ".type");
if (type == "glow") {
Emitter<ParticleTypeGlow >* emitter = BuildEmitter<ParticleTypeGlow >(plist, group);
EnergyParticleGroup<ParticleTypeGlow > *particleGroup = new EnergyParticleGroup<ParticleTypeGlow >(plist.GetInt(group + ".count"), emitter);
// modifiers
for (int i=0; i < plist.ListSize(group + ".modifiers"); i++ ) {
string name = plist.GetString(group + ".modifiers", i);
logger.info << "Adding modifier: " << name << logger.end;
IModifier<ParticleTypeGlow >* mof = BuildModifier<ParticleTypeGlow >(plist, group + "." + name);
if (mof != NULL)
particleGroup->AddModifier(mof);
}
plist.SetIntP(&(particleGroup->totalCount), group + ".count");
plist.SetBoolP(&(particleGroup->active), group + ".active");
int *m = (int*)&(particleGroup->mode);
plist.SetIntP(m, group + ".mode");
// TwEnumVal modeEV[] = {{EnergyParticleGroup::CONTINUOUS, "Continuous"},
// {EnergyParticleGroup::ALL, "All"},
// {EnergyParticleGroup::NONE, "None"}};
// TwType modeType = TwDefineEnum("RespawnMode", modeEV, 3);
return make_pair(particleGroup,BuildRenderNode<ParticleTypeGlow,EnergyParticleGroup<ParticleTypeGlow> >(plist, group, particleGroup));
} else {
logger.info << "Unknown type: " << type << logger.end;
}
return make_pair<IParticleGroup*,IRenderNode*>(NULL,NULL);
}