mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-01 00:36:41 +00:00
fixed visibility flags setting
This commit is contained in:
parent
b0a9d17dc3
commit
a25758c3b1
3 changed files with 21 additions and 0 deletions
|
@ -72,6 +72,7 @@ void CSVRender::Object::update()
|
|||
else
|
||||
{
|
||||
mObject = NifOgre::Loader::createObjects (mBase, "Meshes\\" + model);
|
||||
mObject->setVisibilityFlags (Element_Reference);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,6 +115,24 @@ ObjectScene::~ObjectScene()
|
|||
mSkelBase = NULL;
|
||||
}
|
||||
|
||||
void ObjectScene::setVisibilityFlags (unsigned int flags)
|
||||
{
|
||||
if (mSkelBase)
|
||||
mSkelBase->setVisibilityFlags (flags);
|
||||
|
||||
for (std::vector<Ogre::Entity*>::iterator iter (mEntities.begin()); iter!=mEntities.end();
|
||||
++iter)
|
||||
(*iter)->setVisibilityFlags (flags);
|
||||
|
||||
for (std::vector<Ogre::ParticleSystem*>::iterator iter (mParticles.begin());
|
||||
iter!=mParticles.end(); ++iter)
|
||||
(*iter)->setVisibilityFlags (flags);
|
||||
|
||||
for (std::vector<Ogre::Light*>::iterator iter (mLights.begin()); iter!=mLights.end();
|
||||
++iter)
|
||||
(*iter)->setVisibilityFlags (flags);
|
||||
}
|
||||
|
||||
void ObjectScene::rotateBillboardNodes(Ogre::Camera *camera)
|
||||
{
|
||||
for (std::vector<Ogre::Node*>::iterator it = mBillboardNodes.begin(); it != mBillboardNodes.end(); ++it)
|
||||
|
|
|
@ -82,6 +82,8 @@ struct ObjectScene {
|
|||
|
||||
// Rotate nodes in mBillboardNodes so they face the given camera
|
||||
void rotateBillboardNodes(Ogre::Camera* camera);
|
||||
|
||||
void setVisibilityFlags (unsigned int flags);
|
||||
};
|
||||
|
||||
typedef Ogre::SharedPtr<ObjectScene> ObjectScenePtr;
|
||||
|
|
Loading…
Reference in a new issue