Viskores  1.0
Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
viskores::rendering::Color Class Reference

Representation of a color. More...

#include <Color.h>

Public Member Functions

 Color ()
 Create a black color. More...
 
 Color (viskores::Float32 r_, viskores::Float32 g_, viskores::Float32 b_, viskores::Float32 a_=1.f)
 Create a color with specified RGBA values. More...
 
 Color (const viskores::Vec4f_32 &components)
 Create a color with specified RGBA values. More...
 
void SetComponentFromByte (viskores::Int32 i, viskores::UInt8 v)
 Set the color value from 8 bit RGBA components. More...
 
viskores::UInt8 GetComponentAsByte (int i)
 
void GetRGBA (viskores::UInt8 &r, viskores::UInt8 &g, viskores::UInt8 &b, viskores::UInt8 &a)
 
viskores::Float64 RawBrightness ()
 

Public Attributes

viskores::Vec4f_32 Components
 

Static Public Attributes

static Color white
 
static Color black
 
static Color red
 
static Color green
 
static Color blue
 
static Color cyan
 
static Color magenta
 
static Color yellow
 
static Color gray10
 
static Color gray20
 
static Color gray30
 
static Color gray40
 
static Color gray50
 
static Color gray60
 
static Color gray70
 
static Color gray80
 
static Color gray90
 

Friends

std::ostream & operator<< (std::ostream &out, const Color &c)
 

Detailed Description

Representation of a color.

The color is defined as red, green, and blue intensities as well as an alpha representation of transparency (RGBA). The class provides mechanisms to retrieve the color as 8-bit integers or floating point values in the range [0, 1].

Constructor & Destructor Documentation

◆ Color() [1/3]

viskores::rendering::Color::Color ( )
inline

Create a black color.

◆ Color() [2/3]

viskores::rendering::Color::Color ( viskores::Float32  r_,
viskores::Float32  g_,
viskores::Float32  b_,
viskores::Float32  a_ = 1.f 
)
inline

Create a color with specified RGBA values.

The values are floating point and in the range [0, 1].

◆ Color() [3/3]

viskores::rendering::Color::Color ( const viskores::Vec4f_32 components)
inline

Create a color with specified RGBA values.

The values are floating point and in the range [0, 1].

Member Function Documentation

◆ GetComponentAsByte()

viskores::UInt8 viskores::rendering::Color::GetComponentAsByte ( int  i)
inline

◆ GetRGBA()

void viskores::rendering::Color::GetRGBA ( viskores::UInt8 r,
viskores::UInt8 g,
viskores::UInt8 b,
viskores::UInt8 a 
)
inline

◆ RawBrightness()

viskores::Float64 viskores::rendering::Color::RawBrightness ( )
inline

◆ SetComponentFromByte()

void viskores::rendering::Color::SetComponentFromByte ( viskores::Int32  i,
viskores::UInt8  v 
)
inline

Set the color value from 8 bit RGBA components.

The components are packed together into a 32-bit (4-byte) values.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Color c 
)
friend

Member Data Documentation

◆ black

Color viskores::rendering::Color::black
static

◆ blue

Color viskores::rendering::Color::blue
static

◆ Components

viskores::Vec4f_32 viskores::rendering::Color::Components

◆ cyan

Color viskores::rendering::Color::cyan
static

◆ gray10

Color viskores::rendering::Color::gray10
static

◆ gray20

Color viskores::rendering::Color::gray20
static

◆ gray30

Color viskores::rendering::Color::gray30
static

◆ gray40

Color viskores::rendering::Color::gray40
static

◆ gray50

Color viskores::rendering::Color::gray50
static

◆ gray60

Color viskores::rendering::Color::gray60
static

◆ gray70

Color viskores::rendering::Color::gray70
static

◆ gray80

Color viskores::rendering::Color::gray80
static

◆ gray90

Color viskores::rendering::Color::gray90
static

◆ green

Color viskores::rendering::Color::green
static

◆ magenta

Color viskores::rendering::Color::magenta
static

◆ red

Color viskores::rendering::Color::red
static

◆ white

Color viskores::rendering::Color::white
static

◆ yellow

Color viskores::rendering::Color::yellow
static

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