OpendTect 8.0
Loading...
Searching...
No Matches
Public Member Functions | Static 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...

#include <vislight.h>

Inheritance diagram for visBase::Light:
[legend]

Public Member Functions

float direction (int dim) const
 
void fillPar (IOPar &) const
 
float getAmbient () const
 
float getDiffuse () const
 
int getLightNum () const
 
bool isOn () const
 
void setAmbient (float)
 
void setDiffuse (float)
 
void setDirection (float x, float y, float z)
 
void setLightNum (int)
 
void turnOn (bool n)
 
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 SharedObject
 SharedObject (const char *nm=nullptr)
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=nullptr)
 
 NamedCallBacker (const NamedCallBacker &)=delete
 
 ~NamedCallBacker ()
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
NamedCallBackeroperator= (const NamedCallBacker &)=delete
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object.
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use.
 
CallBackeroperator= (const CallBacker &)=delete
 
void stopReceivingNotifications () const
 
virtual CallBackertrueCaller ()
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
virtual BufferString getName () const
 
bool getNameFromPar (const IOPar &)
 
const name_typename () const override
 
NamedObjectoperator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
virtual void setName (const char *nm)
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 
- Public Member Functions inherited from RefCount::Referenced
void addObserver (WeakPtrBase *obs)
 Not for normal use. May become private.
 
int nrRefs () const
 Only for expert use.
 
void ref () const
 
bool refIfReffed () const
 Don't use in production, for debugging.
 
void removeObserver (WeakPtrBase *obs)
 Not for normal use. May become private.
 
bool tryRef () const
 Not for normal use. May become private.
 
void unRef () const
 
void unRefNoDelete () const
 

Static Public Member Functions

static RefMan< Lightcreate ()
 
- Static Public Member Functions inherited from SharedObject
static Notifier< SharedObject > & instanceCreated ()
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 
- Static Public Member Functions inherited from RefCount::Referenced
static bool isSane (const Referenced *)
 

Protected Member Functions

 Light ()
 
 ~Light ()
 
void initLight ()
 
void updateLights ()
 
- Protected Member Functions inherited from visBase::NodeState
 NodeState ()
 
 ~NodeState ()
 
template<class T >
T * addAttribute (T *a)
 
template<class T >
void removeAttribute (T *a)
 
- Protected Member Functions inherited from SharedObject
 ~SharedObject ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 
- Protected Member Functions inherited from RefCount::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
virtual ~Referenced ()
 
Referencedoperator= (const Referenced &)
 

Static Protected Member Functions

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

Protected Attributes

float ambient_ = 0.2f
 
float diffuse_ = 0.8f
 
bool ison_ = true
 
osg::Light * light_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBackerdelnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Member Functions

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

Additional Inherited Members

- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Detailed Description

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

<>

Constructor & Destructor Documentation

◆ Light()

visBase::Light::Light ( )
protected

◆ ~Light()

visBase::Light::~Light ( )
protected

Member Function Documentation

◆ applyAttribute()

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

Reimplemented from visBase::NodeState.

◆ create()

static RefMan< Light > visBase::Light::create ( )
static

◆ direction()

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

the direction is specified towards light source

◆ fillPar()

void visBase::Light::fillPar ( IOPar & ) const

◆ getAmbient()

float visBase::Light::getAmbient ( ) const

◆ getDiffuse()

float visBase::Light::getDiffuse ( ) const

◆ getLightNum()

int visBase::Light::getLightNum ( ) const

◆ initLight()

void visBase::Light::initLight ( )
protected

◆ isOn()

bool visBase::Light::isOn ( ) const
inline

◆ setAmbient()

void visBase::Light::setAmbient ( float )

0 = nada, 1 = full light

◆ setDiffuse()

void visBase::Light::setDiffuse ( float )

0 = nada, 1 = full light

◆ setDirection()

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

the direction is specified towards light source

◆ setLightNum()

void visBase::Light::setLightNum ( int )

◆ sKeyAmbient()

static const char * visBase::Light::sKeyAmbient ( )
staticprotected

◆ sKeyDiffuse()

static const char * visBase::Light::sKeyDiffuse ( )
staticprotected

◆ sKeyDirection()

static const char * visBase::Light::sKeyDirection ( )
staticprotected

◆ sKeyIsOn()

static const char * visBase::Light::sKeyIsOn ( )
staticprotected

◆ sKeyLightNum()

static const char * visBase::Light::sKeyLightNum ( )
staticprotected

◆ turnOn()

void visBase::Light::turnOn ( bool n)
inline

◆ updateLights()

void visBase::Light::updateLights ( )
protected

◆ usePar()

bool visBase::Light::usePar ( const IOPar & )

Member Data Documentation

◆ ambient_

float visBase::Light::ambient_ = 0.2f
protected

◆ diffuse_

float visBase::Light::diffuse_ = 0.8f
protected

◆ ison_

bool visBase::Light::ison_ = true
protected

◆ light_

osg::Light* visBase::Light::light_
protected

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