| 106 | } |
| 107 | |
| 108 | Command::Result cAmbientLight(const Command::ArgumentList_t& args, ConsoleInterface& c, AbstractModeManager&) |
| 109 | { |
| 110 | Ogre::SceneManager* mSceneMgr = RenderManager::getSingletonPtr()->getSceneManager(); |
| 111 | |
| 112 | if (args.size() < 2) |
| 113 | { |
| 114 | // Display the current ambient light values. |
| 115 | Ogre::ColourValue curLight = mSceneMgr->getAmbientLight(); |
| 116 | c.print("Current ambient light is:" + Helper::toString(curLight)); |
| 117 | return Command::Result::SUCCESS; |
| 118 | } |
| 119 | else if(args.size() >= 4) |
| 120 | { |
| 121 | // Set the new color. |
| 122 | Ogre::ColourValue v(Helper::toFloat(args[1]), Helper::toFloat(args[2]), Helper::toFloat(args[3])); |
| 123 | |
| 124 | mSceneMgr->setAmbientLight(v); |
| 125 | c.print("\nAmbient light set to:\n" + |
| 126 | Helper::toString(v)); |
| 127 | } |
| 128 | else |
| 129 | { |
| 130 | c.print("To set a colour value, 3 colour values are needed"); |
| 131 | return Command::Result::INVALID_ARGUMENT; |
| 132 | } |
| 133 | return Command::Result::SUCCESS; |
| 134 | } |
| 135 | |
| 136 | Command::Result cFPS(const Command::ArgumentList_t& args, ConsoleInterface& c, AbstractModeManager&) |
| 137 | { |
nothing calls this directly
no test coverage detected