fixed visibility flags setting

deque
Marc Zinnschlag 11 years ago
parent b0a9d17dc3
commit a25758c3b1

@ -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…
Cancel
Save