OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
opencover::coVRLighting Class Reference

#include <coVRLighting.h>

Classes

struct  Light
 
struct  LightDef
 
struct  RGB
 
struct  SpotDef
 
struct  XYZW
 

Public Types

enum  { MaxNumLights = 8 }
 

Public Member Functions

osg::LightSource * createLightSource (const char *configName, const LightDef &defValue, bool force)
 
void initSunLight ()
 
void initLampLight ()
 
void initOtherLight ()
 
void initMenu ()
 
void config ()
 
void init ()
 
virtual ~coVRLighting ()
 
void update ()
 
int addLight (osg::LightSource *ls, osg::Group *parent=NULL, osg::Node *root=NULL, const char *menuName=NULL)
 
osg::LightSource * removeLight (osg::LightSource *ls)
 
osg::LightSource * switchLight (osg::LightSource *ls, bool on, osg::Node *limitToBranch=NULL)
 
void switchOtherLights (bool on)
 
osg::LightSource * getShadowLight ()
 
void setShadowLight (osg::LightSource *ls)
 

Static Public Member Functions

static coVRLightinginstance ()
 

Public Attributes

ui::Menu * lightingMenu_ = nullptr
 
ui::Button * switchHeadlight_
 
bool headlightState
 
ui::Button * switchOtherlights_
 
bool otherlightsState
 
ui::Button * switchSpecularlight_
 
bool specularlightState
 
ui::Button * switchSpotlight_
 
bool spotlightState
 
multimap< string,
osg::LightSource * > 
m
 
osg::ref_ptr< osg::LightSource > light1
 
osg::ref_ptr< osg::LightSource > light2
 
osg::Vec4 headlightSpec
 
osg::Vec4 light1Spec
 
osg::Vec4 light2Spec
 
osg::Vec4 spotlightSpec
 
vector< LightlightList
 
osg::ref_ptr< osg::LightSource > headlight
 
osg::ref_ptr< osg::LightSource > spotlight
 
osg::ref_ptr< osg::LightSource > shadowlight
 

Member Enumeration Documentation

anonymous enum
Enumerator
MaxNumLights 

Constructor & Destructor Documentation

virtual opencover::coVRLighting::~coVRLighting ( )
virtual

Member Function Documentation

int opencover::coVRLighting::addLight ( osg::LightSource *  ls,
osg::Group *  parent = NULL,
osg::Node *  root = NULL,
const char *  menuName = NULL 
)
void opencover::coVRLighting::config ( )
osg::LightSource* opencover::coVRLighting::createLightSource ( const char *  configName,
const LightDef defValue,
bool  force 
)

Create a light source

Parameters
configNameLook for Cover<configName> section in covise.config
defValueDefault values
forceCreate even when no values in covise.config NULL if section missing and no 'force', pointer to Light otherwise
osg::LightSource* opencover::coVRLighting::getShadowLight ( )
inline
void opencover::coVRLighting::init ( )
void opencover::coVRLighting::initLampLight ( )
void opencover::coVRLighting::initMenu ( )
void opencover::coVRLighting::initOtherLight ( )
void opencover::coVRLighting::initSunLight ( )
static coVRLighting* opencover::coVRLighting::instance ( )
static
osg::LightSource* opencover::coVRLighting::removeLight ( osg::LightSource *  ls)
void opencover::coVRLighting::setShadowLight ( osg::LightSource *  ls)
osg::LightSource* opencover::coVRLighting::switchLight ( osg::LightSource *  ls,
bool  on,
osg::Node *  limitToBranch = NULL 
)
void opencover::coVRLighting::switchOtherLights ( bool  on)
void opencover::coVRLighting::update ( )

Member Data Documentation

osg::ref_ptr<osg::LightSource> opencover::coVRLighting::headlight
osg::Vec4 opencover::coVRLighting::headlightSpec
bool opencover::coVRLighting::headlightState
osg::ref_ptr<osg::LightSource> opencover::coVRLighting::light1
osg::Vec4 opencover::coVRLighting::light1Spec
osg::ref_ptr<osg::LightSource> opencover::coVRLighting::light2
osg::Vec4 opencover::coVRLighting::light2Spec
ui::Menu* opencover::coVRLighting::lightingMenu_ = nullptr
vector<Light> opencover::coVRLighting::lightList
multimap<string, osg::LightSource *> opencover::coVRLighting::m
bool opencover::coVRLighting::otherlightsState
osg::ref_ptr<osg::LightSource> opencover::coVRLighting::shadowlight
bool opencover::coVRLighting::specularlightState
osg::ref_ptr<osg::LightSource> opencover::coVRLighting::spotlight
osg::Vec4 opencover::coVRLighting::spotlightSpec
bool opencover::coVRLighting::spotlightState
ui::Button* opencover::coVRLighting::switchHeadlight_
ui::Button* opencover::coVRLighting::switchOtherlights_
ui::Button* opencover::coVRLighting::switchSpecularlight_
ui::Button* opencover::coVRLighting::switchSpotlight_

The documentation for this class was generated from the following file: