本文整理汇总了C++中ogre::SceneManager::createParticleSystem方法的典型用法代码示例。如果您正苦于以下问题:C++ SceneManager::createParticleSystem方法的具体用法?C++ SceneManager::createParticleSystem怎么用?C++ SceneManager::createParticleSystem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ogre::SceneManager
的用法示例。
在下文中一共展示了SceneManager::createParticleSystem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
bool operator()()
{
Ogre::SceneManager* sm = GraphicsManager::get().sceneManager();
Ogre::SceneNode* sceneNode =
positionComponent->sceneNode()->createChildSceneNode(
Ogre::StringConverter::toString(
component->localId()),
offset,
offsetRotation);
Ogre::ParticleSystem* ps = sm->createParticleSystem(
Ogre::StringConverter::toString(component->localId()),
fileName);
sceneNode->attachObject(ps);
component->m_sceneNode = sceneNode;
component->m_particleSystem = ps;
ThreadPool::get().schedule(boost::bind(
&ComponentContainer::componentAttachedCallback,
component->parent(), component));
return true;
}
示例2: createInstanceImpl
void gkOgreParticleObject::createInstanceImpl()
{
gkParticleObject::createInstanceImpl();
GK_ASSERT(!m_psys);
try
{
Ogre::SceneManager* manager = m_scene->getManager();
const gkString& pname = m_particleProps.m_settings;
m_psys = manager->createParticleSystem(getName(), m_particleProps.m_settings);
if (m_psys)
{
m_psys->setUserAny(Ogre::Any(this));
m_node->attachObject(m_psys);
gkOgreParticleResource* resource = gkParticleManager::getSingleton().getByName<gkOgreParticleResource>(
gkResourceName(pname, getGroupName()));
if (resource && resource->isTemplateOwner())
{
m_psys->setRenderer(gkOgreParticleRenderer::NAME);
if (resource->getParticleProperties().m_render == gkParticleSettingsProperties::R_HALO)
m_psys->setMaterialName(gkParticleManager::getSingleton().createOrRetrieveHaloMaterial(m_particleProps.m_material));
else
m_psys->setMaterialName(m_particleProps.m_material);
} //else create by .particle script
}
}
catch (Ogre::Exception& e)
{
gkLogMessage("gkOgreParticleObject: " << e.getDescription());
}
}