Leviathan  0.8.0.0
Leviathan game engine
Leviathan::RenderNodePropertiesSystem Class Reference

Handles properties of Ogre nodes that have a changed RenderNode. More...

#include <Systems.h>

Public Member Functions

void Run (GameWorld &world, std::unordered_map< ObjectID, RenderNode *> &index)
 

Detailed Description

Handles properties of Ogre nodes that have a changed RenderNode.

Definition at line 91 of file Systems.h.

Member Function Documentation

◆ Run()

void Leviathan::RenderNodePropertiesSystem::Run ( GameWorld world,
std::unordered_map< ObjectID, RenderNode *> &  index 
)
inline

Definition at line 93 of file Systems.h.

94  {
95  for(auto iter = index.begin(); iter != index.end(); ++iter) {
96 
97  auto& node = *iter->second;
98 
99  if(!node.Marked)
100  continue;
101 
102  // TODO: would it be faster to first check have these
103  // changed or is it better to just set them as Ogre might
104  // also check have the value changed
105  node.Node->setVisible(!node.Hidden);
106  node.Node->setScale(node.Scale);
107 
108  node.Marked = false;
109  }
110  }

The documentation for this class was generated from the following file: