33 #include <OgreSceneManager.h>
34 #include <OgreSceneNode.h>
36 #include <OgreQuaternion.h>
37 #include <OgreManualObject.h>
38 #include <OgreMaterialManager.h>
39 #include <OgreTechnique.h>
46 Ogre::SceneNode* parent_node,
51 const Ogre::ColourValue& color)
52 : scene_manager_(scene_manager)
54 , cell_count_(cell_count)
55 , cell_length_(cell_length)
56 , line_width_(line_width)
60 static uint32_t gridCount = 0;
62 ss <<
"Grid" << gridCount++;
77 material_ = Ogre::MaterialManager::getSingleton().create(
78 ss.str(), Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME);
80 material_->getTechnique(0)->setLightingEnabled(
false);
91 Ogre::MaterialManager::getSingleton().remove(
material_->getName());
121 material_->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
126 material_->setSceneBlending(Ogre::SBT_REPLACE);
169 for (uint32_t h = 0; h <=
height_; ++h)
176 Ogre::Vector3 p1(inc, h_real, -extent);
177 Ogre::Vector3 p2(inc, h_real, extent);
178 Ogre::Vector3 p3(-extent, h_real, inc);
179 Ogre::Vector3 p4(extent, h_real, inc);
183 if (h != 0 || i != 0)
221 float y_bottom = -y_top;