OpenCOVER
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)
 
bool isLightEnabled (size_t ln) const
 

Static Public Member Functions

static coVRLightinginstance ()
 

Public Attributes

ui::Menu * lightingMenu_ = nullptr
 
ui::Button * switchHeadlight_
 
bool headlightState
 
ui::Button * switchOtherlights_
 
bool otherlightsState
 
ui::Slider * strengthSpecularlight_
 
float specularlightStrength = 0.f
 
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

anonymous enum
Enumerator
MaxNumLights 

Constructor & Destructor Documentation

◆ ~coVRLighting()

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

Member Function Documentation

◆ addLight()

int opencover::coVRLighting::addLight ( osg::LightSource *  ls,
osg::Group *  parent = NULL,
osg::Node *  root = NULL,
const char *  menuName = NULL 
)

◆ config()

void opencover::coVRLighting::config ( )

◆ createLightSource()

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 @retun NULL if section missing and no 'force', pointer to Light otherwise

◆ getShadowLight()

osg::LightSource * opencover::coVRLighting::getShadowLight ( )
inline

◆ init()

void opencover::coVRLighting::init ( )

◆ initLampLight()

void opencover::coVRLighting::initLampLight ( )

◆ initMenu()

void opencover::coVRLighting::initMenu ( )

◆ initOtherLight()

void opencover::coVRLighting::initOtherLight ( )

◆ initSunLight()

void opencover::coVRLighting::initSunLight ( )

◆ instance()

static coVRLighting * opencover::coVRLighting::instance ( )
static

◆ isLightEnabled()

bool opencover::coVRLighting::isLightEnabled ( size_t  ln) const

◆ removeLight()

osg::LightSource * opencover::coVRLighting::removeLight ( osg::LightSource *  ls)

◆ setShadowLight()

void opencover::coVRLighting::setShadowLight ( osg::LightSource *  ls)

◆ switchLight()

osg::LightSource * opencover::coVRLighting::switchLight ( osg::LightSource *  ls,
bool  on,
osg::Node *  limitToBranch = NULL 
)

◆ switchOtherLights()

void opencover::coVRLighting::switchOtherLights ( bool  on)

◆ update()

void opencover::coVRLighting::update ( )

Member Data Documentation

◆ headlight

osg::ref_ptr<osg::LightSource> opencover::coVRLighting::headlight

◆ headlightSpec

osg::Vec4 opencover::coVRLighting::headlightSpec

◆ headlightState

bool opencover::coVRLighting::headlightState

◆ light1

osg::ref_ptr<osg::LightSource> opencover::coVRLighting::light1

◆ light1Spec

osg::Vec4 opencover::coVRLighting::light1Spec

◆ light2

osg::ref_ptr<osg::LightSource> opencover::coVRLighting::light2

◆ light2Spec

osg::Vec4 opencover::coVRLighting::light2Spec

◆ lightingMenu_

ui::Menu* opencover::coVRLighting::lightingMenu_ = nullptr

◆ lightList

vector<Light> opencover::coVRLighting::lightList

◆ m

multimap<string, osg::LightSource *> opencover::coVRLighting::m

◆ otherlightsState

bool opencover::coVRLighting::otherlightsState

◆ shadowlight

osg::ref_ptr<osg::LightSource> opencover::coVRLighting::shadowlight

◆ specularlightStrength

float opencover::coVRLighting::specularlightStrength = 0.f

◆ spotlight

osg::ref_ptr<osg::LightSource> opencover::coVRLighting::spotlight

◆ spotlightSpec

osg::Vec4 opencover::coVRLighting::spotlightSpec

◆ spotlightState

bool opencover::coVRLighting::spotlightState

◆ strengthSpecularlight_

ui::Slider* opencover::coVRLighting::strengthSpecularlight_

◆ switchHeadlight_

ui::Button* opencover::coVRLighting::switchHeadlight_

◆ switchOtherlights_

ui::Button* opencover::coVRLighting::switchOtherlights_

◆ switchSpotlight_

ui::Button* opencover::coVRLighting::switchSpotlight_

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