OpendTect-6_4  6.4
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
visBase::Light Class Reference

Class for all lights. More options are available in osg, but only what we currently need is implemented. More...

Inheritance diagram for visBase::Light:
[legend]

Public Member Functions

 Light ()
 
void setLightNum (int)
 
int getLightNum () const
 
void turnOn (bool n)
 
bool isOn () const
 
void setAmbient (float)
 
float getAmbient () const
 
void setDiffuse (float)
 
float getDiffuse () const
 
void setDirection (float x, float y, float z)
 
float direction (int dim) const
 
void fillPar (IOPar &) const
 
bool usePar (const IOPar &)
 
- Public Member Functions inherited from visBase::NodeState
void attachStateSet (osg::StateSet *)
 
void detachStateSet (osg::StateSet *)
 
virtual void setPixelDensity (float)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Protected Member Functions

 ~Light ()
 
void updateLights ()
 
void initLight ()
 
- Protected Member Functions inherited from visBase::NodeState
 NodeState ()
 
template<class T >
T * addAttribute (T *a)
 
template<class T >
void removeAttribute (T *a)
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Static Protected Member Functions

static const char * sKeyIsOn ()
 
static const char * sKeyAmbient ()
 
static const char * sKeyDiffuse ()
 
static const char * sKeyLightNum ()
 
static const char * sKeyDirection ()
 

Protected Attributes

bool ison_
 
float ambient_
 
float diffuse_
 
osg::Light * light_
 

Private Member Functions

void applyAttribute (osg::StateSet *, osg::StateAttribute *)
 

Detailed Description

Class for all lights. More options are available in osg, but only what we currently need is implemented.

Constructor & Destructor Documentation

visBase::Light::Light ( )
visBase::Light::~Light ( )
protected

Member Function Documentation

void visBase::Light::applyAttribute ( osg::StateSet *  ,
osg::StateAttribute *   
)
privatevirtual

Reimplemented from visBase::NodeState.

float visBase::Light::direction ( int  dim) const

the direction is specified towards light source

void visBase::Light::fillPar ( IOPar ) const
float visBase::Light::getAmbient ( ) const
float visBase::Light::getDiffuse ( ) const
int visBase::Light::getLightNum ( ) const
void visBase::Light::initLight ( )
protected
bool visBase::Light::isOn ( ) const
inline
void visBase::Light::setAmbient ( float  )

0 = nada, 1 = full light

void visBase::Light::setDiffuse ( float  )

0 = nada, 1 = full light

void visBase::Light::setDirection ( float  x,
float  y,
float  z 
)

the direction is specified towards light source

void visBase::Light::setLightNum ( int  )
static const char* visBase::Light::sKeyAmbient ( )
staticprotected
static const char* visBase::Light::sKeyDiffuse ( )
staticprotected
static const char* visBase::Light::sKeyDirection ( )
staticprotected
static const char* visBase::Light::sKeyIsOn ( )
staticprotected
static const char* visBase::Light::sKeyLightNum ( )
staticprotected
void visBase::Light::turnOn ( bool  n)
inline
void visBase::Light::updateLights ( )
protected
bool visBase::Light::usePar ( const IOPar )

Member Data Documentation

float visBase::Light::ambient_
protected
float visBase::Light::diffuse_
protected
bool visBase::Light::ison_
protected
osg::Light* visBase::Light::light_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019