| 236 | } |
| 237 | |
| 238 | Ogre::Light* RenderManager::addPointLightMenu(const std::string& name, const Ogre::Vector3& pos, |
| 239 | const Ogre::ColourValue& diffuse, const Ogre::ColourValue& specular, Ogre::Real attenuationRange, |
| 240 | Ogre::Real attenuationConstant, Ogre::Real attenuationLinear, Ogre::Real attenuationQuadratic) |
| 241 | { |
| 242 | if(mSceneManager->hasLight(name)) |
| 243 | { |
| 244 | OD_LOG_ERR("There is already a light=" + name); |
| 245 | return nullptr; |
| 246 | } |
| 247 | |
| 248 | Ogre::Light* light = mSceneManager->createLight(name); |
| 249 | light->setType(Ogre::Light::LT_POINT); |
| 250 | light->setDiffuseColour(diffuse); |
| 251 | light->setSpecularColour(specular); |
| 252 | light->setAttenuation(attenuationRange, attenuationConstant, attenuationLinear, attenuationQuadratic); |
| 253 | return light; |
| 254 | } |
| 255 | |
| 256 | void RenderManager::removePointLightMenu(Ogre::Light* light) |
| 257 | { |