OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
WDataSetFibers::ColorScheme Class Reference

Item used in the selection below also containing color info. More...

#include <WDataSetFibers.h>

+ Inheritance diagram for WDataSetFibers::ColorScheme:
+ Collaboration diagram for WDataSetFibers::ColorScheme:

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< WItemSelectionItemSPtr
 Abbreviation for a shared pointer. More...
 
typedef std::shared_ptr< const WItemSelectionItemConstSPtr
 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...
 

Detailed Description

Item used in the selection below also containing color info.

Definition at line 117 of file WDataSetFibers.h.

Member Enumeration Documentation

◆ ColorMode

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.

Constructor & Destructor Documentation

◆ ColorScheme()

WDataSetFibers::ColorScheme::ColorScheme ( std::string  name,
std::string  description,
const char **  icon,
ColorArray  color,
ColorMode  mode = RGB 
)
inline

Constructor.

Creates new item.

Parameters
namename, name of item.
descriptiondescription of item. Can be empty.
iconicon, can be NULL
colorthe color array of this item.
modethe mode of the color array. This defines whether the colors are luminance, RGB or RGBA

Definition at line 141 of file WDataSetFibers.h.

Member Function Documentation

◆ getColor()

ColorArray WDataSetFibers::ColorScheme::getColor ( ) const
inline

Get the color.

Returns
the color array.

Definition at line 153 of file WDataSetFibers.h.

References m_color.

◆ getMode()

ColorMode WDataSetFibers::ColorScheme::getMode ( ) const
inline

Returns the mode of the color scheme.

Returns
the mode.

Definition at line 163 of file WDataSetFibers.h.

References m_mode.

◆ setColor()

void WDataSetFibers::ColorScheme::setColor ( ColorArray  color,
ColorMode  mode = RGB 
)
inlineprotected

Sets the color array for this item.

Parameters
colorthe color to set.
modethe mode of the color array. This defines whether the colors are luminance, RGB or RGBA

Definition at line 175 of file WDataSetFibers.h.

References m_color, and m_mode.

Friends And Related Function Documentation

◆ WDataSetFibers

friend class WDataSetFibers
friend

Grant access for its outer class.

Definition at line 119 of file WDataSetFibers.h.

Member Data Documentation

◆ m_color

ColorArray WDataSetFibers::ColorScheme::m_color
private

The color array associated with the item.

Definition at line 185 of file WDataSetFibers.h.

Referenced by getColor(), and setColor().

◆ m_mode

ColorMode WDataSetFibers::ColorScheme::m_mode
private

Coloring mode.

Definition at line 190 of file WDataSetFibers.h.

Referenced by getMode(), and setColor().


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