OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
lightutil.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_COMPONENTS_LIGHTUTIL_H
2 #define OPENMW_COMPONENTS_LIGHTUTIL_H
3 
4 #include <osg/ref_ptr>
5 #include <osg/Vec4f>
6 
7 namespace osg
8 {
9  class Group;
10 }
11 
12 namespace ESM
13 {
14  struct Light;
15 }
16 
17 namespace SceneUtil
18 {
19  class LightSource;
20 
30  void addLight (osg::Group* node, const ESM::Light* esmLight, unsigned int partsysMask, unsigned int lightMask, bool isExterior, bool outQuadInLin, bool useQuadratic,
31  float quadraticValue, float quadraticRadiusMult, bool useLinear, float linearRadiusMult,
32  float linearValue);
33 
40  osg::ref_ptr<LightSource> createLightSource (const ESM::Light* esmLight, unsigned int lightMask, bool isExterior, bool outQuadInLin, bool useQuadratic,
41  float quadraticValue, float quadraticRadiusMult, bool useLinear, float linearRadiusMult, float linearValue, const osg::Vec4f& ambient=osg::Vec4f(0,0,0,1));
42 
43 }
44 
45 #endif
osg::ref_ptr< LightSource > createLightSource(const ESM::Light *esmLight, unsigned int lightMask, bool isExterior, bool outQuadInLin, bool useQuadratic, float quadraticValue, float quadraticRadiusMult, bool useLinear, float linearRadiusMult, float linearValue, const osg::Vec4f &ambient)
Convert an ESM::Light to a SceneUtil::LightSource, and return it.
Definition: lightutil.cpp:75
void addLight(osg::Group *node, const ESM::Light *esmLight, unsigned int partsysMask, unsigned int lightMask, bool isExterior, bool outQuadInLin, bool useQuadratic, float quadraticValue, float quadraticRadiusMult, bool useLinear, float linearRadiusMult, float linearValue)
Convert an ESM::Light to a SceneUtil::LightSource, and add it to a sub graph.
Definition: lightutil.cpp:41
Definition: loadligh.hpp:17