MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / addPointLightMenu

Method addPointLightMenu

source/render/RenderManager.cpp:238–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238Ogre::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
256void RenderManager::removePointLightMenu(Ogre::Light* light)
257{

Callers 1

activateMethod · 0.80

Calls 1

setTypeMethod · 0.80

Tested by

no test coverage detected