Main Page Namespace List Class Hierarchy Alphabetical List Compound List Namespace Members Compound Members Related Pages

# PajaTypes::ColorC Class Reference

RGBA color class. More...

`#include <ColorC.h>`

List of all members.

## Public Methods

- ColorC ( const ColorC& rCol )
- ColorC ( float32 f32R = 0, float32 f32G = 0, float32 f32B = 0, float32 f32A = 1.0f )
- ~ColorC ()
- void convert_from_uint8 ( uint8 ui8R, uint8 ui8G, uint8 ui8B, uint8 ui8A = 255 )
- operator const float32 * ()
- float32& operator[] ( int32 i )
- const float32& operator[] ( int32 i ) const
- ColorC operator- () const
- bool operator== ( const ColorC& rCol ) const
- bool operator!= ( const ColorC& rCol ) const
- ColorC& operator-= ( const ColorC& rCol )
- ColorC& operator+= ( const ColorC& rCol )
- ColorC& operator *= ( float32 f32S )
- ColorC& operator/= ( float32 f32S )
- ColorC operator * ( float32 f32S ) const
- ColorC operator/ ( float32 f32S ) const
- ColorC operator- ( const ColorC& rCol ) const
- ColorC operator+ ( const ColorC& rCol ) const
- ColorC operator * ( const ColorC& rCol ) const

## Friends

- ColorC operator * ( float32 f32S, const ColorC& rCol )

## Detailed Description

RGBA color class.

Color class defines a four component color type. The components are red, green, blue and alpha. All components are handled similar inside the class.

The assumed color range is 0..1.

This class is implemented by the system.

## Constructor & Destructor Documentation

ColorC ( | const ColorC & rCol )

| Copy constructor.

ColorC ( | float32 f32R = 0,
| float32 f32G = 0,
| float32 f32B = 0,
| float32 f32A = 1.0f )

| Default constructor.

~ColorC ( | )

| Default destructor.

## Member Function Documentation

void convert_from_uint8 ( | uint8 ui8R,
| uint8 ui8G,
| uint8 ui8B,
| uint8 ui8A = 255 )

| Converts color from unsigned integer values. All values are in range 0..255.

ColorC operator * ( | const ColorC & a ) const`[inline]`

| Multiplies each component of the color by matching component in the specified argument and returns the result.

ColorC operator * ( | float32 s ) const`[inline]`

| Multiplies each color component by the specified number and returns the result.

ColorC & operator *= ( | float32 s )`[inline]`

| Multiplies each color component by the specified number.

operator const float32 * ( | )

| Constant float pointer cast operator.

bool operator!= ( | const ColorC & rCol ) const

| Returns true if colors are not equal, else false.

ColorC operator+ ( | const ColorC & a ) const`[inline]`

| Adds the color specified by the argument to the color and returns the result.

ColorC & operator+= ( | const ColorC & a )`[inline]`

| Adds the color specified by the argument to the color.

ColorC operator- ( | const ColorC & a ) const`[inline]`

| Subtracts the color specified by the argument from the color and returns the result.

ColorC operator- ( | ) const`[inline]`

| Returns negated color.

ColorC & operator-= ( | const ColorC & a )`[inline]`

| Subtracts the color specified by the argument from the color.

ColorC operator/ ( | float32 s ) const`[inline]`

| Divides each color component by the specified number and returns the result.

ColorC & operator/= ( | float32 s )`[inline]`

| Divides each color component by the specified number.

bool operator== ( | const ColorC & rCol ) const

| Returns true if both colors are equal, else false.

const float & operator[] ( | int32 i ) const`[inline]`

| Returns component of the color. The index values from 0 to 3 corresponds to components R, G, B, and A respectively. There are two versions of this method, this version is for retrieving the values.

float & operator[] ( | int32 i )`[inline]`

| Returns component of the color. The index values from 0 to 3 corresponds to components R, G, B, and A respectively. There are two versions of this method, this version enables to assign values.

## Friends And Related Function Documentation

ColorC operator * ( | float32 f32S,
| const ColorC & rCol )`[friend]`

| Multiplies each color component by the specified number and returns the result.

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

- ColorC.h