本文整理汇总了C++中ParticleSystem::_notifyOrigin方法的典型用法代码示例。如果您正苦于以下问题:C++ ParticleSystem::_notifyOrigin方法的具体用法?C++ ParticleSystem::_notifyOrigin怎么用?C++ ParticleSystem::_notifyOrigin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParticleSystem
的用法示例。
在下文中一共展示了ParticleSystem::_notifyOrigin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parseScript
//-----------------------------------------------------------------------
void ParticleSystemManager::parseScript(DataStreamPtr& stream, const String& groupName)
{
#if OGRE_USE_NEW_COMPILERS == 1
ScriptCompilerManager::getSingleton().parseScript(stream, groupName);
#else // OGRE_USE_NEW_COMPILERS
String line;
ParticleSystem* pSys;
std::vector<String> vecparams;
pSys = 0;
while(!stream->eof())
{
line = stream->getLine();
// Ignore comments & blanks
if (!(line.length() == 0 || line.substr(0,2) == "//"))
{
if (pSys == 0)
{
// No current system
// So first valid data should be a system name
if (StringUtil::startsWith(line, "particle_system "))
{
// chop off the 'particle_system ' needed by new compilers
line = line.substr(16);
}
pSys = createTemplate(line, groupName);
pSys->_notifyOrigin(stream->getName());
// Skip to and over next {
skipToNextOpenBrace(stream);
}
else
{
// Already in a system
if (line == "}")
{
// Finished system
pSys = 0;
}
else if (line.substr(0,7) == "emitter")
{
// new emitter
// Get typename
vecparams = StringUtil::split(line, "\t ");
if (vecparams.size() < 2)
{
// Oops, bad emitter
LogManager::getSingleton().logMessage("Bad particle system emitter line: '"
+ line + "' in " + pSys->getName());
skipToNextCloseBrace(stream);
}
skipToNextOpenBrace(stream);
parseNewEmitter(vecparams[1], stream, pSys);
}
else if (line.substr(0,8) == "affector")
{
// new affector
// Get typename
vecparams = StringUtil::split(line, "\t ");
if (vecparams.size() < 2)
{
// Oops, bad affector
LogManager::getSingleton().logMessage("Bad particle system affector line: '"
+ line + "' in " + pSys->getName());
skipToNextCloseBrace(stream);
}
skipToNextOpenBrace(stream);
parseNewAffector(vecparams[1],stream, pSys);
}
else
{
// Attribute
parseAttrib(line, pSys);
}
}
}
}
#endif // OGRE_USE_NEW_COMPILERS
}