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 94 of file Systems.h.

Member Function Documentation

◆ Run()

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

Definition at line 96 of file Systems.h.

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

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