OpenWalnut  1.4.0
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | Friends
WDataSetFibers::ColorScheme Class Reference

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

#include <WDataSetFibers.h>

+ Inheritance diagram for WDataSetFibers::ColorScheme:

List of all members.

Public Types

enum  ColorMode { GRAY = 1, RGB = 3, RGBA = 4 }
 different kinds of color arrays can be used in this class. More...

Public Member Functions

 ColorScheme (std::string name, std::string description, const char **icon, ColorArray color, ColorMode mode=RGB)
 Constructor.
ColorArray getColor () const
 Get the color.
ColorMode getMode () const
 Returns the mode of the color scheme.

Protected Member Functions

void setColor (ColorArray color, ColorMode mode=RGB)
 Sets the color array for this item.

Private Attributes

ColorArray m_color
 The color array associated with the item.
ColorMode m_mode
 Coloring mode.

Friends

class WDataSetFibers

Detailed Description

Item used in the selection below also containing color info.

Definition at line 109 of file WDataSetFibers.h.


Member Enumeration Documentation

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 116 of file WDataSetFibers.h.


Constructor & Destructor Documentation

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 133 of file WDataSetFibers.h.


Member Function Documentation

Get the color.

Returns:
the color array.

Definition at line 145 of file WDataSetFibers.h.

References m_color.

Returns the mode of the color scheme.

Returns:
the mode.

Definition at line 155 of file WDataSetFibers.h.

References m_mode.

void WDataSetFibers::ColorScheme::setColor ( ColorArray  color,
ColorMode  mode = RGB 
) [inline, protected]

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 167 of file WDataSetFibers.h.

References m_color, and m_mode.

Referenced by WDataSetFibers::replaceColorScheme().


Member Data Documentation

The color array associated with the item.

Definition at line 171 of file WDataSetFibers.h.

Referenced by getColor(), and setColor().

Coloring mode.

Definition at line 182 of file WDataSetFibers.h.

Referenced by getMode(), and setColor().


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