OpenCOVER
Public Member Functions | Static Public Member Functions | List of all members
opencover::ColorBar Class Reference

#include <ColorBar.h>

Inheritance diagram for opencover::ColorBar:
Inheritance graph
[legend]
Collaboration diagram for opencover::ColorBar:
Collaboration graph
[legend]

Public Member Functions

 ColorBar (ui::Menu *menu)
 
 ~ColorBar ()
 destructor More...
 
bool hudVisible () const
 
void setHudPosition (osg::Vec3 pos, osg::Vec3 hpr, float size)
 
void update (const std::string &species, float min, float max, int numColors, const float *r, const float *g, const float *b, const float *a)
 
void setName (const char *name)
 
const char * getName ()
 
void parseAttrib (const char *attrib)
 
void setVisible (bool)
 
bool isVisible ()
 
void addInter (opencover::coInteractor *inter)
 
void updateInteractor ()
 

Static Public Member Functions

static void parseAttrib (const char *attrib, std::string &species, float &min, float &max, int &numColors, std::vector< float > &r, std::vector< float > &g, std::vector< float > &b, std::vector< float > &a)
 

Constructor & Destructor Documentation

◆ ColorBar()

opencover::ColorBar::ColorBar ( ui::Menu *  menu)

constructor when the colorbar is not to be opened from the pinboard create create containers, texture and labels

Parameters
colorsButtonthe button that opens the colorbar
moduleMenuthe coRowMenu used instead of the pinboard
speciesdata species name, currently not displayed
mindata minimum
maxdata maximum
numColorsnumber of different colors in colorbar
rred colors
ggreen colors
bblue colors
ared colors

◆ ~ColorBar()

opencover::ColorBar::~ColorBar ( )

destructor

Member Function Documentation

◆ addInter()

void opencover::ColorBar::addInter ( opencover::coInteractor inter)

◆ getName()

const char * opencover::ColorBar::getName ( )

get name

Returns
name the name of the colorbar, identical with module name, eg, g, Colors_1

◆ hudVisible()

bool opencover::ColorBar::hudVisible ( ) const

◆ isVisible()

bool opencover::ColorBar::isVisible ( )

◆ parseAttrib() [1/2]

void opencover::ColorBar::parseAttrib ( const char *  attrib)

◆ parseAttrib() [2/2]

static void opencover::ColorBar::parseAttrib ( const char *  attrib,
std::string &  species,
float &  min,
float &  max,
int &  numColors,
std::vector< float > &  r,
std::vector< float > &  g,
std::vector< float > &  b,
std::vector< float > &  a 
)
static

parseAttrib

Parameters
attribCOLORMAP attribute
speciesget species (the client should delete this pointer)
mincolormap minimum
maxcolormap maximum
numColorsnumber of colors
rred (the client should delete this pointer)
ggreen (the client should delete this pointer)
bblue (the client should delete this pointer)
aalpha (the client should delete this pointer)

◆ setHudPosition()

void opencover::ColorBar::setHudPosition ( osg::Vec3  pos,
osg::Vec3  hpr,
float  size 
)

◆ setName()

void opencover::ColorBar::setName ( const char *  name)

set name

◆ setVisible()

void opencover::ColorBar::setVisible ( bool  )

◆ update()

void opencover::ColorBar::update ( const std::string &  species,
float  min,
float  max,
int  numColors,
const float *  r,
const float *  g,
const float *  b,
const float *  a 
)

colorbar update

Parameters
speciestitle bar content
mindata minimum
maxdata maximum
numColorsnumber of different colors in colorbar
rred colors
ggreen colors
bblue colors
ared colors

◆ updateInteractor()

void opencover::ColorBar::updateInteractor ( )

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