mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:53:53 +00:00
added visibility flags
This commit is contained in:
parent
71ce78f949
commit
92d322cbd1
3 changed files with 30 additions and 0 deletions
|
@ -82,6 +82,10 @@ opencs_units_noqt (view/render
|
||||||
lightingbright object cell
|
lightingbright object cell
|
||||||
)
|
)
|
||||||
|
|
||||||
|
opencs_hdrs_noqt (view/render
|
||||||
|
elements
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
opencs_units (view/tools
|
opencs_units (view/tools
|
||||||
reportsubview
|
reportsubview
|
||||||
|
|
23
apps/opencs/view/render/elements.hpp
Normal file
23
apps/opencs/view/render/elements.hpp
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#ifndef CSV_RENDER_ELEMENTS_H
|
||||||
|
#define CSV_RENDER_ELEMENTS_H
|
||||||
|
|
||||||
|
namespace CSVRender
|
||||||
|
{
|
||||||
|
/// Visual elements in a scene
|
||||||
|
enum Elements
|
||||||
|
{
|
||||||
|
// elements that are part of the actual scene
|
||||||
|
Element_Reference = 0x1,
|
||||||
|
Element_Terrain = 0x2,
|
||||||
|
Element_Water = 0x4,
|
||||||
|
Element_Pathgrid = 0x8,
|
||||||
|
Element_Fog = 0x10,
|
||||||
|
|
||||||
|
// control elements
|
||||||
|
Element_CellMarker = 0x10000,
|
||||||
|
Element_CellArrow = 0x20000,
|
||||||
|
Element_CellBorder = 0x40000
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -9,6 +9,8 @@
|
||||||
#include "../../model/world/ref.hpp"
|
#include "../../model/world/ref.hpp"
|
||||||
#include "../../model/world/refidcollection.hpp"
|
#include "../../model/world/refidcollection.hpp"
|
||||||
|
|
||||||
|
#include "elements.hpp"
|
||||||
|
|
||||||
void CSVRender::Object::clearSceneNode (Ogre::SceneNode *node)
|
void CSVRender::Object::clearSceneNode (Ogre::SceneNode *node)
|
||||||
{
|
{
|
||||||
for (Ogre::SceneNode::ObjectIterator iter = node->getAttachedObjectIterator();
|
for (Ogre::SceneNode::ObjectIterator iter = node->getAttachedObjectIterator();
|
||||||
|
@ -63,6 +65,7 @@ void CSVRender::Object::update()
|
||||||
{
|
{
|
||||||
Ogre::Entity* entity = mBase->getCreator()->createEntity (Ogre::SceneManager::PT_CUBE);
|
Ogre::Entity* entity = mBase->getCreator()->createEntity (Ogre::SceneManager::PT_CUBE);
|
||||||
entity->setMaterialName("BaseWhite"); /// \todo adjust material according to error
|
entity->setMaterialName("BaseWhite"); /// \todo adjust material according to error
|
||||||
|
entity->setVisibilityFlags (Element_Reference);
|
||||||
|
|
||||||
mBase->attachObject (entity);
|
mBase->attachObject (entity);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue