本文整理汇总了C++中RendererPtr::GetRoot方法的典型用法代码示例。如果您正苦于以下问题:C++ RendererPtr::GetRoot方法的具体用法?C++ RendererPtr::GetRoot怎么用?C++ RendererPtr::GetRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RendererPtr
的用法示例。
在下文中一共展示了RendererPtr::GetRoot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitCaelum
void EC_OgreEnvironment::InitCaelum()
{
using namespace Caelum;
if (renderer_.expired())
return;
RendererPtr renderer = renderer_.lock();
caelumComponents_ = CaelumSystem::CAELUM_COMPONENTS_NONE;
caelumComponents_ = caelumComponents_ |
CaelumSystem::CAELUM_COMPONENT_SKY_DOME |
CaelumSystem::CAELUM_COMPONENT_MOON |
CaelumSystem::CAELUM_COMPONENT_SUN |
CaelumSystem::CAELUM_COMPONENT_POINT_STARFIELD |
CaelumSystem::CAELUM_COMPONENT_SCREEN_SPACE_FOG |
CaelumSystem::CAELUM_COMPONENT_GROUND_FOG;
// Caelum clouds are hidden, otherwise shadows get messed up.
caelumSystem_ = new CaelumSystem(renderer->GetRoot().get(),
renderer->GetSceneManager(), (CaelumSystem::CaelumComponent)caelumComponents_);
// Flip the Caelum camera and ground node orientations 90 degrees.
Ogre::Quaternion orientation(Ogre::Degree(90), Ogre::Vector3(1, 0, 0));
caelumSystem_->getCaelumCameraNode()->setOrientation(orientation);
caelumSystem_->getCaelumGroundNode()->setOrientation(orientation);
// We want to manage the fog ourself.
caelumSystem_->setManageSceneFog(false);
// Use just one light (the brightest one) at a time.
caelumSystem_->setEnsureSingleLightSource(true);
caelumSystem_->setEnsureSingleShadowSource(true);
caelumSystem_->getMoon()->setDiffuseMultiplier(Ogre::ColourValue(0.25f, 0.25f, 0.25f));
}