OpenWalnut
1.5.0dev
|
Item used in the selection below also containing color info. More...
#include <WDataSetFibers.h>
Public Types | |
enum | ColorMode { GRAY = 1 , RGB = 3 , RGBA = 4 } |
different kinds of color arrays can be used in this class. More... | |
Public Types inherited from WItemSelectionItem | |
typedef std::shared_ptr< WItemSelectionItem > | SPtr |
Abbreviation for a shared pointer. More... | |
typedef std::shared_ptr< const WItemSelectionItem > | ConstSPtr |
Abbreviation for a const shared pointer. More... | |
Public Member Functions | |
ColorScheme (std::string name, std::string description, const char **icon, ColorArray color, ColorMode mode=RGB) | |
Constructor. More... | |
ColorArray | getColor () const |
Get the color. More... | |
ColorMode | getMode () const |
Returns the mode of the color scheme. More... | |
Public Member Functions inherited from WItemSelectionItem | |
WItemSelectionItem (std::string name, std::string description="", const char **icon=NULL) | |
Constructs a new item with the specified values. More... | |
virtual | ~WItemSelectionItem () |
Destruction. More... | |
std::string | getName () const |
Returns the name of the item. More... | |
std::string | getDescription () const |
The description of the item. More... | |
const char ** | getIcon () const |
The icon associated with this item. More... | |
template<typename T > | |
T * | getAs () |
Dynamic cast of the object, if a derivative of WItemSelectionItem was add to WItemSelection. More... | |
template<typename T > | |
const T * | getAs () const |
Dynamic cast of the object, if a derivative of WItemSelectionItem was add to WItemSelection. More... | |
bool | operator== (const WItemSelectionItem &other) const |
Compares this and another item using their names only. More... | |
Protected Member Functions | |
void | setColor (ColorArray color, ColorMode mode=RGB) |
Sets the color array for this item. More... | |
Private Attributes | |
ColorArray | m_color |
The color array associated with the item. More... | |
ColorMode | m_mode |
Coloring mode. More... | |
Friends | |
class | WDataSetFibers |
Grant access for its outer class. More... | |
Additional Inherited Members | |
Protected Attributes inherited from WItemSelectionItem | |
std::string | m_name |
Item name. More... | |
std::string | m_description |
Item description. More... | |
const char ** | m_icon |
Item icon. More... | |
Item used in the selection below also containing color info.
Definition at line 117 of file WDataSetFibers.h.
different kinds of color arrays can be used in this class.
This enum defines their possible types.
Enumerator | |
---|---|
GRAY | gray value per vertex |
RGB | rgb per vertex |
RGBA | rgba per vertex |
Definition at line 124 of file WDataSetFibers.h.
|
inline |
Constructor.
Creates new item.
name | name, name of item. |
description | description of item. Can be empty. |
icon | icon, can be NULL |
color | the color array of this item. |
mode | the mode of the color array. This defines whether the colors are luminance, RGB or RGBA |
Definition at line 141 of file WDataSetFibers.h.
|
inline |
Get the color.
Definition at line 153 of file WDataSetFibers.h.
References m_color.
|
inline |
Returns the mode of the color scheme.
Definition at line 163 of file WDataSetFibers.h.
References m_mode.
|
inlineprotected |
Sets the color array for this item.
color | the color to set. |
mode | the mode of the color array. This defines whether the colors are luminance, RGB or RGBA |
Definition at line 175 of file WDataSetFibers.h.
|
friend |
Grant access for its outer class.
Definition at line 119 of file WDataSetFibers.h.
|
private |
The color array associated with the item.
Definition at line 185 of file WDataSetFibers.h.
Referenced by getColor(), and setColor().
|
private |
Coloring mode.
Definition at line 190 of file WDataSetFibers.h.
Referenced by getMode(), and setColor().