OpendTect-6_4  6.4
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
visBase::Material Class Reference
Inheritance diagram for visBase::Material:
[legend]

Public Types

enum  ColorMode {
  Ambient, Diffuse, Specular, Emission,
  AmbientAndDiffuse, Off
}
 

Public Member Functions

 Material ()
 
void setFrom (const Material &, bool trigger=false)
 
void setPropertiesFrom (const Material &, bool trigger=false)
 
void setColors (const TypeSet< Color > &, bool trigger=true)
 
void setColorMode (ColorMode)
 
ColorMode getColorMode () const
 
void setColor (const Color &, int=-1, bool trigger=true)
 
Color getColor (int matnr=0) const
 
void removeColor (int idx)
 
void setDiffIntensity (float)
 
float getDiffIntensity () const
 
void setAmbience (float)
 
float getAmbience () const
 
void setSpecIntensity (float)
 
float getSpecIntensity () const
 
void setEmmIntensity (float)
 
float getEmmIntensity () const
 
void setShininess (float)
 
float getShininess () const
 
void setTransparency (float, int idx=0, bool updt=false)
 
void setAllTransparencies (float n)
 
void setTransparencies (float, const Interval< int > &range)
 
float getTransparency (int idx=0) const
 
void rescaleTransparency (float bendpower)
 
int usePar (const IOPar &)
 
void fillPar (IOPar &) const
 
int nrOfMaterial () const
 
void clear ()
 
void attachGeometry (osg::Geometry *)
 
void detachGeometry (osg::Geometry *)
 
void setColorBindType (unsigned int)
 
const TypeSet< ColorgetColors ()
 
- 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...
 

Public Attributes

Notifier< Materialchange
 

Private Member Functions

 mODTextTranslationClass (Material)
 
 ~Material ()
 
void updateOsgMaterial ()
 Used when no array is present. More...
 
void createOsgColorArray (int)
 
void setColorArray (osg::Array *)
 
void removeOsgColor (int)
 
float getRescaledTransparency () const
 Assumes object is write-locked. More...
 

Static Private Member Functions

static const char * sKeyColor ()
 
static const char * sKeyAmbience ()
 
static const char * sKeyDiffIntensity ()
 
static const char * sKeySpectralIntensity ()
 
static const char * sKeyEmmissiveIntensity ()
 
static const char * sKeyShininess ()
 
static const char * sKeyTransparency ()
 

Private Attributes

osg::Material * material_
 
Color color_
 
float ambience_
 
float specularintensity_
 
float emmissiveintensity_
 
float shininess_
 
float diffuseintensity_
 
unsigned int colorbindtype_
 
Threads::Lock lock_
 
osg::Array * osgcolorarray_
 
ObjectSet< osg::Geometry > attachedgeoms_
 
float transparencybendpower_
 

Friends

class OsgColorArrayUpdator
 

Additional Inherited Members

- 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...
 

Detailed Description

Member Enumeration Documentation

Enumerator
Ambient 
Diffuse 
Specular 
Emission 
AmbientAndDiffuse 
Off 

Constructor & Destructor Documentation

visBase::Material::Material ( )
visBase::Material::~Material ( )
private

Member Function Documentation

void visBase::Material::attachGeometry ( osg::Geometry *  )
void visBase::Material::clear ( )
void visBase::Material::createOsgColorArray ( int  )
private
void visBase::Material::detachGeometry ( osg::Geometry *  )
void visBase::Material::fillPar ( IOPar ) const
float visBase::Material::getAmbience ( ) const
Color visBase::Material::getColor ( int  matnr = 0) const
ColorMode visBase::Material::getColorMode ( ) const
const TypeSet<Color> visBase::Material::getColors ( )
float visBase::Material::getDiffIntensity ( ) const
float visBase::Material::getEmmIntensity ( ) const
float visBase::Material::getRescaledTransparency ( ) const
private

Assumes object is write-locked.

float visBase::Material::getShininess ( ) const
float visBase::Material::getSpecIntensity ( ) const
float visBase::Material::getTransparency ( int  idx = 0) const
visBase::Material::mODTextTranslationClass ( Material  )
private
int visBase::Material::nrOfMaterial ( ) const
void visBase::Material::removeColor ( int  idx)
void visBase::Material::removeOsgColor ( int  )
private
void visBase::Material::rescaleTransparency ( float  bendpower)
void visBase::Material::setAllTransparencies ( float  n)

Should be between 0 and 1

void visBase::Material::setAmbience ( float  )

Should be between 0 and 1

void visBase::Material::setColor ( const Color ,
int  = -1,
bool  trigger = true 
)

set material's od colors by input colors. using setColors() to instead of this calling if having to setColor many times.

void visBase::Material::setColorArray ( osg::Array *  )
private
void visBase::Material::setColorBindType ( unsigned  int)
void visBase::Material::setColorMode ( ColorMode  )
void visBase::Material::setColors ( const TypeSet< Color > &  ,
bool  trigger = true 
)

set material's od colors by input colors.

void visBase::Material::setDiffIntensity ( float  )

Should be between 0 and 1

void visBase::Material::setEmmIntensity ( float  )

Should be between 0 and 1

void visBase::Material::setFrom ( const Material ,
bool  trigger = false 
)
void visBase::Material::setPropertiesFrom ( const Material ,
bool  trigger = false 
)

set materials by input material's properties

void visBase::Material::setShininess ( float  )

Should be between 0 and 1

void visBase::Material::setSpecIntensity ( float  )

Should be between 0 and 1

void visBase::Material::setTransparencies ( float  ,
const Interval< int > &  range 
)
void visBase::Material::setTransparency ( float  ,
int  idx = 0,
bool  updt = false 
)

Should be between 0 and 1

static const char* visBase::Material::sKeyAmbience ( )
staticprivate
static const char* visBase::Material::sKeyColor ( )
staticprivate
static const char* visBase::Material::sKeyDiffIntensity ( )
staticprivate
static const char* visBase::Material::sKeyEmmissiveIntensity ( )
staticprivate
static const char* visBase::Material::sKeyShininess ( )
staticprivate
static const char* visBase::Material::sKeySpectralIntensity ( )
staticprivate
static const char* visBase::Material::sKeyTransparency ( )
staticprivate
void visBase::Material::updateOsgMaterial ( )
private

Used when no array is present.

int visBase::Material::usePar ( const IOPar )

Friends And Related Function Documentation

friend class OsgColorArrayUpdator
friend

Member Data Documentation

float visBase::Material::ambience_
private
ObjectSet<osg::Geometry> visBase::Material::attachedgeoms_
private
Notifier<Material> visBase::Material::change
Color visBase::Material::color_
private
unsigned int visBase::Material::colorbindtype_
private
float visBase::Material::diffuseintensity_
private
float visBase::Material::emmissiveintensity_
private
Threads::Lock visBase::Material::lock_
mutableprivate

the lock will protect below variables

osg::Material* visBase::Material::material_
private
osg::Array* visBase::Material::osgcolorarray_
private
float visBase::Material::shininess_
private
float visBase::Material::specularintensity_
private
float visBase::Material::transparencybendpower_
private

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