//-----------------------------------------------------------------------------------------
bool CSceneManagerEditor::_setSkydomeActive(OgitorsPropertyBase* property, const bool& value)
{
    if(value && mSkyBoxActive->get())
        mSkyBoxActive->set(false);

    if(value && mSkyDomeMaterial->get() == "")
    {
        mSystem->DisplayMessageDialog(OTR("You must first define a SkyDome Material!"), DLGTYPE_OK); 
        return false;
    }

    if(mHandle)
    {
        try
        {
            mHandle->setSkyDome(value ,mSkyDomeMaterial->get());        
            if(value)
            {
                Ogre::SceneNode *node = mHandle->getSkyDomeNode();
                Ogre::SceneNode::ObjectIterator it = node->getAttachedObjectIterator();
                while(it.hasMoreElements())
                {
                    Ogre::MovableObject *object = it.getNext();
                    object->setVisibilityFlags(0x7F000000);
                }
            }
        }
        catch(...)
        {
            mSystem->DisplayMessageDialog(OTR("The Material supplied is not compatible with Sky Dome!"), DLGTYPE_OK); 
            return false;
        }
    }
    return true;
}
示例#2
0
///void setVisibilityFlags(uint32 flags)
void movableobject_set_visibility_flags(MovableObjectHandle handle, unsigned int flags)
{ 
    Ogre::MovableObject* obj = static_cast<Ogre::MovableObject*>(handle);
    obj->setVisibilityFlags(flags);
}